diff --git a/src/BRepAlgo/BRepAlgo_Loop.cxx b/src/BRepAlgo/BRepAlgo_Loop.cxx index 2126f4674d..4805007188 100644 --- a/src/BRepAlgo/BRepAlgo_Loop.cxx +++ b/src/BRepAlgo/BRepAlgo_Loop.cxx @@ -555,6 +555,7 @@ void BRepAlgo_Loop::Perform() TopTools_IndexedDataMapOfShapeListOfShape MVE; // add cut edges. + TopTools_MapOfShape Emap; for (itl.Initialize(myEdges); itl.More(); itl.Next()) { const TopTools_ListOfShape* pLCE = myCutEdges.Seek (itl.Value()); @@ -562,6 +563,8 @@ void BRepAlgo_Loop::Perform() { for (itl1.Initialize(*pLCE); itl1.More(); itl1.Next()) { TopoDS_Edge& E = TopoDS::Edge(itl1.Value()); + if (!Emap.Add(E)) + continue; StoreInMVE(myFace,E,MVE,YaCouture,myVerticesForSubstitute); } } diff --git a/src/BiTgte/BiTgte_Blend.cxx b/src/BiTgte/BiTgte_Blend.cxx index b15363fb70..00a6b62c7c 100644 --- a/src/BiTgte/BiTgte_Blend.cxx +++ b/src/BiTgte/BiTgte_Blend.cxx @@ -693,6 +693,7 @@ static TopoDS_Edge FindCreatedEdge return E1; } +#ifdef DRAW //======================================================================= //function : Bubble //purpose : Sets in increasing order the sequence of vertices. @@ -826,6 +827,8 @@ static void CutEdge (const TopoDS_Edge& E, V1 = V2; } } +#endif + //======================== END OF STATIC FUNCTIONS ============ @@ -2317,25 +2320,6 @@ void BiTgte_Blend::ComputeShape() #endif // end debug - // - // modify the tubes on edge for partition of edges. - // - Standard_Integer NbS = NbSurfaces(); - for (Standard_Integer i = 1; i <= NbS; i++) { - const TopoDS_Shape& S1 = SupportShape1(i); - - if ( S1.ShapeType() == TopAbs_EDGE) { - const TopoDS_Edge& E1 = TopoDS::Edge(S1); - // it is required to replace in F the cut edges of E1, that - // represent CutE - const TopTools_ListOfShape& VonE = myCutEdges(E1); - TopTools_ListOfShape NewE; - CutEdge(E1,VonE,NewE); - - } - } - - TopTools_DataMapOfShapeShape Created; TopTools_ListOfShape Empty; diff --git a/tests/bugs/modalg_2/bug22864 b/tests/bugs/modalg_2/bug22864_1 old mode 100755 new mode 100644 similarity index 100% rename from tests/bugs/modalg_2/bug22864 rename to tests/bugs/modalg_2/bug22864_1 diff --git a/tests/bugs/modalg_2/bug22864_2 b/tests/bugs/modalg_2/bug22864_2 new file mode 100644 index 0000000000..e82dcdbe37 --- /dev/null +++ b/tests/bugs/modalg_2/bug22864_2 @@ -0,0 +1,21 @@ +puts "============" +puts "OCC22864" +puts "============" +puts "" +############################################################################################## +# The algorithm BiTgte_Blend obtains instable results +############################################################################################## + +set BugNumber OCC22864 + +restore [locate_data_file bug22864_face1.brep] f1 +restore [locate_data_file bug22864_face2.brep] f2 + +compound f1 f2 s + +brollingball result s 15 @ f1 f2 + +checkshape result +checknbshapes result -vertex 7 -edge 9 -wire 4 -face 3 -shell 1 +checkprops result -s 39642.2 +checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_2/bug22864_3 b/tests/bugs/modalg_2/bug22864_3 new file mode 100644 index 0000000000..3821cdcc97 --- /dev/null +++ b/tests/bugs/modalg_2/bug22864_3 @@ -0,0 +1,24 @@ +puts "============" +puts "OCC22864" +puts "============" +puts "" +############################################################################################## +# The algorithm BiTgte_Blend obtains instable results +############################################################################################## + +set BugNumber OCC22864 + +sphere s1 10 +sphere s2 10 +mkface f1 s1 +mkface f2 s2 +scalexyz f1 f1 2 2 1 +scalexyz f2 f2 0.5 0.5 2 +compound f1 f2 s + +brollingball result s 2. @ f1 f2 + +checkshape result +checknbshapes result -vertex 6 -edge 11 -wire 5 -face 5 -shell 1 +checkprops result -s 3750.55 +checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_2/bug22864_4 b/tests/bugs/modalg_2/bug22864_4 new file mode 100644 index 0000000000..f7b7115324 --- /dev/null +++ b/tests/bugs/modalg_2/bug22864_4 @@ -0,0 +1,23 @@ +puts "TODO OCC29957 ALL: Error : The area of result shape is" + +puts "============" +puts "OCC22864" +puts "============" +puts "" +############################################################################################## +# The algorithm BiTgte_Blend obtains instable results +############################################################################################## + +set BugNumber OCC22864 + +cone s1 0 0 0 0 0 1 30 0 +mkface f1 s1 0 2.*pi -40 0 +cone s2 25 0 -15 1 0 0 10 0 +mkface f2 s2 0 2.*pi -55 0 +compound f1 f2 s + +brollingball result s 2. @ f1 f2 + +checkprops result -s 3523.97 + +checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_7/bug29861 b/tests/bugs/modalg_7/bug29861 new file mode 100644 index 0000000000..0a8da4d07a --- /dev/null +++ b/tests/bugs/modalg_7/bug29861 @@ -0,0 +1,22 @@ +puts "============" +puts "OCC29861" +puts "============" +puts "" +############################################################################################## +# Modeling Algorithms - BiTgte_Blend gives exception +############################################################################################## + +set BugNumber OCC29861 + +cylinder s1 0 360 0 0 0 1 0 1 0 160 +cylinder s2 0 0 0 0 1 0 80 +mkface f1 s1 0 2.*pi -113.2000012 113.2000012 +mkface f2 s2 0 2.*pi 168.4 600 +compound f1 f2 s + +brollingball result s 30 @ f1 f2 + +checkshape result +checknbshapes result -vertex 10 -edge 17 -wire 7 -face 6 -shell 1 +checkprops result -s 246256 +checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/offset/faces_type_a/A3 b/tests/offset/faces_type_a/A3 index e08c7d9b1e..72645c6482 100644 --- a/tests/offset/faces_type_a/A3 +++ b/tests/offset/faces_type_a/A3 @@ -1,7 +1,4 @@ #old file ofcb19 -puts "TODO CR25925 ALL: ERROR. offsetperform operation not done." -puts "TODO CR25925 ALL: Error: The command cannot be built" -puts "TODO CR26556 ALL: Error : The offset cannot be built." restore [locate_data_file CHE_bb17.rle] s OFFSETSHAPE -0.04 {s_4 s_9 s_3 s_5 s_2 s_7 s_11} $calcul $type diff --git a/tests/offset/faces_type_a/A4 b/tests/offset/faces_type_a/A4 index 8d5dccf89e..90c4e61004 100644 --- a/tests/offset/faces_type_a/A4 +++ b/tests/offset/faces_type_a/A4 @@ -1,7 +1,4 @@ #old file ofcb23 -puts "TODO CR25925 ALL: ERROR. offsetperform operation not done." -puts "TODO CR25925 ALL: Error: The command cannot be built" -puts "TODO CR26556 ALL: Error : The offset cannot be built." restore [locate_data_file CHE_cc3.rle] s OFFSETSHAPE -0.01 {s_6} $calcul $type diff --git a/tests/offset/faces_type_a/A9 b/tests/offset/faces_type_a/A9 index 210072a13f..a6f870ba45 100644 --- a/tests/offset/faces_type_a/A9 +++ b/tests/offset/faces_type_a/A9 @@ -1,7 +1,4 @@ #old file ofsb20 -puts "TODO CR25925 ALL: ERROR. offsetperform operation not done." -puts "TODO CR25925 ALL: Error: The command cannot be built" -puts "TODO CR26556 ALL: Error : The offset cannot be built." restore [locate_data_file CHE_bb20.rle] s OFFSETSHAPE -0.1 {s_4 s_7} $calcul $type