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 = |
196 | myBasisCurve->Trim(First, |
197 | Last, |
198 | Tol) ; |
199 | Adaptor3d_SurfaceOfLinearExtrusion * SurfacePtr = |
200 | new Adaptor3d_SurfaceOfLinearExtrusion(newBasisCurve, myDirection) ; |
201 | |
202 | return new Adaptor3d_HSurfaceOfLinearExtrusion(*SurfacePtr); |
203 | } |
204 | |
205 | //======================================================================= |
206 | //function : UTrim |
207 | //purpose : |
208 | //======================================================================= |
209 | |
210 | Handle(Adaptor3d_HSurface) Adaptor3d_SurfaceOfLinearExtrusion::UTrim |
211 | //(const Standard_Real First , |
212 | // const Standard_Real Last, |
213 | // const Standard_Real Tol) const |
214 | (const Standard_Real , |
215 | const Standard_Real , |
216 | const Standard_Real ) const |
217 | { |
218 | Adaptor3d_SurfaceOfLinearExtrusion * SurfacePtr = |
219 | new Adaptor3d_SurfaceOfLinearExtrusion(myBasisCurve,myDirection); |
220 | |
221 | return new Adaptor3d_HSurfaceOfLinearExtrusion(*SurfacePtr) ; |
222 | } |
223 | |
224 | //======================================================================= |
225 | //function : IsUClosed |
226 | //purpose : |
227 | //======================================================================= |
228 | |
229 | Standard_Boolean Adaptor3d_SurfaceOfLinearExtrusion::IsUClosed() const |
230 | { |
231 | return myBasisCurve->IsClosed(); |
232 | } |
233 | |
234 | //======================================================================= |
235 | //function : IsVClosed |
236 | //purpose : |
237 | //======================================================================= |
238 | |
239 | Standard_Boolean Adaptor3d_SurfaceOfLinearExtrusion::IsVClosed() const |
240 | { |
241 | return Standard_True; |
242 | } |
243 | |
244 | //======================================================================= |
245 | //function : IsUPeriodic |
246 | //purpose : |
247 | //======================================================================= |
248 | |
249 | Standard_Boolean Adaptor3d_SurfaceOfLinearExtrusion::IsUPeriodic() const |
250 | { |
251 | return myBasisCurve->IsPeriodic(); |
252 | } |
253 | |
254 | //======================================================================= |
255 | //function : UPeriod |
256 | //purpose : |
257 | //======================================================================= |
258 | |
259 | Standard_Real Adaptor3d_SurfaceOfLinearExtrusion::UPeriod() const |
260 | { |
261 | return myBasisCurve->Period() ; |
262 | } |
263 | |
264 | //======================================================================= |
265 | //function : IsVPeriodic |
266 | //purpose : |
267 | //======================================================================= |
268 | |
269 | Standard_Boolean Adaptor3d_SurfaceOfLinearExtrusion::IsVPeriodic() const |
270 | { |
271 | return Standard_False; |
272 | } |
273 | |
274 | //======================================================================= |
275 | //function : VPeriod |
276 | //purpose : |
277 | //======================================================================= |
278 | |
279 | Standard_Real Adaptor3d_SurfaceOfLinearExtrusion::VPeriod() const |
280 | { |
281 | Standard_DomainError::Raise("Adaptor3d_SurfaceOfLinearExtrusion::VPeriod"); |
282 | return 0.0e0 ; |
283 | } |
284 | |
285 | //======================================================================= |
286 | //function : Value |
287 | //purpose : |
288 | //======================================================================= |
289 | |
290 | gp_Pnt Adaptor3d_SurfaceOfLinearExtrusion::Value(const Standard_Real U, |
291 | const Standard_Real V) |
292 | const |
293 | { |
294 | gp_Pnt P; |
295 | P = myBasisCurve->Value(U); |
296 | P.Translate( V * gp_Vec(myDirection)); |
297 | return P; |
298 | } |
299 | |
300 | //======================================================================= |
301 | //function : D0 |
302 | //purpose : |
303 | //======================================================================= |
304 | |
305 | void Adaptor3d_SurfaceOfLinearExtrusion::D0(const Standard_Real U, |
306 | const Standard_Real V, |
307 | gp_Pnt& P) const |
308 | { |
309 | myBasisCurve->D0(U,P); |
310 | P.Translate( V * gp_Vec(myDirection)); |
311 | } |
312 | |
313 | //======================================================================= |
314 | //function : D1 |
315 | //purpose : |
316 | //======================================================================= |
317 | |
318 | void Adaptor3d_SurfaceOfLinearExtrusion::D1(const Standard_Real U, |
319 | const Standard_Real V, |
320 | gp_Pnt& P, |
321 | gp_Vec& D1U, |
322 | gp_Vec& D1V) const |
323 | { |
324 | myBasisCurve->D1(U,P,D1U); |
325 | D0(U,V,P); |
326 | D1V = gp_Vec(myDirection); |
327 | } |
328 | |
329 | //======================================================================= |
330 | //function : D2 |
331 | //purpose : |
332 | //======================================================================= |
333 | |
334 | void Adaptor3d_SurfaceOfLinearExtrusion::D2(const Standard_Real U, |
335 | const Standard_Real V, |
336 | gp_Pnt& P, |
337 | gp_Vec& D1U, gp_Vec& D1V, |
338 | gp_Vec& D2U, gp_Vec& D2V, |
339 | gp_Vec& D2UV) const |
340 | { |
341 | myBasisCurve->D2(U,P,D1U,D2U); |
342 | D1V = gp_Vec(myDirection); |
343 | D2V.SetCoord( 0., 0., 0.); |
344 | D2UV.SetCoord( 0., 0., 0.); |
345 | D0(U,V,P); |
346 | } |
347 | |
348 | //======================================================================= |
349 | //function : D3 |
350 | //purpose : |
351 | //======================================================================= |
352 | |
353 | void Adaptor3d_SurfaceOfLinearExtrusion::D3(const Standard_Real U, |
354 | const Standard_Real V, |
355 | gp_Pnt& P, |
356 | gp_Vec& D1U, gp_Vec& D1V, |
357 | gp_Vec& D2U, gp_Vec& D2V, |
358 | gp_Vec& D2UV, |
359 | gp_Vec& D3U, gp_Vec& D3V, |
360 | gp_Vec& D3UUV, gp_Vec& D3UVV) const |
361 | { |
362 | myBasisCurve->D3(U,P,D1U,D2U,D3U); |
363 | D1V = gp_Vec(myDirection); |
364 | D2V.SetCoord( 0., 0., 0.); |
365 | D2UV.SetCoord( 0., 0., 0.); |
366 | D3V.SetCoord( 0., 0., 0.); |
367 | D3UUV.SetCoord( 0., 0., 0.); |
368 | D3UVV.SetCoord( 0., 0., 0.); |
369 | D0(U,V,P); |
370 | } |
371 | |
372 | //======================================================================= |
373 | //function : DN |
374 | //purpose : |
375 | //======================================================================= |
376 | |
377 | gp_Vec Adaptor3d_SurfaceOfLinearExtrusion::DN |
378 | (const Standard_Real U, |
379 | // const Standard_Real V, |
380 | const Standard_Real , |
381 | const Standard_Integer NU, |
382 | const Standard_Integer NV) const |
383 | { |
384 | if ( (NU+NV)<1 || NU<0 || NV<0) { |
385 | Standard_DomainError::Raise("Adaptor3d_SurfaceOfLinearExtrusion::DN"); |
386 | return gp_Vec(); |
387 | } |
388 | else { |
389 | if (NU == 0 && NV ==1) return gp_Vec( myDirection); |
390 | else if (NV == 0) return myBasisCurve->DN(U,NU); |
391 | else return gp_Vec( 0., 0., 0.); |
392 | } |
393 | } |
394 | |
395 | //======================================================================= |
396 | //function : UResolution |
397 | //purpose : |
398 | //======================================================================= |
399 | |
400 | Standard_Real Adaptor3d_SurfaceOfLinearExtrusion::UResolution |
401 | (const Standard_Real R3d) const |
402 | { |
403 | return myBasisCurve->Resolution(R3d); |
404 | } |
405 | |
406 | //======================================================================= |
407 | //function : VResolution |
408 | //purpose : |
409 | //======================================================================= |
410 | |
411 | Standard_Real Adaptor3d_SurfaceOfLinearExtrusion::VResolution |
412 | (const Standard_Real R3d) const |
413 | { |
414 | return R3d; |
415 | } |
416 | |
417 | //======================================================================= |
418 | //function : GetType |
419 | //purpose : |
420 | //======================================================================= |
421 | |
422 | GeomAbs_SurfaceType Adaptor3d_SurfaceOfLinearExtrusion::GetType() const |
423 | { |
424 | switch ( myBasisCurve->GetType()) { |
425 | |
426 | case GeomAbs_Line: |
427 | { |
428 | gp_Dir D = myBasisCurve->Line().Direction(); |
429 | if (myDirection.IsParallel( D, Precision::Angular())) { |
430 | return GeomAbs_SurfaceOfExtrusion; |
431 | } |
432 | else { |
433 | return GeomAbs_Plane; |
434 | } |
435 | break; |
436 | } |
437 | |
438 | case GeomAbs_Circle: |
439 | { |
440 | gp_Dir D = (myBasisCurve->Circle()).Axis().Direction(); |
441 | if ( myDirection.IsParallel( D, Precision::Angular())) { |
442 | return GeomAbs_Cylinder; |
443 | } |
444 | // JAG 10.11.95 |
445 | else if (myDirection.IsNormal(D, Precision::Angular())) { |
446 | return GeomAbs_Plane; |
447 | } |
448 | else { |
449 | return GeomAbs_SurfaceOfExtrusion; |
450 | } |
451 | break; |
452 | } |
453 | // JAG 10.11.95 |
454 | |
455 | case GeomAbs_Ellipse: |
456 | { |
457 | gp_Dir D = (myBasisCurve->Ellipse()).Axis().Direction(); |
458 | if (myDirection.IsNormal(D, Precision::Angular())) { |
459 | return GeomAbs_Plane; |
460 | } |
461 | else { |
462 | return GeomAbs_SurfaceOfExtrusion; |
463 | } |
464 | break; |
465 | } |
466 | |
467 | case GeomAbs_Parabola: |
468 | { |
469 | gp_Dir D = (myBasisCurve->Parabola()).Axis().Direction(); |
470 | if (myDirection.IsNormal(D, Precision::Angular())) { |
471 | return GeomAbs_Plane; |
472 | } |
473 | else { |
474 | return GeomAbs_SurfaceOfExtrusion; |
475 | } |
476 | break; |
477 | } |
478 | |
479 | case GeomAbs_Hyperbola: |
480 | { |
481 | gp_Dir D = (myBasisCurve->Hyperbola()).Axis().Direction(); |
482 | if (myDirection.IsNormal(D, Precision::Angular())) { |
483 | return GeomAbs_Plane; |
484 | } |
485 | else { |
486 | return GeomAbs_SurfaceOfExtrusion; |
487 | } |
488 | break; |
489 | } |
490 | |
491 | default: |
492 | return GeomAbs_SurfaceOfExtrusion; |
493 | |
494 | } |
495 | |
496 | // portage WNT |
497 | return GeomAbs_SurfaceOfExtrusion; |
498 | } |
499 | |
500 | //======================================================================= |
501 | //function : Plane |
502 | //purpose : |
503 | //======================================================================= |
504 | |
505 | gp_Pln Adaptor3d_SurfaceOfLinearExtrusion::Plane() const |
506 | { |
507 | Standard_NoSuchObject_Raise_if (GetType() != GeomAbs_Plane, |
508 | "Adaptor3d_SurfaceOfLinearExtrusion::Plane"); |
509 | /* |
510 | gp_Pnt P; |
511 | gp_Vec Ox, Oy; |
512 | D1( 0., 0., P, Ox, Oy); |
513 | gp_Ax3 Ax3(P,gp_Dir(Ox^Oy),gp_Dir(Ox)); |
514 | if (gp_Dir(Oy).Dot(Ax3.YDirection())<0.){ |
515 | Ax3.YReverse(); |
516 | } |
517 | return gp_Pln(Ax3); |
518 | */ |
519 | |
520 | gp_Pnt P; |
521 | gp_Vec D1u, newZ; |
522 | Standard_Real UFirst = myBasisCurve->FirstParameter(); |
523 | Standard_Real ULast = myBasisCurve->LastParameter(); |
524 | if (Precision::IsNegativeInfinite(UFirst) && |
525 | Precision::IsPositiveInfinite(ULast)) { |
526 | UFirst = -100.; |
527 | ULast = 100.; |
528 | } |
529 | else if (Precision::IsNegativeInfinite(UFirst)) { |
530 | UFirst = ULast - 200.; |
531 | } |
532 | else if (Precision::IsPositiveInfinite(ULast)) { |
533 | ULast = UFirst + 200.; |
534 | } |
535 | Standard_Real deltau = (ULast-UFirst)/20.; |
536 | for (Standard_Integer i =1; i<=21; i++) { |
537 | Standard_Real prm = UFirst + (i-1)*deltau; |
538 | myBasisCurve->D1(prm,P,D1u); |
539 | newZ = D1u.Normalized().Crossed(myDirection); |
540 | if (newZ.Magnitude() > 1.e-12) break; |
541 | } |
542 | gp_Ax3 Ax3(P,gp_Dir(newZ),gp_Dir(D1u)); |
543 | if (myDirection.Dot(Ax3.YDirection())<0.){ |
544 | Ax3.YReverse(); |
545 | } |
546 | return gp_Pln(Ax3); |
547 | } |
548 | |
549 | |
550 | //======================================================================= |
551 | //function : Cylinder |
552 | //purpose : |
553 | //======================================================================= |
554 | |
555 | gp_Cylinder Adaptor3d_SurfaceOfLinearExtrusion::Cylinder() const |
556 | { |
557 | Standard_NoSuchObject_Raise_if |
558 | (GetType() != GeomAbs_Cylinder, |
559 | "Adaptor3d_SurfaceOfLinearExtrusion::Cylinder"); |
560 | |
561 | gp_Circ C = myBasisCurve->Circle() ; |
562 | gp_Ax3 Ax3(C.Position()); |
563 | if(myDirection.Dot((C.Axis()).Direction())<0.){ |
564 | Ax3.ZReverse(); |
565 | } |
566 | return gp_Cylinder(Ax3,C.Radius()); |
567 | } |
568 | |
569 | //======================================================================= |
570 | //function : Cone |
571 | //purpose : |
572 | //======================================================================= |
573 | |
574 | gp_Cone Adaptor3d_SurfaceOfLinearExtrusion::Cone() const |
575 | { |
576 | Standard_NoSuchObject::Raise("Adaptor3d_SurfaceOfLinearExtrusion::Cone"); |
577 | return gp_Cone(); |
578 | } |
579 | |
580 | //======================================================================= |
581 | //function : Sphere |
582 | //purpose : |
583 | //======================================================================= |
584 | |
585 | gp_Sphere Adaptor3d_SurfaceOfLinearExtrusion::Sphere() const |
586 | { |
587 | Standard_NoSuchObject::Raise("Adaptor3d_SurfaceOfLinearExtrusion::Sphere"); |
588 | return gp_Sphere(); |
589 | } |
590 | |
591 | //======================================================================= |
592 | //function : Torus |
593 | //purpose : |
594 | //======================================================================= |
595 | |
596 | gp_Torus Adaptor3d_SurfaceOfLinearExtrusion::Torus() const |
597 | { |
598 | Standard_NoSuchObject::Raise("Adaptor3d_SurfaceOfLinearExtrusion::Torus"); |
599 | return gp_Torus(); |
600 | } |
601 | |
602 | |
603 | //======================================================================= |
604 | //function : Axis |
605 | //purpose : |
606 | //======================================================================= |
607 | |
608 | gp_Ax1 Adaptor3d_SurfaceOfLinearExtrusion::AxeOfRevolution() const |
609 | { |
610 | Standard_NoSuchObject::Raise("Adaptor3d_SurfaceOfLinearExtrusion::Axes"); |
611 | return gp_Ax1(); |
612 | } |
613 | |
614 | //======================================================================= |
615 | //function : UDegree |
616 | //purpose : |
617 | //======================================================================= |
618 | |
619 | Standard_Integer Adaptor3d_SurfaceOfLinearExtrusion::UDegree() const |
620 | { |
621 | return myBasisCurve -> Degree(); |
622 | } |
623 | //======================================================================= |
624 | //function : NbUPoles |
625 | //purpose : |
626 | //======================================================================= |
627 | |
628 | Standard_Integer Adaptor3d_SurfaceOfLinearExtrusion::NbUPoles() const |
629 | { |
630 | return myBasisCurve->NbPoles(); |
631 | } |
632 | //======================================================================= |
633 | //function : VDegree |
634 | //purpose : |
635 | //======================================================================= |
636 | |
637 | Standard_Integer Adaptor3d_SurfaceOfLinearExtrusion::VDegree() const |
638 | { |
639 | Standard_NoSuchObject::Raise("Adaptor3d_SurfaceOfLinearExtrusion::VDegree"); |
640 | return 0; |
641 | } |
642 | |
643 | //======================================================================= |
644 | //function : NbVPoles |
645 | //purpose : |
646 | //======================================================================= |
647 | |
648 | Standard_Integer Adaptor3d_SurfaceOfLinearExtrusion::NbVPoles() const |
649 | { |
650 | Standard_NoSuchObject::Raise("Adaptor3d_SurfaceOfLinearExtrusion::NbVPoles"); |
651 | return 0; |
652 | } |
653 | |
654 | //======================================================================= |
655 | //function : NbUKnots |
656 | //purpose : |
657 | //======================================================================= |
658 | |
659 | Standard_Integer Adaptor3d_SurfaceOfLinearExtrusion::NbUKnots() const |
660 | { |
661 | Standard_NoSuchObject::Raise |
662 | ("Adaptor3d_SurfaceOfLinearExtrusion::NbUKnots"); |
663 | return 0; |
664 | } |
665 | //======================================================================= |
666 | //function : NbVKnots |
667 | //purpose : |
668 | //======================================================================= |
669 | |
670 | Standard_Integer Adaptor3d_SurfaceOfLinearExtrusion::NbVKnots() const |
671 | { |
672 | Standard_NoSuchObject::Raise("Adaptor3d_SurfaceOfLinearExtrusion::NbVKnots"); |
673 | return 0; |
674 | } |
675 | //======================================================================= |
676 | //function : IsURational |
677 | //purpose : |
678 | //======================================================================= |
679 | |
680 | Standard_Boolean Adaptor3d_SurfaceOfLinearExtrusion::IsURational() const |
681 | { |
682 | Standard_NoSuchObject::Raise |
683 | ("Adaptor3d_SurfaceOfLinearExtrusion::IsURational"); |
684 | return Standard_False; |
685 | } |
686 | //======================================================================= |
687 | //function : IsVRational |
688 | //purpose : |
689 | //======================================================================= |
690 | |
691 | Standard_Boolean Adaptor3d_SurfaceOfLinearExtrusion::IsVRational() const |
692 | { |
693 | Standard_NoSuchObject::Raise |
694 | ("Adaptor3d_SurfaceOfLinearExtrusion::IsVRational"); |
695 | return Standard_False; |
696 | } |
697 | //======================================================================= |
698 | //function : Bezier |
699 | //purpose : |
700 | //======================================================================= |
701 | |
702 | |
703 | Handle(Geom_BezierSurface) Adaptor3d_SurfaceOfLinearExtrusion::Bezier() const |
704 | { |
705 | Standard_NoSuchObject::Raise("Adaptor3d_SurfaceOfLinearExtrusion::Axes"); |
706 | return Handle(Geom_BezierSurface)() ; |
707 | } |
708 | |
709 | //======================================================================= |
710 | //function : BSpline |
711 | //purpose : |
712 | //======================================================================= |
713 | |
714 | Handle(Geom_BSplineSurface) Adaptor3d_SurfaceOfLinearExtrusion::BSpline() const |
715 | { |
716 | Standard_NoSuchObject::Raise("Adaptor3d_SurfaceOfLinearExtrusion::Axes"); |
717 | return Handle(Geom_BSplineSurface)() ; |
718 | } |
719 | |
720 | //======================================================================= |
721 | //function : Direction |
722 | //purpose : |
723 | //======================================================================= |
724 | |
725 | gp_Dir Adaptor3d_SurfaceOfLinearExtrusion::Direction() const |
726 | { |
727 | return myDirection; |
728 | } |
729 | |
730 | //======================================================================= |
731 | //function : BasisCurve |
732 | //purpose : |
733 | //======================================================================= |
734 | |
735 | Handle(Adaptor3d_HCurve) Adaptor3d_SurfaceOfLinearExtrusion::BasisCurve() const |
736 | { |
737 | return myBasisCurve; |
738 | } |