1 // Created on: 1993-04-21
2 // Created by: Bruno DUMORTIER
3 // Copyright (c) 1993-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16 
17 #include <GeomAdaptor_SurfaceOfRevolution.hxx>
18 
19 #include <Adaptor3d_Curve.hxx>
20 #include <ElCLib.hxx>
21 #include <GeomAdaptor_SurfaceOfRevolution.hxx>
22 #include <GeomEvaluator_SurfaceOfRevolution.hxx>
23 #include <Standard_NoSuchObject.hxx>
24 
IMPLEMENT_STANDARD_RTTIEXT(GeomAdaptor_SurfaceOfRevolution,GeomAdaptor_Surface)25 IMPLEMENT_STANDARD_RTTIEXT(GeomAdaptor_SurfaceOfRevolution, GeomAdaptor_Surface)
26 
27 //=======================================================================
28 //function : GeomAdaptor_SurfaceOfRevolution
29 //purpose  :
30 //=======================================================================
31 GeomAdaptor_SurfaceOfRevolution::GeomAdaptor_SurfaceOfRevolution()
32   : myHaveAxis(Standard_False)
33 {}
34 
35 //=======================================================================
36 //function : GeomAdaptor_SurfaceOfRevolution
37 //purpose  :
38 //=======================================================================
39 
GeomAdaptor_SurfaceOfRevolution(const Handle (Adaptor3d_Curve)& C)40 GeomAdaptor_SurfaceOfRevolution::GeomAdaptor_SurfaceOfRevolution(
41     const Handle(Adaptor3d_Curve)& C)
42   : myHaveAxis(Standard_False)
43 {
44   Load(C);
45 }
46 
47 //=======================================================================
48 //function : GeomAdaptor_SurfaceOfRevolution
49 //purpose  :
50 //=======================================================================
51 
GeomAdaptor_SurfaceOfRevolution(const Handle (Adaptor3d_Curve)& C,const gp_Ax1 & V)52 GeomAdaptor_SurfaceOfRevolution::GeomAdaptor_SurfaceOfRevolution(
53     const Handle(Adaptor3d_Curve)& C,
54     const gp_Ax1& V)
55   : myHaveAxis(Standard_False)
56 {
57   Load(C);
58   Load(V);
59 }
60 
61 //=======================================================================
62 //function : ShallowCopy
63 //purpose  :
64 //=======================================================================
65 
Handle(Adaptor3d_Surface)66 Handle(Adaptor3d_Surface) GeomAdaptor_SurfaceOfRevolution::ShallowCopy() const
67 {
68   Handle(GeomAdaptor_SurfaceOfRevolution) aCopy = new GeomAdaptor_SurfaceOfRevolution();
69 
70   if (!myBasisCurve.IsNull())
71   {
72     aCopy->myBasisCurve = myBasisCurve->ShallowCopy();
73   }
74   aCopy->myAxis       = myAxis;
75   aCopy->myHaveAxis   = myHaveAxis;
76   aCopy->myAxeRev     = myAxeRev;
77 
78   aCopy->mySurface        = mySurface;
79   aCopy->myUFirst         = myUFirst;
80   aCopy->myULast          = myULast;
81   aCopy->myVFirst         = myVFirst;
82   aCopy->myVLast          = myVLast;
83   aCopy->myTolU           = myTolU;
84   aCopy->myTolV           = myTolV;
85   aCopy->myBSplineSurface = myBSplineSurface;
86 
87   aCopy->mySurfaceType     = mySurfaceType;
88   if (!myNestedEvaluator.IsNull())
89   {
90     aCopy->myNestedEvaluator = myNestedEvaluator->ShallowCopy();
91   }
92 
93   return aCopy;
94 }
95 
96 //=======================================================================
97 //function : Load
98 //purpose  :
99 //=======================================================================
100 
Load(const Handle (Adaptor3d_Curve)& C)101 void GeomAdaptor_SurfaceOfRevolution::Load(const Handle(Adaptor3d_Curve)& C)
102 {
103   myBasisCurve = C;
104   if (myHaveAxis)
105     Load(myAxis); // to evaluate the new myAxeRev.
106 }
107 
108 //=======================================================================
109 //function : Load
110 //purpose  :
111 //=======================================================================
112 
Load(const gp_Ax1 & V)113 void GeomAdaptor_SurfaceOfRevolution::Load(const gp_Ax1& V)
114 {
115   myHaveAxis = Standard_True;
116   myAxis = V;
117 
118   mySurfaceType = GeomAbs_SurfaceOfRevolution;
119   myNestedEvaluator = new GeomEvaluator_SurfaceOfRevolution(myBasisCurve,
120       myAxis.Direction(), myAxis.Location());
121 
122   // Eval myAxeRev : axe of revolution ( Determination de Ox).
123   gp_Pnt P,Q;
124   gp_Pnt O = myAxis.Location();
125   gp_Dir Ox;
126   gp_Dir Oz = myAxis.Direction();
127   Standard_Boolean yrev = Standard_False;
128   if (myBasisCurve->GetType() == GeomAbs_Line) {
129     if((myBasisCurve->Line().Direction()).Dot(Oz) < 0.){
130       yrev = Standard_True;
131       Oz.Reverse();
132     }
133   }
134 
135   if (myBasisCurve->GetType() == GeomAbs_Circle) {
136     Q = P = (myBasisCurve->Circle()).Location();
137   }
138   else {
139     Standard_Real First = myBasisCurve->FirstParameter();
140     P = Value( 0., 0.);// ce qui ne veut pas dire grand chose
141     if ( GetType() == GeomAbs_Cone) {
142       if ( gp_Lin(myAxis).Distance(P) <= Precision::Confusion())
143         Q = ElCLib::Value(1.,myBasisCurve->Line());
144       else
145         Q = P;
146     }
147     else if (Precision::IsInfinite(First))
148       Q = P;
149     else
150       Q = Value( 0., First);
151   }
152 
153   gp_Dir DZ = myAxis.Direction();
154   O.SetXYZ( O.XYZ() + ( gp_Vec(O,P) * DZ) * DZ.XYZ());
155   if ( gp_Lin(myAxis).Distance(Q) > Precision::Confusion()) {
156     Ox = gp_Dir(Q.XYZ() - O.XYZ());
157   }
158   else {
159     Standard_Real First = myBasisCurve->FirstParameter();
160     Standard_Real Last  = myBasisCurve->LastParameter();
161     Standard_Integer Ratio = 1;
162     Standard_Real Dist;
163     gp_Pnt PP;
164     do {
165       PP = myBasisCurve->Value(First+(Last-First)/Ratio);
166       Dist = gp_Lin(myAxis).Distance(PP);
167       Ratio++;
168     }
169     while ( Dist < Precision::Confusion() && Ratio < 100);
170 
171     if ( Ratio >= 100 ) {
172       throw Standard_ConstructionError("Adaptor3d_SurfaceOfRevolution : Axe and meridian are confused");
173     }
174     Ox = ( (Oz^gp_Vec(PP.XYZ()-O.XYZ()))^Oz);
175   }
176 
177   myAxeRev = gp_Ax3(O,Oz,Ox);
178 
179   if (yrev) {
180     myAxeRev.YReverse();
181   }
182   else if (myBasisCurve->GetType() == GeomAbs_Circle) {
183     gp_Dir DC = (myBasisCurve->Circle()).Axis().Direction();
184     if ((Ox.Crossed(Oz)).Dot(DC) < 0.)  myAxeRev.ZReverse();
185   }
186 }
187 
188 //=======================================================================
189 //function : AxeOfRevolution
190 //purpose  :
191 //=======================================================================
192 
AxeOfRevolution() const193 gp_Ax1 GeomAdaptor_SurfaceOfRevolution::AxeOfRevolution() const
194 {
195   return myAxis;
196 }
197 
198 //=======================================================================
199 //function : FirstUParameter
200 //purpose  :
201 //=======================================================================
202 
FirstUParameter() const203 Standard_Real GeomAdaptor_SurfaceOfRevolution::FirstUParameter() const
204 {
205   return 0.;
206 }
207 
208 //=======================================================================
209 //function : LastUParameter
210 //purpose  :
211 //=======================================================================
212 
LastUParameter() const213 Standard_Real GeomAdaptor_SurfaceOfRevolution::LastUParameter() const
214 {
215   return 2*M_PI;
216 }
217 
218 //=======================================================================
219 //function : FirstVParameter
220 //purpose  :
221 //=======================================================================
222 
FirstVParameter() const223 Standard_Real GeomAdaptor_SurfaceOfRevolution::FirstVParameter() const
224 {
225   return myBasisCurve->FirstParameter();
226 }
227 
228 //=======================================================================
229 //function : LastVParameter
230 //purpose  :
231 //=======================================================================
232 
LastVParameter() const233 Standard_Real GeomAdaptor_SurfaceOfRevolution::LastVParameter() const
234 {
235   return myBasisCurve->LastParameter();
236 }
237 
238 //=======================================================================
239 //function : UContinuity
240 //purpose  :
241 //=======================================================================
242 
UContinuity() const243 GeomAbs_Shape GeomAdaptor_SurfaceOfRevolution::UContinuity() const
244 {
245   return GeomAbs_CN;
246 }
247 
248 //=======================================================================
249 //function : VContinuity
250 //purpose  :
251 //=======================================================================
252 
VContinuity() const253 GeomAbs_Shape GeomAdaptor_SurfaceOfRevolution::VContinuity() const
254 {
255   return myBasisCurve->Continuity();
256 }
257 
258 //=======================================================================
259 //function : NbUIntervals
260 //purpose  :
261 //=======================================================================
262 
NbUIntervals(const GeomAbs_Shape) const263 Standard_Integer GeomAdaptor_SurfaceOfRevolution::NbUIntervals(const GeomAbs_Shape ) const
264 {
265   return 1;
266 }
267 
268 //=======================================================================
269 //function : NbVIntervals
270 //purpose  :
271 //=======================================================================
272 
NbVIntervals(const GeomAbs_Shape S) const273 Standard_Integer GeomAdaptor_SurfaceOfRevolution::NbVIntervals(const GeomAbs_Shape S) const
274 {
275   return myBasisCurve->NbIntervals(S);
276 }
277 
278 //=======================================================================
279 //function : UIntervals
280 //purpose  :
281 //=======================================================================
282 
UIntervals(TColStd_Array1OfReal & T,const GeomAbs_Shape) const283 void GeomAdaptor_SurfaceOfRevolution::UIntervals(TColStd_Array1OfReal& T,
284                                                  const GeomAbs_Shape ) const
285 {
286   T(T.Lower()  ) = 0.;
287   T(T.Lower()+1) = 2*M_PI;
288 }
289 
290 
291 //=======================================================================
292 //function : VIntervals
293 //purpose  :
294 //=======================================================================
295 
VIntervals(TColStd_Array1OfReal & T,const GeomAbs_Shape S) const296 void GeomAdaptor_SurfaceOfRevolution::VIntervals(TColStd_Array1OfReal& T,
297                                                  const GeomAbs_Shape S) const
298 {
299   myBasisCurve->Intervals(T,S);
300 }
301 
302 
303 //=======================================================================
304 //function : UTrim
305 //purpose  :
306 //=======================================================================
307 
Handle(Adaptor3d_Surface)308 Handle(Adaptor3d_Surface) GeomAdaptor_SurfaceOfRevolution::UTrim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const
309 {
310   const Standard_Real Eps = Precision::PConfusion();
311   (void )Eps; (void )First; (void )Last; (void )Tol;
312   Standard_OutOfRange_Raise_if
313     (  Abs(First) > Eps || Abs(Last - 2.*M_PI) > Eps,
314      "GeomAdaptor_SurfaceOfRevolution : UTrim : Parameters out of range");
315 
316   Handle(GeomAdaptor_SurfaceOfRevolution) HR = new GeomAdaptor_SurfaceOfRevolution(
317       GeomAdaptor_SurfaceOfRevolution(myBasisCurve, myAxis));
318   return HR;
319 }
320 
321 
322 //=======================================================================
323 //function : VTrim
324 //purpose  :
325 //=======================================================================
326 
Handle(Adaptor3d_Surface)327 Handle(Adaptor3d_Surface) GeomAdaptor_SurfaceOfRevolution::VTrim
328 (const Standard_Real First,
329  const Standard_Real Last,
330  const Standard_Real Tol) const
331 {
332   Handle(Adaptor3d_Curve) HC = BasisCurve()->Trim(First,Last,Tol);
333   Handle(GeomAdaptor_SurfaceOfRevolution) HR = new GeomAdaptor_SurfaceOfRevolution(
334       GeomAdaptor_SurfaceOfRevolution(HC, myAxis));
335   return HR;
336 }
337 
338 
339 //=======================================================================
340 //function : IsUClosed
341 //purpose  :
342 //=======================================================================
343 
IsUClosed() const344 Standard_Boolean GeomAdaptor_SurfaceOfRevolution::IsUClosed() const
345 {
346   return Standard_True;
347 }
348 
349 //=======================================================================
350 //function : IsVClosed
351 //purpose  :
352 //=======================================================================
353 
IsVClosed() const354 Standard_Boolean GeomAdaptor_SurfaceOfRevolution::IsVClosed() const
355 {
356   return myBasisCurve->IsClosed();
357 }
358 
359 //=======================================================================
360 //function : IsUPeriodic
361 //purpose  :
362 //=======================================================================
363 
IsUPeriodic() const364 Standard_Boolean GeomAdaptor_SurfaceOfRevolution::IsUPeriodic() const
365 {
366   return Standard_True;
367 }
368 
369 //=======================================================================
370 //function : UPeriod
371 //purpose  :
372 //=======================================================================
373 
UPeriod() const374 Standard_Real GeomAdaptor_SurfaceOfRevolution::UPeriod() const
375 {
376   return 2*M_PI;
377 }
378 
379 //=======================================================================
380 //function : IsVPeriodic
381 //purpose  :
382 //=======================================================================
383 
IsVPeriodic() const384 Standard_Boolean GeomAdaptor_SurfaceOfRevolution::IsVPeriodic() const
385 {
386   return myBasisCurve->IsPeriodic();
387 }
388 
389 //=======================================================================
390 //function : VPeriod
391 //purpose  :
392 //=======================================================================
393 
VPeriod() const394 Standard_Real GeomAdaptor_SurfaceOfRevolution::VPeriod() const
395 {
396   return myBasisCurve->Period();
397 }
398 
399 //=======================================================================
400 //function : UResolution
401 //purpose  :
402 //=======================================================================
403 
UResolution(const Standard_Real R3d) const404 Standard_Real GeomAdaptor_SurfaceOfRevolution::UResolution
405 (const Standard_Real R3d) const
406 {
407   return Precision::Parametric(R3d);
408 }
409 
410 //=======================================================================
411 //function : VResolution
412 //purpose  :
413 //=======================================================================
414 
VResolution(const Standard_Real R3d) const415 Standard_Real GeomAdaptor_SurfaceOfRevolution::VResolution
416 (const Standard_Real R3d) const
417 {
418   return myBasisCurve->Resolution(R3d);
419 }
420 
421 //=======================================================================
422 //function : GetType
423 //purpose  :
424 //=======================================================================
425 
GetType() const426 GeomAbs_SurfaceType GeomAdaptor_SurfaceOfRevolution::GetType() const
427 {
428   Standard_Real TolConf = Precision::Confusion();
429   Standard_Real TolAng  = Precision::Angular();
430   Standard_Real TolConeSemiAng = Precision::Confusion();
431 
432   switch (myBasisCurve->GetType()) {
433   case GeomAbs_Line:    {
434     gp_Ax1 Axe = myBasisCurve->Line().Position();
435 
436     if (myAxis.IsParallel(Axe, TolAng))
437     {
438       gp_Pnt P = Value(0., 0.);
439       Standard_Real R = gp_Vec(myAxeRev.Location(), P) * myAxeRev.XDirection();
440       if (R > TolConf)
441       {
442         return GeomAbs_Cylinder;
443       }
444     }
445     else if (myAxis.IsNormal(Axe, TolAng))
446       return GeomAbs_Plane;
447     else
448     {
449       Standard_Real uf = myBasisCurve->FirstParameter();
450       Standard_Real ul = myBasisCurve->LastParameter();
451       Standard_Boolean istrim = (!Precision::IsInfinite(uf) &&
452                                  !Precision::IsInfinite(ul));
453       if(istrim)
454       {
455         gp_Pnt pf = myBasisCurve->Value(uf);
456         gp_Pnt pl = myBasisCurve->Value(ul);
457         Standard_Real len = pf.Distance(pl);
458         //on calcule la distance projetee sur l axe.
459         gp_Vec vlin(pf,pl);
460         gp_Vec vaxe(myAxis.Direction());
461         Standard_Real projlen = Abs(vaxe.Dot(vlin));
462         if ((len - projlen) <= TolConf)
463         {
464           gp_Pnt P = Value(0., 0.);
465           Standard_Real R = gp_Vec(myAxeRev.Location(), P) * myAxeRev.XDirection();
466           if (R > TolConf)
467           {
468             return GeomAbs_Cylinder;
469           }
470         }
471         else if (projlen <= TolConf)
472           return GeomAbs_Plane;
473       }
474       gp_Vec V(myAxis.Location(), myBasisCurve->Line().Location());
475       gp_Vec W(Axe.Direction());
476       gp_Vec AxisDir(myAxis.Direction());
477       Standard_Real proj = Abs(W.Dot(AxisDir));
478       if (Abs(V.DotCross(AxisDir, W)) <= TolConf &&
479         (proj >= TolConeSemiAng && proj <= 1. - TolConeSemiAng))
480       {
481         return GeomAbs_Cone;
482       }
483     }
484     break;
485   }//case GeomAbs_Line:
486   //
487   case GeomAbs_Circle:   {
488     Standard_Real MajorRadius, aR;
489     gp_Lin aLin(myAxis);
490     //
491     gp_Circ C = myBasisCurve->Circle();
492     const gp_Pnt& aLC = C.Location();
493     aR=C.Radius();
494     //
495 
496     if (!C.Position().IsCoplanar(myAxis, TolConf, TolAng))
497       return GeomAbs_SurfaceOfRevolution;
498     else if(aLin.Distance(aLC) <= TolConf)
499       return GeomAbs_Sphere;
500     else
501     {
502       MajorRadius = aLin.Distance(aLC);
503       if(MajorRadius > aR)
504       {
505         Standard_Real aT = 0., aDx, dX;
506         gp_Pnt aPx;
507 
508         aPx = ElCLib::Value(aT, C);
509         aDx = aLin.Distance(aPx);
510         dX = aDx - MajorRadius - aR;
511         if (dX < 0.)
512           dX = -dX;
513         if (dX < TolConf)
514           return GeomAbs_Torus;
515       }
516     }
517     break;
518   }
519   //
520   default:
521     break;
522   }
523 
524   return GeomAbs_SurfaceOfRevolution;
525 }
526 
527 //=======================================================================
528 //function : Plane
529 //purpose  :
530 //=======================================================================
531 
Plane() const532 gp_Pln GeomAdaptor_SurfaceOfRevolution::Plane() const
533 {
534   Standard_NoSuchObject_Raise_if
535     (GetType() != GeomAbs_Plane, "GeomAdaptor_SurfaceOfRevolution:Plane");
536 
537   gp_Ax3 Axe = myAxeRev;
538   gp_Pnt aPonCurve = Value(0., 0.);
539   Standard_Real aDot = (aPonCurve.XYZ() - myAxis.Location().XYZ()).Dot(myAxis.Direction().XYZ());
540 
541   gp_Pnt P(myAxis.Location().XYZ() + aDot * myAxis.Direction().XYZ());
542   Axe.SetLocation(P);
543   if (Axe.XDirection().Dot(myBasisCurve->Line().Direction()) >= -Precision::Confusion())
544     Axe.XReverse();
545 
546   return gp_Pln( Axe);
547 }
548 
549 //=======================================================================
550 //function : Cylinder
551 //purpose  :
552 //=======================================================================
553 
Cylinder() const554 gp_Cylinder GeomAdaptor_SurfaceOfRevolution::Cylinder() const
555 {
556   Standard_NoSuchObject_Raise_if
557     (GetType() != GeomAbs_Cylinder, "GeomAdaptor_SurfaceOfRevolution::Cylinder");
558 
559   gp_Pnt P = Value(0., 0.);
560   Standard_Real R = gp_Vec(myAxeRev.Location(), P) * myAxeRev.XDirection();
561   return gp_Cylinder(myAxeRev, R);
562 }
563 
564 //=======================================================================
565 //function : Cone
566 //purpose  :
567 //=======================================================================
568 
Cone() const569 gp_Cone GeomAdaptor_SurfaceOfRevolution::Cone() const
570 {
571   Standard_NoSuchObject_Raise_if
572     ( GetType() != GeomAbs_Cone, "GeomAdaptor_SurfaceOfRevolution:Cone");
573 
574   gp_Ax3 Axe = myAxeRev;
575   gp_Dir ldir = (myBasisCurve->Line()).Direction();
576   Standard_Real Angle = (Axe.Direction()).Angle(ldir);
577   gp_Pnt P0 = Value(0., 0.);
578   Standard_Real R = (Axe.Location()).Distance(P0);
579   if ( R >= Precision::Confusion()) {
580     gp_Pnt O = Axe.Location();
581     gp_Vec OP0(O,P0);
582     Standard_Real t = OP0.Dot(Axe.XDirection());
583     t /= ldir.Dot(Axe.XDirection());
584     OP0.Add(-t * gp_Vec(ldir));
585     if ( OP0.Dot(Axe.Direction()) > 0.) Angle = -Angle;
586   }
587   return gp_Cone( Axe, Angle, R);
588 }
589 
590 
591 //=======================================================================
592 //function : Sphere
593 //purpose  :
594 //=======================================================================
595 
Sphere() const596 gp_Sphere GeomAdaptor_SurfaceOfRevolution::Sphere() const
597 {
598   Standard_NoSuchObject_Raise_if
599     ( GetType() != GeomAbs_Sphere, "GeomAdaptor_SurfaceOfRevolution:Sphere");
600 
601   gp_Circ C = myBasisCurve->Circle();
602   gp_Ax3 Axe = myAxeRev;
603   Axe.SetLocation(C.Location());
604   return gp_Sphere(Axe, C.Radius());
605 }
606 
607 
608 //=======================================================================
609 //function : Torus
610 //purpose  :
611 //=======================================================================
612 
Torus() const613 gp_Torus GeomAdaptor_SurfaceOfRevolution::Torus() const
614 {
615   Standard_NoSuchObject_Raise_if
616     (GetType() != GeomAbs_Torus, "GeomAdaptor_SurfaceOfRevolution:Torus");
617 
618   gp_Circ C = myBasisCurve->Circle();
619   Standard_Real MajorRadius = gp_Lin(myAxis).Distance(C.Location());
620   return gp_Torus(myAxeRev, MajorRadius, C.Radius());
621 }
622 
623 //=======================================================================
624 //function : VDegree
625 //purpose  :
626 //=======================================================================
627 
VDegree() const628 Standard_Integer GeomAdaptor_SurfaceOfRevolution::VDegree() const
629 {
630   return myBasisCurve->Degree();
631 }
632 
633 //=======================================================================
634 //function : NbVPoles
635 //purpose  :
636 //=======================================================================
637 
NbVPoles() const638 Standard_Integer GeomAdaptor_SurfaceOfRevolution::NbVPoles() const
639 {
640   return myBasisCurve->NbPoles();
641 }
642 
643 //=======================================================================
644 //function : NbVKnots
645 //purpose  :
646 //=======================================================================
647 
NbVKnots() const648 Standard_Integer GeomAdaptor_SurfaceOfRevolution::NbVKnots() const
649 {
650   throw Standard_NoSuchObject("GeomAdaptor_SurfaceOfRevolution::NbVKnots");
651 }
652 
653 
654 
655 //=======================================================================
656 //function : IsURational
657 //purpose  :
658 //=======================================================================
659 
IsURational() const660 Standard_Boolean GeomAdaptor_SurfaceOfRevolution::IsURational() const
661 {
662   throw Standard_NoSuchObject("GeomAdaptor_SurfaceOfRevolution::IsURational");
663 }
664 
665 //=======================================================================
666 //function : IsVRational
667 //purpose  :
668 //=======================================================================
669 
IsVRational() const670 Standard_Boolean GeomAdaptor_SurfaceOfRevolution::IsVRational() const
671 {
672   throw Standard_NoSuchObject("GeomAdaptor_SurfaceOfRevolution::IsVRational");
673 }
674 
675 
676 //=======================================================================
677 //function : Bezier
678 //purpose  :
679 //=======================================================================
680 
Handle(Geom_BezierSurface)681 Handle(Geom_BezierSurface) GeomAdaptor_SurfaceOfRevolution::Bezier() const
682 {
683   throw Standard_NoSuchObject("GeomAdaptor_SurfaceOfRevolution::Bezier");
684 }
685 
686 
687 //=======================================================================
688 //function : BSpline
689 //purpose  :
690 //=======================================================================
691 
Handle(Geom_BSplineSurface)692 Handle(Geom_BSplineSurface) GeomAdaptor_SurfaceOfRevolution::BSpline() const
693 {
694   throw Standard_NoSuchObject("GeomAdaptor_SurfaceOfRevolution::BSpline");
695 }
696 
697 //=======================================================================
698 //function : Axis
699 //purpose  :
700 //=======================================================================
701 
Axis() const702 const gp_Ax3& GeomAdaptor_SurfaceOfRevolution::Axis() const
703 {
704   return myAxeRev;
705 }
706 
707 //=======================================================================
708 //function : BasisCurve
709 //purpose  :
710 //=======================================================================
711 
Handle(Adaptor3d_Curve)712 Handle(Adaptor3d_Curve) GeomAdaptor_SurfaceOfRevolution::BasisCurve() const
713 {
714   return myBasisCurve;
715 }
716