From: jfa Date: Fri, 15 Dec 2017 11:38:58 +0000 (+0300) Subject: Fixing problems with 0023451 by JGV X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0f96e2e535c3f93be62012800f0f8d14dc49fb64;p=modules%2Fgeom.git Fixing problems with 0023451 by JGV --- diff --git a/src/BlockFix/BlockFix_BlockFixAPI.cxx b/src/BlockFix/BlockFix_BlockFixAPI.cxx index c6d6d3221..7dcb72080 100644 --- a/src/BlockFix/BlockFix_BlockFixAPI.cxx +++ b/src/BlockFix/BlockFix_BlockFixAPI.cxx @@ -29,6 +29,9 @@ #include #include #include +#include + +#include #include @@ -66,6 +69,30 @@ void BlockFix_BlockFixAPI::Perform() // with singularities on boundaries by filling myShape = BlockFix::RefillProblemFaces(myShape); + //Unification + // default values + Standard_Boolean anUFaces = Standard_True; + if (myOptimumNbFaces == -1) + anUFaces = Standard_False; + Standard_Boolean anUEdges = Standard_True; + Standard_Boolean anConBS = Standard_False; + Standard_Boolean isAllowInternal = Standard_False; + Standard_Boolean isSafeInputMode = Standard_True; + Standard_Real aLinTol = Precision::Confusion(); + Standard_Real aAngTol = Precision::Angular(); + TopTools_MapOfShape aMapOfShapes; + + ShapeUpgrade_UnifySameDomain Unifier; + Unifier.Initialize(myShape, anUEdges, anUFaces, anConBS); + Unifier.KeepShapes(aMapOfShapes); + Unifier.SetSafeInputMode(isSafeInputMode); + Unifier.AllowInternalEdges(isAllowInternal); + Unifier.SetLinearTolerance(aLinTol); + Unifier.SetAngularTolerance(aAngTol); + Unifier.Build(); + TopoDS_Shape aRes = Unifier.Shape(); + + /* // faces unification BlockFix_UnionFaces aFaceUnifier; aFaceUnifier.GetTolerance() = myTolerance; @@ -83,5 +110,7 @@ void BlockFix_BlockFixAPI::Perform() myShape = anEdgeUnifier.Perform(aResult,myTolerance); TopoDS_Shape aRes = BlockFix::FixRanges(myShape,myTolerance); + */ + myShape = aRes; }