1 // Created by: Laurent BUCHARD
2 // Copyright (c) 1993-1999 Matra Datavision
3 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
19 #include <gp_Cylinder.hxx>
20 #include <gp_Cone.hxx>
21 #include <gp_Torus.hxx>
22 #include <gp_Sphere.hxx>
25 #include <Geom_BezierSurface.hxx>
26 #include <Geom_BSplineSurface.hxx>
27 #include <Adaptor3d_Surface.hxx>
28 #include <Adaptor3d_Curve.hxx>
29 #include <BRepAdaptor_Surface.hxx>
31 //=======================================================================
32 //function : FirstUParameter
34 //=======================================================================
37 HLRBRep_BSurfaceTool::FirstUParameter(const BRepAdaptor_Surface& Surf)
38 { return Surf.FirstUParameter(); }
40 //=======================================================================
41 //function : FirstVParameter
43 //=======================================================================
46 HLRBRep_BSurfaceTool::FirstVParameter(const BRepAdaptor_Surface& Surf)
47 { return Surf.FirstVParameter(); }
49 //=======================================================================
50 //function : LastUParameter
52 //=======================================================================
55 HLRBRep_BSurfaceTool::LastUParameter(const BRepAdaptor_Surface& Surf)
56 { return Surf.LastUParameter(); }
58 //=======================================================================
59 //function : LastVParameter
61 //=======================================================================
64 HLRBRep_BSurfaceTool::LastVParameter(const BRepAdaptor_Surface& Surf)
65 { return Surf.LastVParameter(); }
67 //=======================================================================
68 //function : NbUIntervals
70 //=======================================================================
72 inline Standard_Integer
73 HLRBRep_BSurfaceTool::NbUIntervals(const BRepAdaptor_Surface& Surf,
74 const GeomAbs_Shape S)
75 { return Surf.NbUIntervals(S); }
77 //=======================================================================
78 //function : NbVIntervals
80 //=======================================================================
82 inline Standard_Integer
83 HLRBRep_BSurfaceTool::NbVIntervals(const BRepAdaptor_Surface& Surf,
84 const GeomAbs_Shape S)
85 { return Surf.NbVIntervals(S); }
87 //=======================================================================
88 //function : UIntervals
90 //=======================================================================
93 HLRBRep_BSurfaceTool::UIntervals(const BRepAdaptor_Surface& Surf,
94 TColStd_Array1OfReal& Tab,
95 const GeomAbs_Shape S)
96 { Surf.UIntervals(Tab,S); }
98 //=======================================================================
99 //function : VIntervals
101 //=======================================================================
104 HLRBRep_BSurfaceTool::VIntervals(const BRepAdaptor_Surface& Surf,
105 TColStd_Array1OfReal& Tab,
106 const GeomAbs_Shape S)
107 { Surf.VIntervals(Tab,S); }
110 //=======================================================================
113 //=======================================================================
115 inline Handle(Adaptor3d_Surface)
116 HLRBRep_BSurfaceTool::UTrim(const BRepAdaptor_Surface& Surf,
117 const Standard_Real F,
118 const Standard_Real L,
119 const Standard_Real Tol)
120 { return Surf.UTrim(F,L,Tol); }
122 //=======================================================================
125 //=======================================================================
127 inline Handle(Adaptor3d_Surface)
128 HLRBRep_BSurfaceTool::VTrim(const BRepAdaptor_Surface& Surf,
129 const Standard_Real F,
130 const Standard_Real L,
131 const Standard_Real Tol)
132 { return Surf.VTrim(F,L,Tol); }
134 //=======================================================================
135 //function : IsUClosed
137 //=======================================================================
139 inline Standard_Boolean
140 HLRBRep_BSurfaceTool::IsUClosed(const BRepAdaptor_Surface& S)
141 { return S.IsUClosed(); }
143 //=======================================================================
144 //function : IsVClosed
146 //=======================================================================
148 inline Standard_Boolean
149 HLRBRep_BSurfaceTool::IsVClosed(const BRepAdaptor_Surface& S)
150 { return S.IsVClosed(); }
152 //=======================================================================
153 //function : IsUPeriodic
155 //=======================================================================
157 inline Standard_Boolean
158 HLRBRep_BSurfaceTool::IsUPeriodic(const BRepAdaptor_Surface& S)
159 { return S.IsUPeriodic(); }
161 //=======================================================================
164 //=======================================================================
167 HLRBRep_BSurfaceTool::UPeriod(const BRepAdaptor_Surface& S)
168 { return S.UPeriod(); }
170 //=======================================================================
171 //function : IsVPeriodic
173 //=======================================================================
175 inline Standard_Boolean
176 HLRBRep_BSurfaceTool::IsVPeriodic(const BRepAdaptor_Surface& S)
177 { return S.IsVPeriodic(); }
179 //=======================================================================
182 //=======================================================================
185 HLRBRep_BSurfaceTool::VPeriod(const BRepAdaptor_Surface& S)
186 { return S.VPeriod(); }
188 //=======================================================================
191 //=======================================================================
194 HLRBRep_BSurfaceTool::Value(const BRepAdaptor_Surface& S,
195 const Standard_Real U,
196 const Standard_Real V )
197 { return S.Value(U,V); }
199 //=======================================================================
202 //=======================================================================
205 HLRBRep_BSurfaceTool::D0(const BRepAdaptor_Surface& S,
206 const Standard_Real U,
207 const Standard_Real V,
211 //=======================================================================
214 //=======================================================================
217 HLRBRep_BSurfaceTool::D1(const BRepAdaptor_Surface& S,
218 const Standard_Real U,
219 const Standard_Real V,
223 { S.D1(U,V,P,D1U,D1V); }
225 //=======================================================================
228 //=======================================================================
231 HLRBRep_BSurfaceTool::D2(const BRepAdaptor_Surface& S,
232 const Standard_Real U,
233 const Standard_Real V,
240 { S.D2(U,V,P,D1U,D1V,D2U,D2V,D2UV); }
242 //=======================================================================
245 //=======================================================================
248 HLRBRep_BSurfaceTool::D3(const BRepAdaptor_Surface& S,
249 const Standard_Real U,
250 const Standard_Real V,
261 { S.D3(U,V,P,D1U,D1V,D2U,D2V,D2UV,D3U,D3V,D3UUV,D3UVV); }
263 //=======================================================================
266 //=======================================================================
269 HLRBRep_BSurfaceTool::DN(const BRepAdaptor_Surface& S,
270 const Standard_Real U,
271 const Standard_Real V,
272 const Standard_Integer Nu,
273 const Standard_Integer Nv)
274 { return S.DN(U,V,Nu,Nv); }
276 //=======================================================================
277 //function : UResolution
279 //=======================================================================
282 HLRBRep_BSurfaceTool::UResolution(const BRepAdaptor_Surface& S,
283 const Standard_Real R3d)
284 { return S.UResolution(R3d); }
286 //=======================================================================
287 //function : VResolution
289 //=======================================================================
292 HLRBRep_BSurfaceTool::VResolution(const BRepAdaptor_Surface& S,
293 const Standard_Real R3d)
294 { return S.VResolution(R3d); }
296 //=======================================================================
299 //=======================================================================
301 inline GeomAbs_SurfaceType
302 HLRBRep_BSurfaceTool::GetType(const BRepAdaptor_Surface& S )
303 { return S.GetType(); }
305 //=======================================================================
308 //=======================================================================
311 HLRBRep_BSurfaceTool::Plane(const BRepAdaptor_Surface& S)
312 { return S.Plane(); }
314 //=======================================================================
315 //function : Cylinder
317 //=======================================================================
320 HLRBRep_BSurfaceTool::Cylinder(const BRepAdaptor_Surface& S)
321 { return S.Cylinder(); }
323 //=======================================================================
326 //=======================================================================
329 HLRBRep_BSurfaceTool::Cone(const BRepAdaptor_Surface& S)
332 //=======================================================================
335 //=======================================================================
338 HLRBRep_BSurfaceTool::Sphere(const BRepAdaptor_Surface& S)
339 { return S.Sphere(); }
341 //=======================================================================
344 //=======================================================================
347 HLRBRep_BSurfaceTool::Torus(const BRepAdaptor_Surface& S)
348 { return S.Torus(); }
350 //=======================================================================
353 //=======================================================================
355 inline Handle(Geom_BezierSurface)
356 HLRBRep_BSurfaceTool::Bezier(const BRepAdaptor_Surface& S)
357 { return(S.Bezier()); }
359 //=======================================================================
362 //=======================================================================
364 inline Handle(Geom_BSplineSurface)
365 HLRBRep_BSurfaceTool::BSpline(const BRepAdaptor_Surface& S)
366 { return(S.BSpline()); }
368 //=======================================================================
369 //function : AxeOfRevolution
371 //=======================================================================
374 HLRBRep_BSurfaceTool::AxeOfRevolution(const BRepAdaptor_Surface& S)
375 { return(S.AxeOfRevolution()); }
377 //=======================================================================
378 //function : Direction
380 //=======================================================================
383 HLRBRep_BSurfaceTool::Direction(const BRepAdaptor_Surface& S)
384 { return(S.Direction()); }
386 //=======================================================================
387 //function : BasisCurve
389 //=======================================================================
391 inline Handle(Adaptor3d_Curve)
392 HLRBRep_BSurfaceTool::BasisCurve(const BRepAdaptor_Surface& S)
393 { return(S.BasisCurve()); }
395 //=======================================================================
396 //function : UContinuity
398 //=======================================================================
401 HLRBRep_BSurfaceTool::UContinuity(const BRepAdaptor_Surface& S)
402 { return(S.UContinuity()); }
404 //=======================================================================
405 //function : VContinuity
407 //=======================================================================
410 HLRBRep_BSurfaceTool::VContinuity(const BRepAdaptor_Surface& S)
411 { return(S.VContinuity()); }
413 //=======================================================================
416 //=======================================================================
418 inline Standard_Integer
419 HLRBRep_BSurfaceTool::UDegree(const BRepAdaptor_Surface& S)
420 { return(S.UDegree()); }
422 //=======================================================================
423 //function : NbUPoles
425 //=======================================================================
427 inline Standard_Integer
428 HLRBRep_BSurfaceTool::NbUPoles(const BRepAdaptor_Surface& S)
429 { return(S.NbUPoles()); }
431 //=======================================================================
432 //function : NbUKnots
434 //=======================================================================
436 inline Standard_Integer
437 HLRBRep_BSurfaceTool::NbUKnots(const BRepAdaptor_Surface& S)
438 { return(S.NbUKnots()); }
440 //=======================================================================
441 //function : IsURational
443 //=======================================================================
445 inline Standard_Boolean
446 HLRBRep_BSurfaceTool::IsURational(const BRepAdaptor_Surface& S)
447 { return(S.IsURational()); }
449 //=======================================================================
452 //=======================================================================
454 inline Standard_Integer
455 HLRBRep_BSurfaceTool::VDegree(const BRepAdaptor_Surface& S)
456 { return(S.VDegree()); }
458 //=======================================================================
459 //function : NbVPoles
461 //=======================================================================
463 inline Standard_Integer
464 HLRBRep_BSurfaceTool::NbVPoles(const BRepAdaptor_Surface& S)
465 { return(S.NbVPoles()); }
467 //=======================================================================
468 //function : NbVKnots
470 //=======================================================================
472 inline Standard_Integer
473 HLRBRep_BSurfaceTool::NbVKnots(const BRepAdaptor_Surface& S)
474 { return(S.NbVKnots()); }
476 //=======================================================================
477 //function : IsVRational
479 //=======================================================================
481 inline Standard_Boolean
482 HLRBRep_BSurfaceTool::IsVRational(const BRepAdaptor_Surface& S)
483 { return(S.IsVRational()); }