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]);
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;
--- /dev/null
+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