Salome HOME
Merge remote branch 'origin/hydro/imps_2015'
[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 <Basics_OCCTVersion.hxx>
26
27 #include <Geom2dHatch_Hatcher.hxx>
28 #include <GeomAbs_IsoType.hxx>
29 #include <TColStd_HArray1OfInteger.hxx>
30 #include <TColStd_HArray1OfReal.hxx>
31 #include <TopoDS_Face.hxx>
32
33
34 namespace GEOMUtils
35 {
36   /*!
37    *  This class represents an adaptor curve that represents an original curve
38    *  transformed by an anisotropic transformation.
39    */
40   class TrsfCurve2d : public Adaptor2d_Curve2d
41   {
42
43   public:
44     
45     /**
46      * Constructor. Initializes the object with the transformation parameters.
47      * Input parameters are not checked for validity. It is under responsibility
48      * of the caller.
49      */
50     Standard_EXPORT TrsfCurve2d(const Handle(Geom2d_Curve) &theCurve,
51                                 const Trsf2d               &theTrsf);
52     
53     /**
54      * Constructor. Initializes the object with the curve, first and last
55      * parameters and transformation. Input parameters are not checked
56      * for validity. It is under responsibility of the caller.
57      */
58     Standard_EXPORT TrsfCurve2d(const Handle(Geom2d_Curve) &theCurve,
59                                 const Standard_Real         theUFirst,
60                                 const Standard_Real         theULast,
61                                 const Trsf2d               &theTrsf);
62
63     /**
64      * Redefined method from the base class.
65      */
66     Standard_EXPORT Standard_Real FirstParameter() const;
67
68     /**
69      * Redefined method from the base class.
70      */
71     Standard_EXPORT Standard_Real LastParameter() const;
72
73     /**
74      * Redefined method from the base class.
75      */
76     Standard_EXPORT const Handle(Geom2d_Curve)& Curve() const;
77
78     /**
79      * Redefined method from the base class.
80      */
81     Standard_EXPORT GeomAbs_CurveType GetType() const;
82
83     /**
84      * Redefined method from the base class.
85      */
86     Standard_EXPORT void Load(const Handle(Geom2d_Curve) &C);
87
88     /**
89      * Redefined method from the base class.
90      */
91     Standard_EXPORT void Load(const Handle(Geom2d_Curve) &C,
92                               const Standard_Real         UFirst,
93                               const Standard_Real         ULast);
94
95     /**
96      * Redefined method from the base class.
97      */
98     Standard_EXPORT GeomAbs_Shape Continuity() const;
99
100     /**
101      * Redefined method from the base class.
102      */
103     Standard_EXPORT Standard_Integer NbIntervals(const GeomAbs_Shape S) const;
104
105     /**
106      * Redefined method from the base class.
107      */
108     Standard_EXPORT void Intervals(TColStd_Array1OfReal &T,
109                                    const GeomAbs_Shape   S) const;
110
111     /**
112      * Redefined method from the base class.
113      */
114     Standard_EXPORT Handle(Adaptor2d_HCurve2d) Trim
115               (const Standard_Real First, const Standard_Real Last,
116                const Standard_Real ) const;
117
118     /**
119      * Redefined method from the base class.
120      */
121     Standard_EXPORT Standard_Boolean IsClosed() const;
122
123     /**
124      * Redefined method from the base class.
125      */
126     Standard_EXPORT Standard_Boolean IsPeriodic() const;
127
128     /**
129      * Redefined method from the base class.
130      */
131     Standard_EXPORT Standard_Real Period() const;
132
133     /**
134      * Redefined method from the base class.
135      */
136     Standard_EXPORT gp_Pnt2d Value(const Standard_Real U) const;
137
138     /**
139      * Redefined method from the base class.
140      */
141     Standard_EXPORT void D0(const Standard_Real U, gp_Pnt2d &P) const;
142
143     /**
144      * Redefined method from the base class.
145      */
146     Standard_EXPORT void D1(const Standard_Real U,
147                             gp_Pnt2d &P, gp_Vec2d &V) const;
148
149     /**
150      * Redefined method from the base class.
151      */
152     Standard_EXPORT void D2(const Standard_Real U, gp_Pnt2d &P,
153                             gp_Vec2d &V1, gp_Vec2d &V2) const;
154
155     /**
156      * Redefined method from the base class.
157      */
158     Standard_EXPORT void D3(const Standard_Real U, gp_Pnt2d &P,
159                             gp_Vec2d &V1, gp_Vec2d &V2, gp_Vec2d &V3) const;
160
161     /**
162      * Redefined method from the base class.
163      */
164     Standard_EXPORT gp_Vec2d DN(const Standard_Real    U,
165                                 const Standard_Integer N) const;
166
167     /**
168      * Redefined method from the base class.
169      */
170     Standard_EXPORT Standard_Real Resolution(const Standard_Real Ruv) const;
171
172     /**
173      * Redefined method from the base class.
174      */
175     Standard_EXPORT gp_Lin2d Line() const;
176
177     /**
178      * Redefined method from the base class.
179      */
180     Standard_EXPORT gp_Circ2d  Circle() const;
181
182     /**
183      * Redefined method from the base class.
184      */
185     Standard_EXPORT gp_Elips2d Ellipse() const;
186
187     /**
188      * Redefined method from the base class.
189      */
190     Standard_EXPORT gp_Hypr2d Hyperbola() const;
191
192     /**
193      * Redefined method from the base class.
194      */
195     Standard_EXPORT gp_Parab2d Parabola() const;
196
197     /**
198      * Redefined method from the base class.
199      */
200     Standard_EXPORT Standard_Integer Degree() const;
201
202     /**
203      * Redefined method from the base class.
204      */
205     Standard_EXPORT Standard_Boolean IsRational() const;
206
207     /**
208      * Redefined method from the base class.
209      */
210     Standard_EXPORT Standard_Integer NbPoles() const;
211
212     /**
213      * Redefined method from the base class.
214      */
215     Standard_EXPORT Standard_Integer NbKnots() const;
216
217     /**
218      * Redefined method from the base class.
219      */
220     Standard_EXPORT Handle(Geom2d_BezierCurve) Bezier() const;
221
222     /**
223      * Redefined method from the base class.
224      */
225     Standard_EXPORT Handle(Geom2d_BSplineCurve) BSpline() const;
226
227     /**
228      * Redefined method from the base class.
229      */
230     Standard_EXPORT Standard_Integer NbSamples() const;
231
232   private:
233
234     Geom2dAdaptor_Curve myCurve;
235     Trsf2d              myTrsf;
236
237   };
238 }
239
240 #endif