Salome HOME
Merge remote-tracking branch 'remotes/origin/hydro/imps_2017_salome_83' into HEAD
[modules/geom.git] / src / GEOMUtils / GEOMUtils_TrsfCurve2d.hxx
1 // Copyright (C) 2015-2016  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 #ifndef _GEOMUtils_TrsfCurve2d_HXX_
21 #define _GEOMUtils_TrsfCurve2d_HXX_
22
23 #include <GEOMUtils_Trsf2d.hxx>
24
25 #include <Geom2dHatch_Hatcher.hxx>
26 #include <GeomAbs_IsoType.hxx>
27 #include <TColStd_HArray1OfInteger.hxx>
28 #include <TColStd_HArray1OfReal.hxx>
29 #include <TopoDS_Face.hxx>
30
31
32 namespace GEOMUtils
33 {
34   /*!
35    *  This class represents an adaptor curve that represents an original curve
36    *  transformed by an anisotropic transformation.
37    */
38   class TrsfCurve2d : public Adaptor2d_Curve2d
39   {
40
41   public:
42     
43     /**
44      * Constructor. Initializes the object with the transformation parameters.
45      * Input parameters are not checked for validity. It is under responsibility
46      * of the caller.
47      */
48     Standard_EXPORT TrsfCurve2d(const Handle(Geom2d_Curve) &theCurve,
49                                 const Trsf2d               &theTrsf);
50     
51     /**
52      * Constructor. Initializes the object with the curve, first and last
53      * parameters and transformation. Input parameters are not checked
54      * for validity. It is under responsibility of the caller.
55      */
56     Standard_EXPORT TrsfCurve2d(const Handle(Geom2d_Curve) &theCurve,
57                                 const Standard_Real         theUFirst,
58                                 const Standard_Real         theULast,
59                                 const Trsf2d               &theTrsf);
60
61     /**
62      * Redefined method from the base class.
63      */
64     Standard_EXPORT Standard_Real FirstParameter() const;
65
66     /**
67      * Redefined method from the base class.
68      */
69     Standard_EXPORT Standard_Real LastParameter() const;
70
71     /**
72      * Redefined method from the base class.
73      */
74     Standard_EXPORT const Handle(Geom2d_Curve)& Curve() const;
75
76     /**
77      * Redefined method from the base class.
78      */
79     Standard_EXPORT GeomAbs_CurveType GetType() const;
80
81     /**
82      * Redefined method from the base class.
83      */
84     Standard_EXPORT void Load(const Handle(Geom2d_Curve) &C);
85
86     /**
87      * Redefined method from the base class.
88      */
89     Standard_EXPORT void Load(const Handle(Geom2d_Curve) &C,
90                               const Standard_Real         UFirst,
91                               const Standard_Real         ULast);
92
93     /**
94      * Redefined method from the base class.
95      */
96     Standard_EXPORT GeomAbs_Shape Continuity() const;
97
98     /**
99      * Redefined method from the base class.
100      */
101     Standard_EXPORT Standard_Integer NbIntervals(const GeomAbs_Shape S) const;
102
103     /**
104      * Redefined method from the base class.
105      */
106     Standard_EXPORT void Intervals(TColStd_Array1OfReal &T,
107                                    const GeomAbs_Shape   S) const;
108
109     /**
110      * Redefined method from the base class.
111      */
112     Standard_EXPORT Handle(Adaptor2d_HCurve2d) Trim
113               (const Standard_Real First, const Standard_Real Last,
114                const Standard_Real ) const;
115
116     /**
117      * Redefined method from the base class.
118      */
119     Standard_EXPORT Standard_Boolean IsClosed() const;
120
121     /**
122      * Redefined method from the base class.
123      */
124     Standard_EXPORT Standard_Boolean IsPeriodic() const;
125
126     /**
127      * Redefined method from the base class.
128      */
129     Standard_EXPORT Standard_Real Period() const;
130
131     /**
132      * Redefined method from the base class.
133      */
134     Standard_EXPORT gp_Pnt2d Value(const Standard_Real U) const;
135
136     /**
137      * Redefined method from the base class.
138      */
139     Standard_EXPORT void D0(const Standard_Real U, gp_Pnt2d &P) const;
140
141     /**
142      * Redefined method from the base class.
143      */
144     Standard_EXPORT void D1(const Standard_Real U,
145                             gp_Pnt2d &P, gp_Vec2d &V) const;
146
147     /**
148      * Redefined method from the base class.
149      */
150     Standard_EXPORT void D2(const Standard_Real U, gp_Pnt2d &P,
151                             gp_Vec2d &V1, gp_Vec2d &V2) const;
152
153     /**
154      * Redefined method from the base class.
155      */
156     Standard_EXPORT void D3(const Standard_Real U, gp_Pnt2d &P,
157                             gp_Vec2d &V1, gp_Vec2d &V2, gp_Vec2d &V3) const;
158
159     /**
160      * Redefined method from the base class.
161      */
162     Standard_EXPORT gp_Vec2d DN(const Standard_Real    U,
163                                 const Standard_Integer N) const;
164
165     /**
166      * Redefined method from the base class.
167      */
168     Standard_EXPORT Standard_Real Resolution(const Standard_Real Ruv) const;
169
170     /**
171      * Redefined method from the base class.
172      */
173     Standard_EXPORT gp_Lin2d Line() const;
174
175     /**
176      * Redefined method from the base class.
177      */
178     Standard_EXPORT gp_Circ2d  Circle() const;
179
180     /**
181      * Redefined method from the base class.
182      */
183     Standard_EXPORT gp_Elips2d Ellipse() const;
184
185     /**
186      * Redefined method from the base class.
187      */
188     Standard_EXPORT gp_Hypr2d Hyperbola() const;
189
190     /**
191      * Redefined method from the base class.
192      */
193     Standard_EXPORT gp_Parab2d Parabola() const;
194
195     /**
196      * Redefined method from the base class.
197      */
198     Standard_EXPORT Standard_Integer Degree() const;
199
200     /**
201      * Redefined method from the base class.
202      */
203     Standard_EXPORT Standard_Boolean IsRational() const;
204
205     /**
206      * Redefined method from the base class.
207      */
208     Standard_EXPORT Standard_Integer NbPoles() const;
209
210     /**
211      * Redefined method from the base class.
212      */
213     Standard_EXPORT Standard_Integer NbKnots() const;
214
215     /**
216      * Redefined method from the base class.
217      */
218     Standard_EXPORT Handle(Geom2d_BezierCurve) Bezier() const;
219
220     /**
221      * Redefined method from the base class.
222      */
223     Standard_EXPORT Handle(Geom2d_BSplineCurve) BSpline() const;
224
225     /**
226      * Redefined method from the base class.
227      */
228     Standard_EXPORT Standard_Integer NbSamples() const;
229
230   private:
231
232     Geom2dAdaptor_Curve myCurve;
233     Trsf2d              myTrsf;
234
235   };
236 }
237
238 #endif