]> SALOME platform Git repositories - modules/geom.git/blobdiff - src/GEOMImpl/GEOMImpl_BlockDriver.cxx
Salome HOME
Bos #16182. Use OCCT algo UnifySameDomain. Fix for compatibility with old OCCT versions.
[modules/geom.git] / src / GEOMImpl / GEOMImpl_BlockDriver.cxx
index 92dbc1be252d438fb9db8f1399017d5b8de9bc01..65833607a8493b09b6117bf99675bc20c200e159 100644 (file)
 #include <Standard_TypeMismatch.hxx>
 #include <Standard_ConstructionError.hxx>
 
+#include <Basics_OCCTVersion.hxx>
+
 //=======================================================================
 //function : GetID
 //purpose  :
@@ -744,9 +746,11 @@ Standard_Integer GEOMImpl_BlockDriver::Execute(Handle(TFunction_Logbook)& log) c
         Standard_NullObject::Raise("Null Shape given");
       }
 
-      //BlockFix_UnionFaces aFaceUnifier;
-      //aFaceUnifier.GetOptimumNbFaces() = 0; // To force union faces.
-      //aShape = aFaceUnifier.Perform(aBlockOrComp);
+#if OCC_VERSION_LARGE < 0x07050301
+      BlockFix_UnionFaces aFaceUnifier;
+      aFaceUnifier.GetOptimumNbFaces() = 0; // To force union faces.
+      aShape = aFaceUnifier.Perform(aBlockOrComp);
+#else
       // Use OCCT algo ShapeUpgrade_UnifySameDomain instead of BlockFix_UnionFaces:
       Standard_Boolean isUnifyEdges = Standard_False;
       Standard_Boolean isUnifyFaces = Standard_True;
@@ -757,6 +761,7 @@ Standard_Integer GEOMImpl_BlockDriver::Execute(Handle(TFunction_Logbook)& log) c
       aUnifier.SetAngularTolerance(Precision::Confusion());
       aUnifier.Build();
       aShape = aUnifier.Shape();
+#endif
     } else { // unknown function type
       return 0;
     }