1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-05 18:16:23 +03:00

0028207: Unexpected result of the unify same domain algorithm

- Now algorithm of merging edges uses angular tolerance
This commit is contained in:
imn 2017-03-30 18:19:21 +03:00 committed by bugmaster
parent 83f32108f6
commit 90271a9003
2 changed files with 23 additions and 5 deletions

View File

@ -1852,8 +1852,6 @@ void ShapeUpgrade_UnifySameDomain::IntUnifyFaces(const TopoDS_Shape& theInpShape
//=======================================================================
void ShapeUpgrade_UnifySameDomain::UnifyEdges()
{
Standard_Real Tol = Precision::Confusion();
//Handle(ShapeBuild_ReShape) myContext = new ShapeBuild_ReShape;
Standard_Real myTolerance = Precision::Confusion();
TopoDS_Shape aResult = myContext->Apply(myShape);
@ -1896,7 +1894,7 @@ void ShapeUpgrade_UnifySameDomain::UnifyEdges()
SeqEdges.Append(expE.Current());
SharedVert.Clear();
CheckSharedVertices(SeqEdges, aMapEdgesVertex, myKeepShapes, SharedVert);
MergeSeq(SeqEdges, Tol, myConcatBSplines, myContext,
MergeSeq(SeqEdges, myAngTol, myConcatBSplines, myContext,
myOldToGeneratedShapes, SharedVert,
myRemovedShapes, NewEdges2OldEdges);
}
@ -1958,7 +1956,7 @@ void ShapeUpgrade_UnifySameDomain::UnifyEdges()
CheckSharedVertices(SeqEdges, aMapEdgesVertex, myKeepShapes, SharedVert);
//if (!SharedVert.IsEmpty())
// continue;
if ( MergeSeq(SeqEdges, Tol, myConcatBSplines, myContext,
if ( MergeSeq(SeqEdges, myAngTol, myConcatBSplines, myContext,
myOldToGeneratedShapes, SharedVert,
myRemovedShapes, NewEdges2OldEdges))
{
@ -1990,7 +1988,7 @@ void ShapeUpgrade_UnifySameDomain::UnifyEdges()
{
SharedVert.Clear();
CheckSharedVertices(aNonSharedEdges, aMapEdgesVertex, myKeepShapes, SharedVert);
if ( MergeSeq(aNonSharedEdges, Tol, myConcatBSplines, myContext,
if ( MergeSeq(aNonSharedEdges, myAngTol, myConcatBSplines, myContext,
myOldToGeneratedShapes, SharedVert,
myRemovedShapes, NewEdges2OldEdges))
{

View File

@ -0,0 +1,20 @@
puts "========"
puts "OCC28207"
puts "========"
puts ""
#########################################################
## Unexpected result of the unify same domain algorithm
#########################################################
restore [locate_data_file bug28207_face.brep] s1
unifysamedom result1 s1
checknbshapes result1 -face 1 -wire 1 -edge 984
unifysamedom result2 s1 -a 0.001
checknbshapes result2 -face 1 -wire 1 -edge 223
unifysamedom result s1 -a 1.0
checknbshapes result -face 1 -wire 1 -edge 4
checkview -display result -2d -path ${imagedir}/${test_image}.png