Commit | Line | Data |
---|---|---|
733a0e55 S |
1 | // File: HLRBRep_SurfaceTool.lxx |
2 | // Created: Wed Jui 7 18:00:00 1993 | |
3 | // Author: Laurent BUCHARD | |
4 | // Copyright: Matra Datavision 1993 | |
5 | // Copyright: OPEN CASCADE 2000 | |
7fd59977 | 6 | |
7 | #include <gp_Pnt.hxx> | |
8 | #include <gp_Vec.hxx> | |
9 | #include <gp_Pln.hxx> | |
10 | #include <gp_Cylinder.hxx> | |
11 | #include <gp_Cone.hxx> | |
12 | #include <gp_Torus.hxx> | |
13 | #include <gp_Sphere.hxx> | |
14 | #include <gp_Ax1.hxx> | |
15 | #include <gp_Dir.hxx> | |
16 | #include <Handle_Geom_BezierSurface.hxx> | |
17 | #include <Handle_Geom_BSplineSurface.hxx> | |
18 | #include <Handle_Adaptor3d_HSurface.hxx> | |
19 | #include <Handle_Adaptor3d_HCurve.hxx> | |
20 | #include <BRepAdaptor_Surface.hxx> | |
21 | ||
22 | inline Standard_Real HLRBRep_SurfaceTool::FirstUParameter(const Standard_Address Surf){ return ((BRepAdaptor_Surface *)Surf)->FirstUParameter(); } | |
23 | inline Standard_Real HLRBRep_SurfaceTool::FirstVParameter(const Standard_Address Surf){ return ((BRepAdaptor_Surface *)Surf)->FirstVParameter();} | |
24 | inline Standard_Real HLRBRep_SurfaceTool::LastUParameter(const Standard_Address Surf){ return ((BRepAdaptor_Surface *)Surf)->LastUParameter();} | |
25 | inline Standard_Real HLRBRep_SurfaceTool::LastVParameter(const Standard_Address Surf){ return ((BRepAdaptor_Surface *)Surf)->LastVParameter();} | |
26 | ||
27 | inline Standard_Integer HLRBRep_SurfaceTool::NbUIntervals(const Standard_Address Surf, | |
28 | const GeomAbs_Shape S){ | |
29 | return ((BRepAdaptor_Surface *)Surf)->NbUIntervals(S); | |
30 | } | |
31 | ||
32 | inline Standard_Integer HLRBRep_SurfaceTool::NbVIntervals(const Standard_Address Surf, | |
33 | const GeomAbs_Shape S){ | |
34 | return ((BRepAdaptor_Surface *)Surf)->NbVIntervals(S); | |
35 | } | |
36 | ||
37 | inline void HLRBRep_SurfaceTool::UIntervals(const Standard_Address Surf, | |
38 | TColStd_Array1OfReal& Tab, | |
39 | const GeomAbs_Shape S){ | |
40 | ((BRepAdaptor_Surface *)Surf)->UIntervals(Tab,S); | |
41 | } | |
42 | ||
43 | inline void HLRBRep_SurfaceTool::VIntervals(const Standard_Address Surf, | |
44 | TColStd_Array1OfReal& Tab, | |
45 | const GeomAbs_Shape S){ | |
46 | ((BRepAdaptor_Surface *)Surf)->VIntervals(Tab,S); | |
47 | } | |
48 | ||
49 | ||
50 | inline Handle_Adaptor3d_HSurface HLRBRep_SurfaceTool::UTrim(const Standard_Address Surf, | |
51 | const Standard_Real F, | |
52 | const Standard_Real L, | |
53 | const Standard_Real Tol) { | |
54 | return ((BRepAdaptor_Surface *)Surf)->UTrim(F,L,Tol); | |
55 | } | |
56 | ||
57 | inline Handle_Adaptor3d_HSurface HLRBRep_SurfaceTool::VTrim(const Standard_Address Surf, | |
58 | const Standard_Real F, | |
59 | const Standard_Real L, | |
60 | const Standard_Real Tol) { | |
61 | return ((BRepAdaptor_Surface *)Surf)->VTrim(F,L,Tol); | |
62 | } | |
63 | ||
64 | ||
65 | ||
66 | ||
67 | inline Standard_Boolean HLRBRep_SurfaceTool::IsUClosed(const Standard_Address S) | |
68 | { | |
69 | return ((BRepAdaptor_Surface *)S)->IsUClosed(); | |
70 | } | |
71 | ||
72 | inline Standard_Boolean HLRBRep_SurfaceTool::IsVClosed(const Standard_Address S) | |
73 | { | |
74 | return ((BRepAdaptor_Surface *)S)->IsVClosed(); | |
75 | } | |
76 | ||
77 | inline Standard_Boolean HLRBRep_SurfaceTool::IsUPeriodic(const Standard_Address S) | |
78 | { | |
79 | return ((BRepAdaptor_Surface *)S)->IsUPeriodic(); | |
80 | } | |
81 | ||
82 | inline Standard_Real HLRBRep_SurfaceTool::UPeriod(const Standard_Address S) | |
83 | { | |
84 | return ((BRepAdaptor_Surface *)S)->UPeriod(); | |
85 | } | |
86 | ||
87 | inline Standard_Boolean HLRBRep_SurfaceTool::IsVPeriodic(const Standard_Address S) | |
88 | { | |
89 | return ((BRepAdaptor_Surface *)S)->IsVPeriodic(); | |
90 | } | |
91 | ||
92 | inline Standard_Real HLRBRep_SurfaceTool::VPeriod(const Standard_Address S) | |
93 | { | |
94 | return ((BRepAdaptor_Surface *)S)->VPeriod(); | |
95 | } | |
96 | ||
97 | inline gp_Pnt HLRBRep_SurfaceTool::Value(const Standard_Address S, | |
98 | const Standard_Real U, | |
99 | const Standard_Real V ) | |
100 | { | |
101 | return ((BRepAdaptor_Surface *)S)->Value(U,V); | |
102 | } | |
103 | ||
104 | inline void HLRBRep_SurfaceTool::D0(const Standard_Address S, | |
105 | const Standard_Real U, | |
106 | const Standard_Real V, | |
107 | gp_Pnt& P) | |
108 | { | |
109 | ((BRepAdaptor_Surface *)S)->D0(U,V,P); | |
110 | } | |
111 | ||
112 | inline void HLRBRep_SurfaceTool::D1(const Standard_Address S, | |
113 | const Standard_Real U, | |
114 | const Standard_Real V, | |
115 | gp_Pnt& P, | |
116 | gp_Vec& D1U, | |
117 | gp_Vec& D1V) | |
118 | { | |
119 | ((BRepAdaptor_Surface *)S)->D1(U,V,P,D1U,D1V); | |
120 | } | |
121 | ||
122 | inline void HLRBRep_SurfaceTool::D2(const Standard_Address S, | |
123 | const Standard_Real U, | |
124 | const Standard_Real V, | |
125 | gp_Pnt& P, | |
126 | gp_Vec& D1U, | |
127 | gp_Vec& D1V, | |
128 | gp_Vec& D2U, | |
129 | gp_Vec& D2V, | |
130 | gp_Vec& D2UV) | |
131 | { | |
132 | ((BRepAdaptor_Surface *)S)->D2(U,V,P,D1U,D1V,D2U,D2V,D2UV); | |
133 | } | |
134 | ||
135 | inline void HLRBRep_SurfaceTool::D3(const Standard_Address S, | |
136 | const Standard_Real U, | |
137 | const Standard_Real V, | |
138 | gp_Pnt& P, | |
139 | gp_Vec& D1U, | |
140 | gp_Vec& D1V, | |
141 | gp_Vec& D2U, | |
142 | gp_Vec& D2V, | |
143 | gp_Vec& D2UV, | |
144 | gp_Vec& D3U, | |
145 | gp_Vec& D3V, | |
146 | gp_Vec& D3UUV, | |
147 | gp_Vec& D3UVV) | |
148 | { | |
149 | ((BRepAdaptor_Surface *)S)->D3(U,V,P,D1U,D1V,D2U,D2V,D2UV,D3U,D3V,D3UUV,D3UVV); | |
150 | } | |
151 | ||
152 | inline gp_Vec HLRBRep_SurfaceTool::DN(const Standard_Address S, | |
153 | const Standard_Real U, | |
154 | const Standard_Real V, | |
155 | const Standard_Integer Nu, | |
156 | const Standard_Integer Nv) | |
157 | { | |
158 | return ((BRepAdaptor_Surface *)S)->DN(U,V,Nu,Nv); | |
159 | } | |
160 | ||
161 | inline Standard_Real HLRBRep_SurfaceTool::UResolution(const Standard_Address S, | |
162 | const Standard_Real R3d) | |
163 | { | |
164 | return ((BRepAdaptor_Surface *)S)->UResolution(R3d); | |
165 | } | |
166 | ||
167 | inline Standard_Real HLRBRep_SurfaceTool::VResolution(const Standard_Address S, | |
168 | const Standard_Real R3d) | |
169 | { | |
170 | return ((BRepAdaptor_Surface *)S)->VResolution(R3d); | |
171 | } | |
172 | ||
173 | inline GeomAbs_SurfaceType HLRBRep_SurfaceTool::GetType(const Standard_Address S ) | |
174 | { | |
175 | return ((BRepAdaptor_Surface *)S)->GetType(); | |
176 | } | |
177 | ||
178 | inline gp_Pln HLRBRep_SurfaceTool::Plane(const Standard_Address S) | |
179 | { | |
180 | return ((BRepAdaptor_Surface *)S)->Plane(); | |
181 | } | |
182 | ||
183 | inline gp_Cylinder HLRBRep_SurfaceTool::Cylinder(const Standard_Address S) | |
184 | { | |
185 | return ((BRepAdaptor_Surface *)S)->Cylinder(); | |
186 | } | |
187 | ||
188 | inline gp_Cone HLRBRep_SurfaceTool::Cone(const Standard_Address S) | |
189 | { | |
190 | return ((BRepAdaptor_Surface *)S)->Cone(); | |
191 | } | |
192 | ||
193 | inline gp_Sphere HLRBRep_SurfaceTool::Sphere(const Standard_Address S) | |
194 | { | |
195 | return ((BRepAdaptor_Surface *)S)->Sphere(); | |
196 | } | |
197 | ||
198 | inline gp_Torus HLRBRep_SurfaceTool::Torus(const Standard_Address S) | |
199 | { | |
200 | return ((BRepAdaptor_Surface *)S)->Torus(); | |
201 | } | |
202 | ||
203 | ||
204 | inline Handle(Geom_BezierSurface) HLRBRep_SurfaceTool::Bezier(const Standard_Address S) { | |
205 | return(((BRepAdaptor_Surface *)S)->Bezier()); | |
206 | } | |
207 | ||
208 | inline Handle(Geom_BSplineSurface) HLRBRep_SurfaceTool::BSpline(const Standard_Address S) { | |
209 | return(((BRepAdaptor_Surface *)S)->BSpline()); | |
210 | } | |
211 | ||
212 | ||
213 | inline gp_Ax1 HLRBRep_SurfaceTool::AxeOfRevolution(const Standard_Address S) { | |
214 | return(((BRepAdaptor_Surface *)S)->AxeOfRevolution()); | |
215 | } | |
216 | ||
217 | inline gp_Dir HLRBRep_SurfaceTool::Direction(const Standard_Address S) { | |
218 | return(((BRepAdaptor_Surface *)S)->Direction()); | |
219 | } | |
220 | ||
221 | inline Handle(Adaptor3d_HCurve) HLRBRep_SurfaceTool::BasisCurve(const Standard_Address S) { | |
222 | return(((BRepAdaptor_Surface *)S)->BasisCurve()); | |
223 | } | |
224 | ||
225 | inline Handle(Adaptor3d_HSurface) HLRBRep_SurfaceTool::BasisSurface(const Standard_Address S) { | |
226 | return(((BRepAdaptor_Surface *)S)->BasisSurface()); | |
227 | } | |
228 | ||
229 | inline Standard_Real HLRBRep_SurfaceTool::OffsetValue(const Standard_Address S) { | |
230 | return(((BRepAdaptor_Surface *)S)->OffsetValue()); | |
231 | } |