From: imn Date: Thu, 30 Mar 2017 15:19:21 +0000 (+0300) Subject: 0028207: Unexpected result of the unify same domain algorithm X-Git-Tag: V7_2_0_beta~196 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=90271a90030d82d795b1ea3f051d2d72756fd4e1;p=occt.git 0028207: Unexpected result of the unify same domain algorithm - Now algorithm of merging edges uses angular tolerance --- diff --git a/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx b/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx index 7286e158b9..312c54402a 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx @@ -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)) { diff --git a/tests/bugs/modalg_6/bug28207 b/tests/bugs/modalg_6/bug28207 new file mode 100644 index 0000000000..feb2196a28 --- /dev/null +++ b/tests/bugs/modalg_6/bug28207 @@ -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 \ No newline at end of file