0022627: Change OCCT memory management defaults
[occt.git] / src / GCPnts / GCPnts_UniformDeflection.cxx
CommitLineData
7fd59977 1#include <GCPnts_UniformDeflection.ixx>
2#include <StdFail_NotDone.hxx>
3#include <Standard_DomainError.hxx>
4#include <Standard_OutOfRange.hxx>
5#include <Standard_ConstructionError.hxx>
6#include <Standard_NotImplemented.hxx>
7#include <gp_Pnt2d.hxx>
8//
9// mask the return of a Adaptor2d_Curve2d as a gp_Pnt
10//
11static gp_Pnt Value(const Adaptor3d_Curve & C,
12 const Standard_Real Parameter)
13{
14 return C.Value(Parameter) ;
15}
16static gp_Pnt Value(const Adaptor2d_Curve2d & C,
17 const Standard_Real Parameter)
18{
19 gp_Pnt aPoint ;
20 gp_Pnt2d a2dPoint =
21 C.Value(Parameter) ;
22 aPoint.SetX ( a2dPoint.X()) ;
23 aPoint.SetY ( a2dPoint.Y()) ;
24 aPoint.SetZ ( 0.0e0) ;
25 return aPoint ;
26}
27//=======================================================================
28//function : Value
29//purpose :
30//=======================================================================
31
32gp_Pnt GCPnts_UniformDeflection::Value
33 (const Standard_Integer Index) const
34{
35 StdFail_NotDone_Raise_if(!myDone,
36 "GCPnts_UniformAbscissa::Parameter()");
37 return myPoints.Value(Index) ;
38}
39//=======================================================================
40//function : GCPnts_UniformDeflection
41//purpose :
42//=======================================================================
43
44GCPnts_UniformDeflection::GCPnts_UniformDeflection ()
45:myDone(Standard_False)
46{
47}
48
49#include <Geom_BezierCurve.hxx>
50#include <Geom_BSplineCurve.hxx>
51#define TheCurve Adaptor3d_Curve
52#define Handle_TheBezierCurve Handle(Geom_BezierCurve)
53#define Handle_TheBSplineCurve Handle(Geom_BSplineCurve)
54#include <GCPnts_UniformDeflection.gxx>
55#undef TheCurve
56#undef Handle_TheBezierCurve
57#undef Handle_TheBSplineCurve
58
59#include <Geom2d_BezierCurve.hxx>
60#include <Geom2d_BSplineCurve.hxx>
61#define TheCurve Adaptor2d_Curve2d
62#define Handle_TheBezierCurve Handle(Geom2d_BezierCurve)
63#define Handle_TheBSplineCurve Handle(Geom2d_BSplineCurve)
64#include <GCPnts_UniformDeflection.gxx>
65#undef TheCurve
66#undef Handle_TheBezierCurve
67#undef Handle_TheBSplineCurve
68
69
70
71
72
73