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