0022048: Visualization, AIS_InteractiveContext - single object selection should alway...
[occt.git] / src / BRep / BRep_CurveOnSurface.hxx
1 // Created on: 1993-07-06
2 // Created by: Remi LEQUETTE
3 // Copyright (c) 1993-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17 #ifndef _BRep_CurveOnSurface_HeaderFile
18 #define _BRep_CurveOnSurface_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
22
23 #include <gp_Pnt2d.hxx>
24 #include <BRep_GCurve.hxx>
25 #include <Standard_Real.hxx>
26 #include <Standard_Boolean.hxx>
27 class Geom2d_Curve;
28 class Geom_Surface;
29 class TopLoc_Location;
30 class gp_Pnt2d;
31 class gp_Pnt;
32 class BRep_CurveRepresentation;
33
34
35 class BRep_CurveOnSurface;
36 DEFINE_STANDARD_HANDLE(BRep_CurveOnSurface, BRep_GCurve)
37
38 //! Representation  of a  curve   by a   curve  in the
39 //! parametric space of a surface.
40 class BRep_CurveOnSurface : public BRep_GCurve
41 {
42
43 public:
44
45   
46   Standard_EXPORT BRep_CurveOnSurface(const Handle(Geom2d_Curve)& PC, const Handle(Geom_Surface)& S, const TopLoc_Location& L);
47   
48     void SetUVPoints (const gp_Pnt2d& P1, const gp_Pnt2d& P2);
49   
50     void UVPoints (gp_Pnt2d& P1, gp_Pnt2d& P2) const;
51   
52   //! Computes the point at parameter U.
53   Standard_EXPORT void D0 (const Standard_Real U, gp_Pnt& P) const Standard_OVERRIDE;
54   
55   //! Returns True.
56   Standard_EXPORT virtual Standard_Boolean IsCurveOnSurface() const Standard_OVERRIDE;
57   
58   //! A curve in the parametric space of a surface.
59   Standard_EXPORT virtual Standard_Boolean IsCurveOnSurface (const Handle(Geom_Surface)& S, const TopLoc_Location& L) const Standard_OVERRIDE;
60   
61   Standard_EXPORT virtual const Handle(Geom_Surface)& Surface() const Standard_OVERRIDE;
62   
63   Standard_EXPORT virtual const Handle(Geom2d_Curve)& PCurve() const Standard_OVERRIDE;
64   
65   Standard_EXPORT virtual void PCurve (const Handle(Geom2d_Curve)& C) Standard_OVERRIDE;
66   
67   //! Return a copy of this representation.
68   Standard_EXPORT virtual Handle(BRep_CurveRepresentation) Copy() const Standard_OVERRIDE;
69   
70   //! Recomputes any derived data after a modification.
71   //! This is called when the range is modified.
72   Standard_EXPORT virtual void Update() Standard_OVERRIDE;
73
74
75
76
77   DEFINE_STANDARD_RTTIEXT(BRep_CurveOnSurface,BRep_GCurve)
78
79 protected:
80
81
82   gp_Pnt2d myUV1;
83   gp_Pnt2d myUV2;
84
85
86 private:
87
88
89   Handle(Geom2d_Curve) myPCurve;
90   Handle(Geom_Surface) mySurface;
91
92
93 };
94
95
96 #include <BRep_CurveOnSurface.lxx>
97
98
99
100
101
102 #endif // _BRep_CurveOnSurface_HeaderFile