]> SALOME platform Git repositories - modules/geom.git/blobdiff - src/GEOMAlgo/GEOMAlgo_SurfaceTools.cxx
Salome HOME
0021672: [CEA 565] Dump Study from script
[modules/geom.git] / src / GEOMAlgo / GEOMAlgo_SurfaceTools.cxx
index f8073e40bca9cc52b4bfb6243185ccbbca984298..f9d0f036b44dd021fa0b206f89195bf5ab5b3b8a 100644 (file)
@@ -1,30 +1,31 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
 //
-//  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 //
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of the GNU Lesser General Public
-//  License as published by the Free Software Foundation; either
-//  version 2.1 of the License.
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
 //
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
 //
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
-//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File:        GEOMAlgo_SurfaceTools.cxx
 // Created:     Thu Jan 27 11:05:16 2005
 // Author:      Peter KURNEV
 //              <pkv@irinox>
 //
-#include <GEOMAlgo_SurfaceTools.ixx>
+#include <GEOMAlgo_SurfaceTools.hxx>
 
 #include <math.h>
 
@@ -44,7 +45,7 @@
 
 //=======================================================================
 //function : GetState
-//purpose  : 
+//purpose  :
 //=======================================================================
  Standard_Integer GEOMAlgo_SurfaceTools::GetState(const gp_Pnt& aP,
                                                   const GeomAdaptor_Surface& aGAS,
     aR=0.;
     aDp=GEOMAlgo_SurfaceTools::Distance(aP, aPln);
     break;
-  
-  case GeomAbs_Cylinder: 
+
+  case GeomAbs_Cylinder:
     aCyl=aGAS.Cylinder();
     aR=aCyl.Radius();
     aDp=GEOMAlgo_SurfaceTools::Distance(aP, aCyl);
-    break; 
+    break;
 
-  case GeomAbs_Sphere: 
+  case GeomAbs_Sphere:
     aSph=aGAS.Sphere();
     aR=aSph.Radius();
     aDp=GEOMAlgo_SurfaceTools::Distance(aP, aSph);
     break;
-    
+
   default:
     iErr=1; // unprocessed surface type
     break;
 }
 //=======================================================================
 //function : GetState
-//purpose  : 
+//purpose  :
 //=======================================================================
  Standard_Integer GEOMAlgo_SurfaceTools::GetState(const gp_Pnt& aP,
                                                   const Handle(Geom_Surface)& aSurf,
 }
 //=======================================================================
 //function : ReverseState
-//purpose  : 
+//purpose  :
 //=======================================================================
  TopAbs_State GEOMAlgo_SurfaceTools::ReverseState(const TopAbs_State aState)
 {
 }
 //=======================================================================
 //function : Distance
-//purpose  : 
+//purpose  :
 //=======================================================================
-Standard_Real GEOMAlgo_SurfaceTools::Distance(const gp_Pnt& aP, 
+Standard_Real GEOMAlgo_SurfaceTools::Distance(const gp_Pnt& aP,
                                               const gp_Sphere& aSph)
 {
   Standard_Real aD;
@@ -154,9 +155,9 @@ Standard_Real GEOMAlgo_SurfaceTools::Distance(const gp_Pnt& aP,
 }
 //=======================================================================
 //function : Distance
-//purpose  : 
+//purpose  :
 //=======================================================================
-Standard_Real GEOMAlgo_SurfaceTools::Distance(const gp_Pnt& aP, 
+Standard_Real GEOMAlgo_SurfaceTools::Distance(const gp_Pnt& aP,
                                               const gp_Cylinder& aCyl)
 {
   Standard_Real aD;
@@ -169,9 +170,9 @@ Standard_Real GEOMAlgo_SurfaceTools::Distance(const gp_Pnt& aP,
 }
 //=======================================================================
 //function : Distance
-//purpose  : 
+//purpose  :
 //=======================================================================
-Standard_Real GEOMAlgo_SurfaceTools::Distance(const gp_Pnt& aP, 
+Standard_Real GEOMAlgo_SurfaceTools::Distance(const gp_Pnt& aP,
                                               const gp_Pln& aPL)
 {
   Standard_Real aD;
@@ -187,7 +188,7 @@ Standard_Real GEOMAlgo_SurfaceTools::Distance(const gp_Pnt& aP,
 }
 //=======================================================================
 //function : IsCoaxial
-//purpose  : 
+//purpose  :
 //=======================================================================
 Standard_Boolean GEOMAlgo_SurfaceTools::IsCoaxial(const gp_Pnt& aP1,
                                                   const gp_Pnt& aP2,
@@ -212,7 +213,7 @@ Standard_Boolean GEOMAlgo_SurfaceTools::IsCoaxial(const gp_Pnt& aP1,
 }
 //=======================================================================
 //function : IsAnalytic
-//purpose  : 
+//purpose  :
 //=======================================================================
 Standard_Boolean GEOMAlgo_SurfaceTools::IsAnalytic(const Handle(Geom_Surface)& aSurf)
 {
@@ -222,14 +223,14 @@ Standard_Boolean GEOMAlgo_SurfaceTools::IsAnalytic(const Handle(Geom_Surface)& a
   //
   aGAS.Load(aSurf);
   aType=aGAS.GetType();
-  bRet=(aType==GeomAbs_Plane || 
+  bRet=(aType==GeomAbs_Plane ||
         aType==GeomAbs_Cylinder ||
         aType==GeomAbs_Sphere);
   return bRet;
 }
 //=======================================================================
 //function : IsConformState
-//purpose  : 
+//purpose  :
 //=======================================================================
 Standard_Boolean GEOMAlgo_SurfaceTools::IsConformState(const TopAbs_State aST1,
                                                        const GEOMAlgo_State aST2)