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