b311480e |
1 | // Created on: 1993-04-21 |
2 | // Created by: Bruno DUMORTIER |
3 | // Copyright (c) 1993-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 | #include <Adaptor3d_SurfaceOfLinearExtrusion.ixx> |
23 | #include <Adaptor3d_HSurfaceOfLinearExtrusion.hxx> |
24 | #include <Precision.hxx> |
25 | #include <gp.hxx> |
26 | |
27 | //======================================================================= |
28 | //function : Adaptor3d_SurfaceOfLinearExtrusion |
29 | //purpose : |
30 | //======================================================================= |
31 | |
32 | Adaptor3d_SurfaceOfLinearExtrusion::Adaptor3d_SurfaceOfLinearExtrusion() |
33 | {} |
34 | |
35 | //======================================================================= |
36 | //function : Adaptor3d_SurfaceOfLinearExtrusion |
37 | //purpose : |
38 | //======================================================================= |
39 | |
40 | Adaptor3d_SurfaceOfLinearExtrusion::Adaptor3d_SurfaceOfLinearExtrusion |
41 | (const Handle(Adaptor3d_HCurve)& C) |
42 | { |
43 | Load( C); |
44 | } |
45 | |
46 | //======================================================================= |
47 | //function : Adaptor3d_SurfaceOfLinearExtrusion |
48 | //purpose : |
49 | //======================================================================= |
50 | |
51 | Adaptor3d_SurfaceOfLinearExtrusion::Adaptor3d_SurfaceOfLinearExtrusion |
52 | (const Handle(Adaptor3d_HCurve)& C, |
53 | const gp_Dir& V) |
54 | { |
55 | Load( C); |
56 | Load( V); |
57 | } |
58 | |
59 | //======================================================================= |
60 | //function : Load |
61 | //purpose : |
62 | //======================================================================= |
63 | |
64 | void Adaptor3d_SurfaceOfLinearExtrusion::Load( const Handle(Adaptor3d_HCurve)& C) |
65 | { |
66 | myBasisCurve = C; |
67 | } |
68 | |
69 | //======================================================================= |
70 | //function : Load |
71 | //purpose : |
72 | //======================================================================= |
73 | |
74 | void Adaptor3d_SurfaceOfLinearExtrusion::Load( const gp_Dir& V) |
75 | { |
76 | myDirection = V; |
77 | } |
78 | |
79 | //======================================================================= |
80 | //function : FirstUParameter |
81 | //purpose : |
82 | //======================================================================= |
83 | |
84 | Standard_Real Adaptor3d_SurfaceOfLinearExtrusion::FirstUParameter() const |
85 | { |
86 | return myBasisCurve->FirstParameter(); |
87 | } |
88 | |
89 | //======================================================================= |
90 | //function : LastUParameter |
91 | //purpose : |
92 | //======================================================================= |
93 | |
94 | Standard_Real Adaptor3d_SurfaceOfLinearExtrusion::LastUParameter() const |
95 | { |
96 | return myBasisCurve->LastParameter(); |
97 | } |
98 | |
99 | //======================================================================= |
100 | //function : FirstVParameter |
101 | //purpose : |
102 | //======================================================================= |
103 | |
104 | Standard_Real Adaptor3d_SurfaceOfLinearExtrusion::FirstVParameter() const |
105 | { |
106 | return RealFirst(); |
107 | } |
108 | |
109 | //======================================================================= |
110 | //function : LastVParameter |
111 | //purpose : |
112 | //======================================================================= |
113 | |
114 | Standard_Real Adaptor3d_SurfaceOfLinearExtrusion::LastVParameter() const |
115 | { |
116 | return RealLast(); |
117 | } |
118 | |
119 | //======================================================================= |
120 | //function : UContinuity |
121 | //purpose : |
122 | //======================================================================= |
123 | |
124 | GeomAbs_Shape Adaptor3d_SurfaceOfLinearExtrusion::UContinuity() const |
125 | { |
126 | return myBasisCurve->Continuity(); |
127 | } |
128 | |
129 | //======================================================================= |
130 | //function : VContinuity |
131 | //purpose : |
132 | //======================================================================= |
133 | |
134 | GeomAbs_Shape Adaptor3d_SurfaceOfLinearExtrusion::VContinuity() const |
135 | { |
136 | return GeomAbs_CN; |
137 | } |
138 | |
139 | //======================================================================= |
140 | //function : NbUIntervals |
141 | //purpose : |
142 | //======================================================================= |
143 | |
144 | Standard_Integer Adaptor3d_SurfaceOfLinearExtrusion::NbUIntervals |
145 | (const GeomAbs_Shape S) const |
146 | { |
147 | return myBasisCurve->NbIntervals(S); |
148 | } |
149 | |
150 | //======================================================================= |
151 | //function : NbVIntervals |
152 | //purpose : |
153 | //======================================================================= |
154 | |
155 | Standard_Integer Adaptor3d_SurfaceOfLinearExtrusion::NbVIntervals |
156 | (const GeomAbs_Shape ) const |
157 | { |
158 | return 1; |
159 | } |
160 | |
161 | //======================================================================= |
162 | //function : UIntervals |
163 | //purpose : |
164 | //======================================================================= |
165 | |
166 | void Adaptor3d_SurfaceOfLinearExtrusion::UIntervals |
167 | (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const |
168 | { |
169 | myBasisCurve->Intervals(T,S); |
170 | } |
171 | |
172 | //======================================================================= |
173 | //function : VIntervals |
174 | //purpose : |
175 | //======================================================================= |
176 | |
177 | void Adaptor3d_SurfaceOfLinearExtrusion::VIntervals |
178 | //(TColStd_Array1OfReal& T, const GeomAbs_Shape S) const |
179 | (TColStd_Array1OfReal& T, const GeomAbs_Shape ) const |
180 | { |
181 | T(T.Lower()) = FirstVParameter() ; |
182 | T(T.Lower() + 1) = LastVParameter() ; |
183 | } |
184 | |
185 | //======================================================================= |
186 | //function : VTrim |
187 | //purpose : |
188 | //======================================================================= |
189 | |
190 | Handle(Adaptor3d_HSurface) Adaptor3d_SurfaceOfLinearExtrusion::VTrim |
191 | (const Standard_Real First , |
192 | const Standard_Real Last, |
193 | const Standard_Real Tol) const |
194 | { |
195 | Handle(Adaptor3d_HCurve) newBasisCurve = |
d3f26155 |
196 | myBasisCurve->Trim(First, Last, Tol); |
197 | |
7fd59977 |
198 | Adaptor3d_SurfaceOfLinearExtrusion * SurfacePtr = |
199 | new Adaptor3d_SurfaceOfLinearExtrusion(newBasisCurve, myDirection) ; |
200 | |
201 | return new Adaptor3d_HSurfaceOfLinearExtrusion(*SurfacePtr); |
202 | } |
203 | |
204 | //======================================================================= |
205 | //function : UTrim |
206 | //purpose : |
207 | //======================================================================= |
208 | |
209 | Handle(Adaptor3d_HSurface) Adaptor3d_SurfaceOfLinearExtrusion::UTrim |
210 | //(const Standard_Real First , |
211 | // const Standard_Real Last, |
212 | // const Standard_Real Tol) const |
213 | (const Standard_Real , |
214 | const Standard_Real , |
215 | const Standard_Real ) const |
216 | { |
217 | Adaptor3d_SurfaceOfLinearExtrusion * SurfacePtr = |
218 | new Adaptor3d_SurfaceOfLinearExtrusion(myBasisCurve,myDirection); |
219 | |
220 | return new Adaptor3d_HSurfaceOfLinearExtrusion(*SurfacePtr) ; |
221 | } |
222 | |
223 | //======================================================================= |
224 | //function : IsUClosed |
225 | //purpose : |
226 | //======================================================================= |
227 | |
228 | Standard_Boolean Adaptor3d_SurfaceOfLinearExtrusion::IsUClosed() const |
229 | { |
230 | return myBasisCurve->IsClosed(); |
231 | } |
232 | |
233 | //======================================================================= |
234 | //function : IsVClosed |
235 | //purpose : |
236 | //======================================================================= |
237 | |
238 | Standard_Boolean Adaptor3d_SurfaceOfLinearExtrusion::IsVClosed() const |
239 | { |
240 | return Standard_True; |
241 | } |
242 | |
243 | //======================================================================= |
244 | //function : IsUPeriodic |
245 | //purpose : |
246 | //======================================================================= |
247 | |
248 | Standard_Boolean Adaptor3d_SurfaceOfLinearExtrusion::IsUPeriodic() const |
249 | { |
250 | return myBasisCurve->IsPeriodic(); |
251 | } |
252 | |
253 | //======================================================================= |
254 | //function : UPeriod |
255 | //purpose : |
256 | //======================================================================= |
257 | |
258 | Standard_Real Adaptor3d_SurfaceOfLinearExtrusion::UPeriod() const |
259 | { |
260 | return myBasisCurve->Period() ; |
261 | } |
262 | |
263 | //======================================================================= |
264 | //function : IsVPeriodic |
265 | //purpose : |
266 | //======================================================================= |
267 | |
268 | Standard_Boolean Adaptor3d_SurfaceOfLinearExtrusion::IsVPeriodic() const |
269 | { |
270 | return Standard_False; |
271 | } |
272 | |
273 | //======================================================================= |
274 | //function : VPeriod |
275 | //purpose : |
276 | //======================================================================= |
277 | |
278 | Standard_Real Adaptor3d_SurfaceOfLinearExtrusion::VPeriod() const |
279 | { |
280 | Standard_DomainError::Raise("Adaptor3d_SurfaceOfLinearExtrusion::VPeriod"); |
281 | return 0.0e0 ; |
282 | } |
283 | |
284 | //======================================================================= |
285 | //function : Value |
286 | //purpose : |
287 | //======================================================================= |
288 | |
289 | gp_Pnt Adaptor3d_SurfaceOfLinearExtrusion::Value(const Standard_Real U, |
d3f26155 |
290 | const Standard_Real V) |
7fd59977 |
291 | const |
292 | { |
293 | gp_Pnt P; |
294 | P = myBasisCurve->Value(U); |
295 | P.Translate( V * gp_Vec(myDirection)); |
296 | return P; |
297 | } |
298 | |
299 | //======================================================================= |
300 | //function : D0 |
301 | //purpose : |
302 | //======================================================================= |
303 | |
304 | void Adaptor3d_SurfaceOfLinearExtrusion::D0(const Standard_Real U, |
d3f26155 |
305 | const Standard_Real V, |
306 | gp_Pnt& P) const |
7fd59977 |
307 | { |
308 | myBasisCurve->D0(U,P); |
309 | P.Translate( V * gp_Vec(myDirection)); |
310 | } |
311 | |
312 | //======================================================================= |
313 | //function : D1 |
314 | //purpose : |
315 | //======================================================================= |
316 | |
317 | void Adaptor3d_SurfaceOfLinearExtrusion::D1(const Standard_Real U, |
d3f26155 |
318 | const Standard_Real V, |
319 | gp_Pnt& P, |
320 | gp_Vec& D1U, |
321 | gp_Vec& D1V) const |
7fd59977 |
322 | { |
323 | myBasisCurve->D1(U,P,D1U); |
324 | D0(U,V,P); |
325 | D1V = gp_Vec(myDirection); |
326 | } |
327 | |
328 | //======================================================================= |
329 | //function : D2 |
330 | //purpose : |
331 | //======================================================================= |
332 | |
333 | void Adaptor3d_SurfaceOfLinearExtrusion::D2(const Standard_Real U, |
d3f26155 |
334 | const Standard_Real V, |
335 | gp_Pnt& P, |
336 | gp_Vec& D1U, gp_Vec& D1V, |
337 | gp_Vec& D2U, gp_Vec& D2V, |
338 | gp_Vec& D2UV) const |
7fd59977 |
339 | { |
d3f26155 |
340 | myBasisCurve->D2(U,P,D1U,D2U); |
7fd59977 |
341 | D1V = gp_Vec(myDirection); |
342 | D2V.SetCoord( 0., 0., 0.); |
343 | D2UV.SetCoord( 0., 0., 0.); |
344 | D0(U,V,P); |
345 | } |
346 | |
347 | //======================================================================= |
348 | //function : D3 |
349 | //purpose : |
350 | //======================================================================= |
351 | |
352 | void Adaptor3d_SurfaceOfLinearExtrusion::D3(const Standard_Real U, |
d3f26155 |
353 | const Standard_Real V, |
354 | gp_Pnt& P, |
355 | gp_Vec& D1U, gp_Vec& D1V, |
356 | gp_Vec& D2U, gp_Vec& D2V, |
357 | gp_Vec& D2UV, |
358 | gp_Vec& D3U, gp_Vec& D3V, |
359 | gp_Vec& D3UUV, gp_Vec& D3UVV) const |
7fd59977 |
360 | { |
361 | myBasisCurve->D3(U,P,D1U,D2U,D3U); |
362 | D1V = gp_Vec(myDirection); |
363 | D2V.SetCoord( 0., 0., 0.); |
364 | D2UV.SetCoord( 0., 0., 0.); |
365 | D3V.SetCoord( 0., 0., 0.); |
366 | D3UUV.SetCoord( 0., 0., 0.); |
367 | D3UVV.SetCoord( 0., 0., 0.); |
368 | D0(U,V,P); |
369 | } |
370 | |
371 | //======================================================================= |
372 | //function : DN |
373 | //purpose : |
374 | //======================================================================= |
375 | |
376 | gp_Vec Adaptor3d_SurfaceOfLinearExtrusion::DN |
377 | (const Standard_Real U, |
378 | // const Standard_Real V, |
379 | const Standard_Real , |
380 | const Standard_Integer NU, |
381 | const Standard_Integer NV) const |
382 | { |
383 | if ( (NU+NV)<1 || NU<0 || NV<0) { |
384 | Standard_DomainError::Raise("Adaptor3d_SurfaceOfLinearExtrusion::DN"); |
385 | return gp_Vec(); |
386 | } |
387 | else { |
388 | if (NU == 0 && NV ==1) return gp_Vec( myDirection); |
389 | else if (NV == 0) return myBasisCurve->DN(U,NU); |
390 | else return gp_Vec( 0., 0., 0.); |
391 | } |
392 | } |
393 | |
394 | //======================================================================= |
395 | //function : UResolution |
396 | //purpose : |
397 | //======================================================================= |
398 | |
399 | Standard_Real Adaptor3d_SurfaceOfLinearExtrusion::UResolution |
400 | (const Standard_Real R3d) const |
401 | { |
402 | return myBasisCurve->Resolution(R3d); |
403 | } |
404 | |
405 | //======================================================================= |
406 | //function : VResolution |
407 | //purpose : |
408 | //======================================================================= |
409 | |
410 | Standard_Real Adaptor3d_SurfaceOfLinearExtrusion::VResolution |
411 | (const Standard_Real R3d) const |
412 | { |
413 | return R3d; |
414 | } |
415 | |
416 | //======================================================================= |
417 | //function : GetType |
418 | //purpose : |
419 | //======================================================================= |
420 | |
421 | GeomAbs_SurfaceType Adaptor3d_SurfaceOfLinearExtrusion::GetType() const |
422 | { |
423 | switch ( myBasisCurve->GetType()) { |
424 | |
425 | case GeomAbs_Line: |
426 | { |
427 | gp_Dir D = myBasisCurve->Line().Direction(); |
428 | if (myDirection.IsParallel( D, Precision::Angular())) { |
d3f26155 |
429 | return GeomAbs_SurfaceOfExtrusion; |
7fd59977 |
430 | } |
431 | else { |
d3f26155 |
432 | return GeomAbs_Plane; |
7fd59977 |
433 | } |
7fd59977 |
434 | } |
435 | |
436 | case GeomAbs_Circle: |
437 | { |
438 | gp_Dir D = (myBasisCurve->Circle()).Axis().Direction(); |
439 | if ( myDirection.IsParallel( D, Precision::Angular())) { |
d3f26155 |
440 | return GeomAbs_Cylinder; |
7fd59977 |
441 | } |
442 | // JAG 10.11.95 |
443 | else if (myDirection.IsNormal(D, Precision::Angular())) { |
d3f26155 |
444 | return GeomAbs_Plane; |
7fd59977 |
445 | } |
446 | else { |
d3f26155 |
447 | return GeomAbs_SurfaceOfExtrusion; |
7fd59977 |
448 | } |
7fd59977 |
449 | } |
450 | // JAG 10.11.95 |
451 | |
452 | case GeomAbs_Ellipse: |
453 | { |
454 | gp_Dir D = (myBasisCurve->Ellipse()).Axis().Direction(); |
455 | if (myDirection.IsNormal(D, Precision::Angular())) { |
d3f26155 |
456 | return GeomAbs_Plane; |
7fd59977 |
457 | } |
458 | else { |
d3f26155 |
459 | return GeomAbs_SurfaceOfExtrusion; |
7fd59977 |
460 | } |
7fd59977 |
461 | } |
462 | |
463 | case GeomAbs_Parabola: |
464 | { |
465 | gp_Dir D = (myBasisCurve->Parabola()).Axis().Direction(); |
466 | if (myDirection.IsNormal(D, Precision::Angular())) { |
d3f26155 |
467 | return GeomAbs_Plane; |
7fd59977 |
468 | } |
469 | else { |
d3f26155 |
470 | return GeomAbs_SurfaceOfExtrusion; |
7fd59977 |
471 | } |
7fd59977 |
472 | } |
473 | |
474 | case GeomAbs_Hyperbola: |
475 | { |
476 | gp_Dir D = (myBasisCurve->Hyperbola()).Axis().Direction(); |
477 | if (myDirection.IsNormal(D, Precision::Angular())) { |
d3f26155 |
478 | return GeomAbs_Plane; |
7fd59977 |
479 | } |
480 | else { |
d3f26155 |
481 | return GeomAbs_SurfaceOfExtrusion; |
7fd59977 |
482 | } |
7fd59977 |
483 | } |
484 | |
485 | default: |
486 | return GeomAbs_SurfaceOfExtrusion; |
487 | |
488 | } |
7fd59977 |
489 | } |
490 | |
491 | //======================================================================= |
492 | //function : Plane |
493 | //purpose : |
494 | //======================================================================= |
495 | |
496 | gp_Pln Adaptor3d_SurfaceOfLinearExtrusion::Plane() const |
497 | { |
498 | Standard_NoSuchObject_Raise_if (GetType() != GeomAbs_Plane, |
d3f26155 |
499 | "Adaptor3d_SurfaceOfLinearExtrusion::Plane"); |
7fd59977 |
500 | /* |
501 | gp_Pnt P; |
502 | gp_Vec Ox, Oy; |
503 | D1( 0., 0., P, Ox, Oy); |
504 | gp_Ax3 Ax3(P,gp_Dir(Ox^Oy),gp_Dir(Ox)); |
505 | if (gp_Dir(Oy).Dot(Ax3.YDirection())<0.){ |
506 | Ax3.YReverse(); |
507 | } |
508 | return gp_Pln(Ax3); |
509 | */ |
510 | |
511 | gp_Pnt P; |
512 | gp_Vec D1u, newZ; |
513 | Standard_Real UFirst = myBasisCurve->FirstParameter(); |
514 | Standard_Real ULast = myBasisCurve->LastParameter(); |
515 | if (Precision::IsNegativeInfinite(UFirst) && |
516 | Precision::IsPositiveInfinite(ULast)) { |
517 | UFirst = -100.; |
518 | ULast = 100.; |
519 | } |
520 | else if (Precision::IsNegativeInfinite(UFirst)) { |
521 | UFirst = ULast - 200.; |
522 | } |
523 | else if (Precision::IsPositiveInfinite(ULast)) { |
524 | ULast = UFirst + 200.; |
525 | } |
526 | Standard_Real deltau = (ULast-UFirst)/20.; |
527 | for (Standard_Integer i =1; i<=21; i++) { |
528 | Standard_Real prm = UFirst + (i-1)*deltau; |
529 | myBasisCurve->D1(prm,P,D1u); |
530 | newZ = D1u.Normalized().Crossed(myDirection); |
531 | if (newZ.Magnitude() > 1.e-12) break; |
532 | } |
533 | gp_Ax3 Ax3(P,gp_Dir(newZ),gp_Dir(D1u)); |
534 | if (myDirection.Dot(Ax3.YDirection())<0.){ |
535 | Ax3.YReverse(); |
536 | } |
537 | return gp_Pln(Ax3); |
538 | } |
539 | |
540 | |
541 | //======================================================================= |
542 | //function : Cylinder |
543 | //purpose : |
544 | //======================================================================= |
545 | |
546 | gp_Cylinder Adaptor3d_SurfaceOfLinearExtrusion::Cylinder() const |
547 | { |
548 | Standard_NoSuchObject_Raise_if |
549 | (GetType() != GeomAbs_Cylinder, |
550 | "Adaptor3d_SurfaceOfLinearExtrusion::Cylinder"); |
551 | |
552 | gp_Circ C = myBasisCurve->Circle() ; |
553 | gp_Ax3 Ax3(C.Position()); |
554 | if(myDirection.Dot((C.Axis()).Direction())<0.){ |
555 | Ax3.ZReverse(); |
556 | } |
557 | return gp_Cylinder(Ax3,C.Radius()); |
558 | } |
559 | |
560 | //======================================================================= |
561 | //function : Cone |
562 | //purpose : |
563 | //======================================================================= |
564 | |
565 | gp_Cone Adaptor3d_SurfaceOfLinearExtrusion::Cone() const |
566 | { |
567 | Standard_NoSuchObject::Raise("Adaptor3d_SurfaceOfLinearExtrusion::Cone"); |
568 | return gp_Cone(); |
569 | } |
570 | |
571 | //======================================================================= |
572 | //function : Sphere |
573 | //purpose : |
574 | //======================================================================= |
575 | |
576 | gp_Sphere Adaptor3d_SurfaceOfLinearExtrusion::Sphere() const |
577 | { |
578 | Standard_NoSuchObject::Raise("Adaptor3d_SurfaceOfLinearExtrusion::Sphere"); |
579 | return gp_Sphere(); |
580 | } |
581 | |
582 | //======================================================================= |
583 | //function : Torus |
584 | //purpose : |
585 | //======================================================================= |
586 | |
587 | gp_Torus Adaptor3d_SurfaceOfLinearExtrusion::Torus() const |
588 | { |
589 | Standard_NoSuchObject::Raise("Adaptor3d_SurfaceOfLinearExtrusion::Torus"); |
590 | return gp_Torus(); |
591 | } |
592 | |
593 | |
594 | //======================================================================= |
595 | //function : Axis |
596 | //purpose : |
597 | //======================================================================= |
598 | |
599 | gp_Ax1 Adaptor3d_SurfaceOfLinearExtrusion::AxeOfRevolution() const |
600 | { |
601 | Standard_NoSuchObject::Raise("Adaptor3d_SurfaceOfLinearExtrusion::Axes"); |
602 | return gp_Ax1(); |
603 | } |
604 | |
605 | //======================================================================= |
606 | //function : UDegree |
607 | //purpose : |
608 | //======================================================================= |
609 | |
610 | Standard_Integer Adaptor3d_SurfaceOfLinearExtrusion::UDegree() const |
611 | { |
612 | return myBasisCurve -> Degree(); |
613 | } |
614 | //======================================================================= |
615 | //function : NbUPoles |
616 | //purpose : |
617 | //======================================================================= |
618 | |
619 | Standard_Integer Adaptor3d_SurfaceOfLinearExtrusion::NbUPoles() const |
620 | { |
621 | return myBasisCurve->NbPoles(); |
622 | } |
623 | //======================================================================= |
624 | //function : VDegree |
625 | //purpose : |
626 | //======================================================================= |
627 | |
628 | Standard_Integer Adaptor3d_SurfaceOfLinearExtrusion::VDegree() const |
629 | { |
630 | Standard_NoSuchObject::Raise("Adaptor3d_SurfaceOfLinearExtrusion::VDegree"); |
631 | return 0; |
632 | } |
633 | |
634 | //======================================================================= |
635 | //function : NbVPoles |
636 | //purpose : |
637 | //======================================================================= |
638 | |
639 | Standard_Integer Adaptor3d_SurfaceOfLinearExtrusion::NbVPoles() const |
640 | { |
641 | Standard_NoSuchObject::Raise("Adaptor3d_SurfaceOfLinearExtrusion::NbVPoles"); |
642 | return 0; |
643 | } |
644 | |
645 | //======================================================================= |
646 | //function : NbUKnots |
647 | //purpose : |
648 | //======================================================================= |
649 | |
650 | Standard_Integer Adaptor3d_SurfaceOfLinearExtrusion::NbUKnots() const |
651 | { |
652 | Standard_NoSuchObject::Raise |
653 | ("Adaptor3d_SurfaceOfLinearExtrusion::NbUKnots"); |
654 | return 0; |
655 | } |
656 | //======================================================================= |
657 | //function : NbVKnots |
658 | //purpose : |
659 | //======================================================================= |
660 | |
661 | Standard_Integer Adaptor3d_SurfaceOfLinearExtrusion::NbVKnots() const |
662 | { |
663 | Standard_NoSuchObject::Raise("Adaptor3d_SurfaceOfLinearExtrusion::NbVKnots"); |
664 | return 0; |
665 | } |
666 | //======================================================================= |
667 | //function : IsURational |
668 | //purpose : |
669 | //======================================================================= |
670 | |
671 | Standard_Boolean Adaptor3d_SurfaceOfLinearExtrusion::IsURational() const |
672 | { |
673 | Standard_NoSuchObject::Raise |
674 | ("Adaptor3d_SurfaceOfLinearExtrusion::IsURational"); |
675 | return Standard_False; |
676 | } |
677 | //======================================================================= |
678 | //function : IsVRational |
679 | //purpose : |
680 | //======================================================================= |
681 | |
682 | Standard_Boolean Adaptor3d_SurfaceOfLinearExtrusion::IsVRational() const |
683 | { |
684 | Standard_NoSuchObject::Raise |
685 | ("Adaptor3d_SurfaceOfLinearExtrusion::IsVRational"); |
686 | return Standard_False; |
687 | } |
688 | //======================================================================= |
689 | //function : Bezier |
690 | //purpose : |
691 | //======================================================================= |
692 | |
693 | |
694 | Handle(Geom_BezierSurface) Adaptor3d_SurfaceOfLinearExtrusion::Bezier() const |
695 | { |
696 | Standard_NoSuchObject::Raise("Adaptor3d_SurfaceOfLinearExtrusion::Axes"); |
697 | return Handle(Geom_BezierSurface)() ; |
698 | } |
699 | |
700 | //======================================================================= |
701 | //function : BSpline |
702 | //purpose : |
703 | //======================================================================= |
704 | |
705 | Handle(Geom_BSplineSurface) Adaptor3d_SurfaceOfLinearExtrusion::BSpline() const |
706 | { |
707 | Standard_NoSuchObject::Raise("Adaptor3d_SurfaceOfLinearExtrusion::Axes"); |
708 | return Handle(Geom_BSplineSurface)() ; |
709 | } |
710 | |
711 | //======================================================================= |
712 | //function : Direction |
713 | //purpose : |
714 | //======================================================================= |
715 | |
716 | gp_Dir Adaptor3d_SurfaceOfLinearExtrusion::Direction() const |
717 | { |
718 | return myDirection; |
719 | } |
720 | |
721 | //======================================================================= |
722 | //function : BasisCurve |
723 | //purpose : |
724 | //======================================================================= |
725 | |
726 | Handle(Adaptor3d_HCurve) Adaptor3d_SurfaceOfLinearExtrusion::BasisCurve() const |
727 | { |
728 | return myBasisCurve; |
729 | } |