1 // Copyright (C) 2015 CEA/DEN, EDF R&D, OPEN CASCADE
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.
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.
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
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #ifndef _GEOMUtils_TrsfCurve2d_HXX_
21 #define _GEOMUtils_TrsfCurve2d_HXX_
24 #include <GEOMUtils_Trsf2d.hxx>
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>
36 * This class represents an adaptor curve that represents an original curve
37 * transformed by an anisotropic transformation.
39 class TrsfCurve2d : public Adaptor2d_Curve2d
45 * Constructor. Initializes the object with the transformation parameters.
46 * Input parameters are not checked for validity. It is under responsibility
49 Standard_EXPORT TrsfCurve2d(const Handle(Geom2d_Curve) &theCurve,
50 const Trsf2d &theTrsf);
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.
57 Standard_EXPORT TrsfCurve2d(const Handle(Geom2d_Curve) &theCurve,
58 const Standard_Real theUFirst,
59 const Standard_Real theULast,
60 const Trsf2d &theTrsf);
63 * Redefined method from the base class.
65 Standard_EXPORT Standard_Real FirstParameter() const;
68 * Redefined method from the base class.
70 Standard_EXPORT Standard_Real LastParameter() const;
73 * Redefined method from the base class.
75 Standard_EXPORT const Handle(Geom2d_Curve)& Curve() const;
78 * Redefined method from the base class.
80 Standard_EXPORT GeomAbs_CurveType GetType() const;
83 * Redefined method from the base class.
85 Standard_EXPORT void Load(const Handle(Geom2d_Curve) &C);
88 * Redefined method from the base class.
90 Standard_EXPORT void Load(const Handle(Geom2d_Curve) &C,
91 const Standard_Real UFirst,
92 const Standard_Real ULast);
95 * Redefined method from the base class.
97 Standard_EXPORT GeomAbs_Shape Continuity() const;
100 * Redefined method from the base class.
102 Standard_EXPORT Standard_Integer NbIntervals(const GeomAbs_Shape S) const;
105 * Redefined method from the base class.
107 Standard_EXPORT void Intervals(TColStd_Array1OfReal &T,
108 const GeomAbs_Shape S) const;
111 * Redefined method from the base class.
113 Standard_EXPORT Handle(Adaptor2d_HCurve2d) Trim
114 (const Standard_Real First, const Standard_Real Last,
115 const Standard_Real ) const;
118 * Redefined method from the base class.
120 Standard_EXPORT Standard_Boolean IsClosed() const;
123 * Redefined method from the base class.
125 Standard_EXPORT Standard_Boolean IsPeriodic() const;
128 * Redefined method from the base class.
130 Standard_EXPORT Standard_Real Period() const;
133 * Redefined method from the base class.
135 Standard_EXPORT gp_Pnt2d Value(const Standard_Real U) const;
138 * Redefined method from the base class.
140 Standard_EXPORT void D0(const Standard_Real U, gp_Pnt2d &P) const;
143 * Redefined method from the base class.
145 Standard_EXPORT void D1(const Standard_Real U,
146 gp_Pnt2d &P, gp_Vec2d &V) const;
149 * Redefined method from the base class.
151 Standard_EXPORT void D2(const Standard_Real U, gp_Pnt2d &P,
152 gp_Vec2d &V1, gp_Vec2d &V2) const;
155 * Redefined method from the base class.
157 Standard_EXPORT void D3(const Standard_Real U, gp_Pnt2d &P,
158 gp_Vec2d &V1, gp_Vec2d &V2, gp_Vec2d &V3) const;
161 * Redefined method from the base class.
163 Standard_EXPORT gp_Vec2d DN(const Standard_Real U,
164 const Standard_Integer N) const;
167 * Redefined method from the base class.
169 Standard_EXPORT Standard_Real Resolution(const Standard_Real Ruv) const;
172 * Redefined method from the base class.
174 Standard_EXPORT gp_Lin2d Line() const;
177 * Redefined method from the base class.
179 Standard_EXPORT gp_Circ2d Circle() const;
182 * Redefined method from the base class.
184 Standard_EXPORT gp_Elips2d Ellipse() const;
187 * Redefined method from the base class.
189 Standard_EXPORT gp_Hypr2d Hyperbola() const;
192 * Redefined method from the base class.
194 Standard_EXPORT gp_Parab2d Parabola() const;
197 * Redefined method from the base class.
199 Standard_EXPORT Standard_Integer Degree() const;
202 * Redefined method from the base class.
204 Standard_EXPORT Standard_Boolean IsRational() const;
207 * Redefined method from the base class.
209 Standard_EXPORT Standard_Integer NbPoles() const;
212 * Redefined method from the base class.
214 Standard_EXPORT Standard_Integer NbKnots() const;
217 * Redefined method from the base class.
219 Standard_EXPORT Handle(Geom2d_BezierCurve) Bezier() const;
222 * Redefined method from the base class.
224 Standard_EXPORT Handle(Geom2d_BSplineCurve) BSpline() const;
227 * Redefined method from the base class.
229 Standard_EXPORT Standard_Integer NbSamples() const;
233 Geom2dAdaptor_Curve myCurve;