Salome HOME
Update for gcc4.1
[modules/geom.git] / src / GEOMImpl / GEOMImpl_SketcherDriver.cxx
index b6075c0b4394996a69008e76c0317f96a23ace0c..2a6eb0a7bb7185c8cbdc2b3cac985604aaa68035 100644 (file)
@@ -15,7 +15,7 @@
 // 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/
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
 #include <Standard_Stream.hxx>
@@ -25,6 +25,9 @@
 #include <GEOMImpl_Types.hxx>
 #include <GEOM_Function.hxx>
 
+#include <GEOMImpl_IMeasureOperations.hxx>
+
+// OCCT Includes
 #include <BRepBuilderAPI_Transform.hxx>
 #include <BRep_Tool.hxx>
 #include <Geom_Plane.hxx>
@@ -100,13 +103,14 @@ Standard_Integer GEOMImpl_SketcherDriver::Execute(TFunction_Logbook& log) const
   {
     Handle(GEOM_Function) aRefFace = aCI.GetWorkingPlane();
     TopoDS_Shape aShape = aRefFace->GetValue();
-    if ( aShape.IsNull() || aShape.ShapeType() != TopAbs_FACE )
-      return 0;
-    Handle(Geom_Surface) aGS = BRep_Tool::Surface( TopoDS::Face( aShape ));
-    if ( aGS.IsNull() || !aGS->IsKind( STANDARD_TYPE( Geom_Plane )))
-      return 0;
-    Handle(Geom_Plane) aGPlane = Handle(Geom_Plane)::DownCast( aGS );
-    aWPlane = aGPlane->Pln().Position();
+    //if ( aShape.IsNull() || aShape.ShapeType() != TopAbs_FACE )
+    //  return 0;
+    //Handle(Geom_Surface) aGS = BRep_Tool::Surface( TopoDS::Face( aShape ));
+    //if ( aGS.IsNull() || !aGS->IsKind( STANDARD_TYPE( Geom_Plane )))
+    //  return 0;
+    //Handle(Geom_Plane) aGPlane = Handle(Geom_Plane)::DownCast( aGS );
+    //aWPlane = aGPlane->Pln().Position();
+    aWPlane = GEOMImpl_IMeasureOperations::GetPosition(aShape);
   }
   gp_Trsf aTrans;
   aTrans.SetTransformation(aWPlane);