b311480e |
1 | // Created on: 1995-07-20 |
2 | // Created by: Modelistation |
3 | // Copyright (c) 1995-1999 Matra Datavision |
4 | // Copyright (c) 1999-2012 OPEN CASCADE SAS |
5 | // |
6 | // The content of this file is subject to the Open CASCADE Technology Public |
7 | // License Version 6.5 (the "License"). You may not use the content of this file |
8 | // except in compliance with the License. Please obtain a copy of the License |
9 | // at http://www.opencascade.org and read it completely before using this file. |
10 | // |
11 | // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its |
12 | // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. |
13 | // |
14 | // The Original Code and all software distributed under the License is |
15 | // distributed on an "AS IS" basis, without warranty of any kind, and the |
16 | // Initial Developer hereby disclaims all such warranties, including without |
17 | // limitation, any warranties of merchantability, fitness for a particular |
18 | // purpose or non-infringement. Please see the License for the specific terms |
19 | // and conditions governing the rights and limitations under the License. |
20 | |
7fd59977 |
21 | |
22 | |
23 | #include TheSurface_hxx |
24 | #include <gp_Pnt.hxx> |
25 | #include <gp_Vec.hxx> |
26 | #include <gp_Pln.hxx> |
27 | #include <gp_Cylinder.hxx> |
28 | #include <gp_Cone.hxx> |
29 | #include <gp_Torus.hxx> |
30 | #include <gp_Sphere.hxx> |
31 | #include <gp_Ax1.hxx> |
32 | #include <gp_Dir.hxx> |
33 | #include <Handle_Geom_BezierSurface.hxx> |
34 | #include <Handle_Geom_BSplineSurface.hxx> |
35 | #include <Handle_Adaptor3d_HSurface.hxx> |
36 | #include <Handle_Adaptor3d_HCurve.hxx> |
37 | |
38 | |
39 | |
40 | inline Standard_Real BRepApprox_SurfaceToolGen::FirstUParameter(const TheSurface& Surf){ return Surf.FirstUParameter(); } |
41 | inline Standard_Real BRepApprox_SurfaceToolGen::FirstVParameter(const TheSurface& Surf){ return Surf.FirstVParameter();} |
42 | inline Standard_Real BRepApprox_SurfaceToolGen::LastUParameter(const TheSurface& Surf){ return Surf.LastUParameter();} |
43 | inline Standard_Real BRepApprox_SurfaceToolGen::LastVParameter(const TheSurface& Surf){ return Surf.LastVParameter();} |
44 | |
45 | inline Standard_Integer BRepApprox_SurfaceToolGen::NbUIntervals(const TheSurface& Surf, |
46 | const GeomAbs_Shape S){ |
47 | return Surf.NbUIntervals(S); |
48 | } |
49 | |
50 | inline Standard_Integer BRepApprox_SurfaceToolGen::NbVIntervals(const TheSurface& Surf, |
51 | const GeomAbs_Shape S){ |
52 | return Surf.NbVIntervals(S); |
53 | } |
54 | |
55 | inline void BRepApprox_SurfaceToolGen::UIntervals(const TheSurface& Surf, |
56 | TColStd_Array1OfReal& Tab, |
57 | const GeomAbs_Shape S){ |
58 | Surf.UIntervals(Tab,S); |
59 | } |
60 | |
61 | inline void BRepApprox_SurfaceToolGen::VIntervals(const TheSurface& Surf, |
62 | TColStd_Array1OfReal& Tab, |
63 | const GeomAbs_Shape S){ |
64 | Surf.VIntervals(Tab,S); |
65 | } |
66 | |
67 | |
68 | inline Handle_Adaptor3d_HSurface BRepApprox_SurfaceToolGen::UTrim(const TheSurface& Surf, |
69 | const Standard_Real F, |
70 | const Standard_Real L, |
71 | const Standard_Real Tol) { |
72 | return Surf.UTrim(F,L,Tol); |
73 | } |
74 | |
75 | inline Handle_Adaptor3d_HSurface BRepApprox_SurfaceToolGen::VTrim(const TheSurface& Surf, |
76 | const Standard_Real F, |
77 | const Standard_Real L, |
78 | const Standard_Real Tol) { |
79 | return Surf.VTrim(F,L,Tol); |
80 | } |
81 | |
82 | |
83 | |
84 | |
85 | inline Standard_Boolean BRepApprox_SurfaceToolGen::IsUClosed(const TheSurface& S) |
86 | { |
87 | return S.IsUClosed(); |
88 | } |
89 | |
90 | inline Standard_Boolean BRepApprox_SurfaceToolGen::IsVClosed(const TheSurface& S) |
91 | { |
92 | return S.IsVClosed(); |
93 | } |
94 | |
95 | inline Standard_Boolean BRepApprox_SurfaceToolGen::IsUPeriodic(const TheSurface& S) |
96 | { |
97 | return S.IsUPeriodic(); |
98 | } |
99 | |
100 | inline Standard_Real BRepApprox_SurfaceToolGen::UPeriod(const TheSurface& S) |
101 | { |
102 | return S.UPeriod(); |
103 | } |
104 | |
105 | inline Standard_Boolean BRepApprox_SurfaceToolGen::IsVPeriodic(const TheSurface& S) |
106 | { |
107 | return S.IsVPeriodic(); |
108 | } |
109 | |
110 | inline Standard_Real BRepApprox_SurfaceToolGen::VPeriod(const TheSurface& S) |
111 | { |
112 | return S.VPeriod(); |
113 | } |
114 | |
115 | inline gp_Pnt BRepApprox_SurfaceToolGen::Value(const TheSurface& S, |
116 | const Standard_Real U, |
117 | const Standard_Real V ) |
118 | { |
119 | return S.Value(U,V); |
120 | } |
121 | |
122 | inline void BRepApprox_SurfaceToolGen::D0(const TheSurface& S, |
123 | const Standard_Real U, |
124 | const Standard_Real V, |
125 | gp_Pnt& P) |
126 | { |
127 | S.D0(U,V,P); |
128 | } |
129 | |
130 | inline void BRepApprox_SurfaceToolGen::D1(const TheSurface& S, |
131 | const Standard_Real U, |
132 | const Standard_Real V, |
133 | gp_Pnt& P, |
134 | gp_Vec& D1U, |
135 | gp_Vec& D1V) |
136 | { |
137 | S.D1(U,V,P,D1U,D1V); |
138 | } |
139 | |
140 | inline void BRepApprox_SurfaceToolGen::D2(const TheSurface& S, |
141 | const Standard_Real U, |
142 | const Standard_Real V, |
143 | gp_Pnt& P, |
144 | gp_Vec& D1U, |
145 | gp_Vec& D1V, |
146 | gp_Vec& D2U, |
147 | gp_Vec& D2V, |
148 | gp_Vec& D2UV) |
149 | { |
150 | S.D2(U,V,P,D1U,D1V,D2U,D2V,D2UV); |
151 | } |
152 | |
153 | inline void BRepApprox_SurfaceToolGen::D3(const TheSurface& S, |
154 | const Standard_Real U, |
155 | const Standard_Real V, |
156 | gp_Pnt& P, |
157 | gp_Vec& D1U, |
158 | gp_Vec& D1V, |
159 | gp_Vec& D2U, |
160 | gp_Vec& D2V, |
161 | gp_Vec& D2UV, |
162 | gp_Vec& D3U, |
163 | gp_Vec& D3V, |
164 | gp_Vec& D3UUV, |
165 | gp_Vec& D3UVV) |
166 | { |
167 | S.D3(U,V,P,D1U,D1V,D2U,D2V,D2UV,D3U,D3V,D3UUV,D3UVV); |
168 | } |
169 | |
170 | inline gp_Vec BRepApprox_SurfaceToolGen::DN(const TheSurface& S, |
171 | const Standard_Real U, |
172 | const Standard_Real V, |
173 | const Standard_Integer Nu, |
174 | const Standard_Integer Nv) |
175 | { |
176 | return S.DN(U,V,Nu,Nv); |
177 | } |
178 | |
179 | inline Standard_Real BRepApprox_SurfaceToolGen::UResolution(const TheSurface& S, |
180 | const Standard_Real R3d) |
181 | { |
182 | return S.UResolution(R3d); |
183 | } |
184 | |
185 | inline Standard_Real BRepApprox_SurfaceToolGen::VResolution(const TheSurface& S, |
186 | const Standard_Real R3d) |
187 | { |
188 | return S.VResolution(R3d); |
189 | } |
190 | |
191 | inline GeomAbs_SurfaceType BRepApprox_SurfaceToolGen::GetType(const TheSurface& S ) |
192 | { |
193 | return S.GetType(); |
194 | } |
195 | |
196 | inline gp_Pln BRepApprox_SurfaceToolGen::Plane(const TheSurface& S) |
197 | { |
198 | return S.Plane(); |
199 | } |
200 | |
201 | inline gp_Cylinder BRepApprox_SurfaceToolGen::Cylinder(const TheSurface& S) |
202 | { |
203 | return S.Cylinder(); |
204 | } |
205 | |
206 | inline gp_Cone BRepApprox_SurfaceToolGen::Cone(const TheSurface& S) |
207 | { |
208 | return S.Cone(); |
209 | } |
210 | |
211 | inline gp_Sphere BRepApprox_SurfaceToolGen::Sphere(const TheSurface& S) |
212 | { |
213 | return S.Sphere(); |
214 | } |
215 | |
216 | inline gp_Torus BRepApprox_SurfaceToolGen::Torus(const TheSurface& S) |
217 | { |
218 | return S.Torus(); |
219 | } |
220 | |
221 | |
222 | inline Handle(Geom_BezierSurface) BRepApprox_SurfaceToolGen::Bezier(const TheSurface& S) { |
223 | return(S.Bezier()); |
224 | } |
225 | |
226 | inline Handle(Geom_BSplineSurface) BRepApprox_SurfaceToolGen::BSpline(const TheSurface& S) { |
227 | return(S.BSpline()); |
228 | } |
229 | |
230 | |
231 | inline gp_Ax1 BRepApprox_SurfaceToolGen::AxeOfRevolution(const TheSurface& S) { |
232 | return(S.AxeOfRevolution()); |
233 | } |
234 | |
235 | inline gp_Dir BRepApprox_SurfaceToolGen::Direction(const TheSurface& S) { |
236 | return(S.Direction()); |
237 | } |
238 | |
239 | inline Handle(Adaptor3d_HCurve) BRepApprox_SurfaceToolGen::BasisCurve(const TheSurface& S) { |
240 | return(S.BasisCurve()); |
241 | } |