7fd59977 |
1 | // File: Contap_HCurve2dToolGen.lxx |
2 | // Created: Thu Oct 22 12:14:59 1992 |
3 | // Author: Laurent BUCHARD |
4 | // <lbr@sdsun2> |
5 | |
6 | |
7 | #include CurveGen_hxx |
8 | |
9 | #include <GeomAbs_CurveType.hxx> |
10 | #include <GeomAbs_Shape.hxx> |
11 | |
12 | #include <gp_Vec2d.hxx> |
13 | #include <gp_Lin2d.hxx> |
14 | #include <gp_Circ2d.hxx> |
15 | #include <gp_Elips2d.hxx> |
16 | #include <gp_Parab2d.hxx> |
17 | #include <gp_Hypr2d.hxx> |
18 | |
19 | |
20 | #include <Handle_Geom2d_BezierCurve.hxx> |
21 | #include <Handle_Geom2d_BSplineCurve.hxx> |
22 | |
23 | #include <TColStd_Array1OfReal.hxx> |
24 | |
25 | //============================================================ |
26 | inline Standard_Real Contap_HCurve2dToolGen::FirstParameter (const CurveGen& C) { |
27 | return(C->FirstParameter()); |
28 | } |
29 | //============================================================ |
30 | inline Standard_Real Contap_HCurve2dToolGen::LastParameter (const CurveGen& C) { |
31 | return(C->LastParameter()); |
32 | } |
33 | //============================================================ |
34 | inline GeomAbs_Shape Contap_HCurve2dToolGen::Continuity (const CurveGen& C) { |
35 | return(C->Continuity()); |
36 | } |
37 | //============================================================ |
38 | inline Standard_Integer Contap_HCurve2dToolGen::NbIntervals(const CurveGen& C,const GeomAbs_Shape Sh) { |
39 | return(C->NbIntervals(Sh)); |
40 | } |
41 | //============================================================ |
42 | inline void Contap_HCurve2dToolGen::Intervals(const CurveGen& C, |
43 | TColStd_Array1OfReal& Tab, |
44 | const GeomAbs_Shape Sh) { |
45 | C->Intervals(Tab,Sh); |
46 | } |
47 | //============================================================ |
48 | inline Standard_Boolean Contap_HCurve2dToolGen::IsClosed(const CurveGen& C) { |
49 | return(C->IsClosed()); |
50 | } |
51 | //============================================================ |
52 | inline Standard_Boolean Contap_HCurve2dToolGen::IsPeriodic(const CurveGen& C) { |
53 | return(C->IsPeriodic()); |
54 | } |
55 | //============================================================ |
56 | inline Standard_Real Contap_HCurve2dToolGen::Period(const CurveGen& C) { |
57 | return(C->Period()); |
58 | } |
59 | //============================================================ |
60 | inline gp_Pnt2d Contap_HCurve2dToolGen::Value (const CurveGen& C, |
61 | const Standard_Real U) { |
62 | return(C->Value(U)); |
63 | } |
64 | //============================================================ |
65 | inline void Contap_HCurve2dToolGen::D0(const CurveGen& C, |
66 | const Standard_Real U, |
67 | gp_Pnt2d& P) { |
68 | C->D0(U,P); |
69 | } |
70 | //============================================================ |
71 | inline void Contap_HCurve2dToolGen::D1 (const CurveGen& C, |
72 | const Standard_Real U, |
73 | gp_Pnt2d& P, |
74 | gp_Vec2d& T) { |
75 | C->D1(U,P,T); |
76 | } |
77 | //============================================================ |
78 | inline void Contap_HCurve2dToolGen::D2 (const CurveGen& C, |
79 | const Standard_Real U, |
80 | gp_Pnt2d& P, |
81 | gp_Vec2d& T, |
82 | gp_Vec2d& N) { |
83 | |
84 | C->D2(U,P,T,N); |
85 | } |
86 | //============================================================ |
87 | inline void Contap_HCurve2dToolGen::D3 (const CurveGen& C, |
88 | const Standard_Real U, |
89 | gp_Pnt2d& P, |
90 | gp_Vec2d& V1, |
91 | gp_Vec2d& V2, |
92 | gp_Vec2d& V3) { |
93 | |
94 | C->D3(U,P,V1,V2,V3); |
95 | } |
96 | //============================================================ |
97 | inline gp_Vec2d Contap_HCurve2dToolGen::DN (const CurveGen& C, |
98 | const Standard_Real U, |
99 | const Standard_Integer N) { |
100 | |
101 | return(C->DN(U,N)); |
102 | } |
103 | //============================================================ |
104 | inline Standard_Real Contap_HCurve2dToolGen::Resolution(const CurveGen& C, |
105 | const Standard_Real R3d) { |
106 | return(C->Resolution(R3d)); |
107 | } |
108 | //============================================================ |
109 | inline GeomAbs_CurveType Contap_HCurve2dToolGen::GetType(const CurveGen& C) { |
110 | return(C->GetType()); |
111 | } |
112 | //============================================================ |
113 | inline gp_Lin2d Contap_HCurve2dToolGen::Line (const CurveGen& C) { |
114 | return(C->Line()); |
115 | } |
116 | //============================================================ |
117 | inline gp_Circ2d Contap_HCurve2dToolGen::Circle (const CurveGen& C) { |
118 | return(C->Circle()); |
119 | } |
120 | //============================================================ |
121 | inline gp_Elips2d Contap_HCurve2dToolGen::Ellipse (const CurveGen& C) { |
122 | return(C->Ellipse()); |
123 | } |
124 | //============================================================ |
125 | inline gp_Parab2d Contap_HCurve2dToolGen::Parabola (const CurveGen& C) { |
126 | return(C->Parabola()); |
127 | } |
128 | //============================================================ |
129 | inline gp_Hypr2d Contap_HCurve2dToolGen::Hyperbola (const CurveGen& C) { |
130 | return(C->Hyperbola()); |
131 | } |
132 | //============================================================ |
133 | inline Handle(Geom2d_BezierCurve) Contap_HCurve2dToolGen::Bezier (const CurveGen& C) { |
134 | return(C->Bezier()); |
135 | } |
136 | //============================================================ |
137 | inline Handle(Geom2d_BSplineCurve) Contap_HCurve2dToolGen::BSpline (const CurveGen& C) { |
138 | return(C->BSpline()); |
139 | } |
140 | //============================================================ |
141 | |
142 | |
143 | |
144 | |
145 | |
146 | |
147 | |
148 | |
149 | |
150 | |
151 | |
152 | |
153 | |
154 | |