0027772: Foundation Classes - define Standard_Boolean using C++ type "bool" instead...
[occt.git] / src / Adaptor3d / Adaptor3d_IsoCurve.cxx
index 54744b0..75eed94 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
-#include <Adaptor3d_IsoCurve.ixx>
 
+#include <Adaptor3d_HCurve.hxx>
 #include <Adaptor3d_HIsoCurve.hxx>
-#include <Adaptor3d_HSurfaceOfRevolution.hxx>
+#include <Adaptor3d_HSurface.hxx>
+#include <Adaptor3d_IsoCurve.hxx>
+#include <BSplCLib.hxx>
+#include <BSplSLib.hxx>
+#include <ElCLib.hxx>
+#include <ElSLib.hxx>
+#include <Geom_BezierCurve.hxx>
 #include <Geom_BezierSurface.hxx>
+#include <Geom_BSplineCurve.hxx>
 #include <Geom_BSplineSurface.hxx>
 #include <GeomAbs_SurfaceType.hxx>
-#include <Standard_NoSuchObject.hxx>
-#include <Standard_NotImplemented.hxx>
 #include <gp_Ax2.hxx>
-#include <ElCLib.hxx>
-#include <ElSLib.hxx>
-#include <BSplCLib.hxx>
-#include <BSplSLib.hxx>
+#include <gp_Circ.hxx>
+#include <gp_Elips.hxx>
+#include <gp_Hypr.hxx>
+#include <gp_Lin.hxx>
+#include <gp_Parab.hxx>
+#include <gp_Pnt.hxx>
+#include <gp_Vec.hxx>
 #include <Precision.hxx>
+#include <Standard_DomainError.hxx>
+#include <Standard_NoSuchObject.hxx>
+#include <Standard_NotImplemented.hxx>
+#include <Standard_OutOfRange.hxx>
 #include <TColgp_Array1OfPnt.hxx>
 #include <TColgp_Array2OfPnt.hxx>
 
-
 //=======================================================================
 //function : Adaptor3d_IsoCurve
 //purpose  : 
 //=======================================================================
-
 Adaptor3d_IsoCurve::Adaptor3d_IsoCurve()
 : myIso      (GeomAbs_NoneIso),
   myFirst    (0.0),
@@ -766,14 +776,15 @@ gp_Circ Adaptor3d_IsoCurve::Circle() const
   case GeomAbs_SurfaceOfRevolution: 
     {
       if (myIso == GeomAbs_IsoV) {
-       gp_Ax1 Ax1 = mySurface->AxeOfRevolution();
-       gp_Vec DX(Ax1.Location(), Value(0));
-        if(DX.IsParallel(Ax1.Direction(),Precision::Angular())) {
-          return gp_Circ(gp_Ax2(Value(0), Ax1.Direction()),0);
+        const gp_Pnt aVal0 = Value (0.0);
+        gp_Ax1 Ax1 = mySurface->AxeOfRevolution();
+        if (gp_Lin (Ax1).Contains (aVal0, Precision::Confusion())) {
+          return gp_Circ(gp_Ax2(aVal0, Ax1.Direction()),0);
         }
         else {
+          gp_Vec DX(Ax1.Location(), aVal0);
           axes = gp_Ax3(Ax1.Location(), Ax1.Direction(), DX);
-          computeHR(axes,Value(0),h,radius);
+          computeHR(axes,aVal0,h,radius);
           gp_Vec VT = axes.Direction();
           axes.Translate(VT * h);
           return gp_Circ(axes.Ax2(),radius);
@@ -906,7 +917,7 @@ Standard_Integer Adaptor3d_IsoCurve::Degree() const
 
 Standard_Boolean Adaptor3d_IsoCurve::IsRational() const 
 {
-  Standard_Integer is_rational = Standard_False ;
+  Standard_Boolean is_rational = Standard_False;
   GeomAbs_SurfaceType type = mySurface->GetType() ;
   switch(type) {
   case GeomAbs_BezierSurface: