diff --git a/src/LocOpe/LocOpe_WiresOnShape.cxx b/src/LocOpe/LocOpe_WiresOnShape.cxx index ed42ae8fd8..712c1d4599 100644 --- a/src/LocOpe/LocOpe_WiresOnShape.cxx +++ b/src/LocOpe/LocOpe_WiresOnShape.cxx @@ -1078,11 +1078,6 @@ void FindInternalIntersections(const TopoDS_Edge& theEdge, TopoDS_Vertex theVertices [2]; TopExp::Vertices(theEdge, theVertices[0], theVertices[1]); - if (theEdge.Orientation() == TopAbs_REVERSED) - { - theVertices[0].Reverse(); - theVertices[1].Reverse(); - } gp_Pnt thePnt [2]; thePnt[0] = BRep_Tool::Pnt(theVertices[0]); thePnt[1] = BRep_Tool::Pnt(theVertices[1]); @@ -1217,11 +1212,13 @@ void FindInternalIntersections(const TopoDS_Edge& theEdge, LastVertex.Orientation(TopAbs_REVERSED); TopoDS_Shape aLocalShape = theEdge.EmptyCopied(); + TopAbs_Orientation anOrient = aLocalShape.Orientation(); + aLocalShape.Orientation(TopAbs_FORWARD); TopoDS_Edge NewEdge = TopoDS::Edge(aLocalShape); BB.Range(NewEdge, FirstPar, LastPar); BB.Add(NewEdge, FirstVertex); BB.Add(NewEdge, LastVertex); - + NewEdge.Orientation(anOrient); NewEdges.Append(NewEdge); FirstVertex = LastVertex; FirstPar = LastPar; diff --git a/tests/bugs/modalg_5/bug25106 b/tests/bugs/modalg_5/bug25106 new file mode 100755 index 0000000000..d7ba97c881 --- /dev/null +++ b/tests/bugs/modalg_5/bug25106 @@ -0,0 +1,31 @@ +puts "============" +puts "OCC25106" +puts "============" +puts "" +####################################################################### +# Command "splitshape" does not split attached face by attached edge +####################################################################### + +restore [locate_data_file bug25106_bad_split4.brep] c1 + +explode c1 + +splitshape result c1_1 c1_1 c1_2 + +set square 100 + +set nb_v_good 12 +set nb_e_good 16 +set nb_w_good 5 +set nb_f_good 5 +set nb_sh_good 1 +set nb_sol_good 0 +set nb_compsol_good 0 +set nb_compound_good 0 +set nb_shape_good 39 + +vinit +vdisplay result +vsetdispmode 0 +vfit +set only_screen 1