Salome HOME
Mantis issue 0021483: EDF 1638 GEOM: Retrieve non blocks solids and faces from a...
[modules/geom.git] / src / GEOMImpl / GEOMImpl_PlaneDriver.cxx
index cc4a07a85aa39a21b59de95c8579a8a6ebc5bc90..e1968567b5e70a9ccf7cc06bcbff9ec2336f4fdd 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2011  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
@@ -29,6 +29,8 @@
 
 #include <GEOMImpl_IMeasureOperations.hxx>
 
+#include <Basics_OCCTVersion.hxx>
+
 // OCCT Includes
 #include <BRepBuilderAPI_MakeFace.hxx>
 #include <BRep_Tool.hxx>
@@ -125,7 +127,12 @@ Standard_Integer GEOMImpl_PlaneDriver::Execute(TFunction_Logbook& log) const
     if (gp_Vec(aP1, aP2).IsParallel(gp_Vec(aP1, aP3), Precision::Angular()))
       Standard_ConstructionError::Raise("Plane creation aborted: points lay on one line");
     GC_MakePlane aMakePlane (aP1, aP2, aP3);
+#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
+    aShape = BRepBuilderAPI_MakeFace(aMakePlane, -aSize, +aSize, -aSize, +aSize,
+                                     Precision::Confusion()).Shape();
+#else
     aShape = BRepBuilderAPI_MakeFace(aMakePlane, -aSize, +aSize, -aSize, +aSize).Shape();
+#endif
   } else if (aType == PLANE_FACE) {
     Handle(GEOM_Function) aRef = aPI.GetFace();
     TopoDS_Shape aRefShape = aRef->GetValue();