mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-03-27 11:08:36 +05:00
Fixing problems with 0023451 by JGV
This commit is contained in:
parent
0ba64ea099
commit
0f96e2e535
@ -29,6 +29,9 @@
|
|||||||
#include <BlockFix.hxx>
|
#include <BlockFix.hxx>
|
||||||
#include <BlockFix_UnionFaces.hxx>
|
#include <BlockFix_UnionFaces.hxx>
|
||||||
#include <BlockFix_UnionEdges.hxx>
|
#include <BlockFix_UnionEdges.hxx>
|
||||||
|
#include <ShapeUpgrade_UnifySameDomain.hxx>
|
||||||
|
|
||||||
|
#include <Basics_OCCTVersion.hxx>
|
||||||
|
|
||||||
#include <ShapeUpgrade_RemoveLocations.hxx>
|
#include <ShapeUpgrade_RemoveLocations.hxx>
|
||||||
|
|
||||||
@ -66,6 +69,30 @@ void BlockFix_BlockFixAPI::Perform()
|
|||||||
// with singularities on boundaries by filling
|
// with singularities on boundaries by filling
|
||||||
myShape = BlockFix::RefillProblemFaces(myShape);
|
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
|
// faces unification
|
||||||
BlockFix_UnionFaces aFaceUnifier;
|
BlockFix_UnionFaces aFaceUnifier;
|
||||||
aFaceUnifier.GetTolerance() = myTolerance;
|
aFaceUnifier.GetTolerance() = myTolerance;
|
||||||
@ -83,5 +110,7 @@ void BlockFix_BlockFixAPI::Perform()
|
|||||||
myShape = anEdgeUnifier.Perform(aResult,myTolerance);
|
myShape = anEdgeUnifier.Perform(aResult,myTolerance);
|
||||||
|
|
||||||
TopoDS_Shape aRes = BlockFix::FixRanges(myShape,myTolerance);
|
TopoDS_Shape aRes = BlockFix::FixRanges(myShape,myTolerance);
|
||||||
|
*/
|
||||||
|
|
||||||
myShape = aRes;
|
myShape = aRes;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user