diff --git a/src/BRepFill/BRepFill_OffsetWire.cxx b/src/BRepFill/BRepFill_OffsetWire.cxx index befe34193c..c0fbdade11 100644 --- a/src/BRepFill/BRepFill_OffsetWire.cxx +++ b/src/BRepFill/BRepFill_OffsetWire.cxx @@ -1198,7 +1198,9 @@ void BRepFill_OffsetWire::PrepareSpine() // Cut TopoDS_Shape aLocalShape = E.Oriented(TopAbs_FORWARD); // Modified by Sergey KHROMOV - Thu Nov 16 17:29:29 2000 Begin - if (nbEdges == 2 && nbResEdges == 0) + Handle(BRep_TEdge) TEdge = Handle(BRep_TEdge)::DownCast(E.TShape()); + const Standard_Integer aNumCurvesInEdge = TEdge->Curves().Size(); + if (nbEdges == 2 && nbResEdges == 0 && aNumCurvesInEdge > 1) ForcedCut = 1; // Modified by Sergey KHROMOV - Thu Nov 16 17:29:33 2000 End nbResEdges = CutEdge (TopoDS::Edge(aLocalShape), mySpine, ForcedCut, Cuts); diff --git a/tests/bugs/modalg_5/bug25704_6 b/tests/bugs/modalg_5/bug25704_6 index 64a98dafa8..e9e0e2abcd 100644 --- a/tests/bugs/modalg_5/bug25704_6 +++ b/tests/bugs/modalg_5/bug25704_6 @@ -17,7 +17,7 @@ if [catch { openoffset resoffset a 5 5 i } ] { checkshape result checksection result - checknbshapes result -vertex 4 -edge 3 -wire 1 -face 0 -shell 0 -solid 0 -compsolid 0 -compound 0 -shape 8 + checknbshapes result -vertex 3 -edge 2 -wire 1 -face 0 -shell 0 -solid 0 -compsolid 0 -compound 0 -shape 6 } smallview diff --git a/tests/bugs/modalg_8/bug32964 b/tests/bugs/modalg_8/bug32964 new file mode 100644 index 0000000000..a4f3009e81 --- /dev/null +++ b/tests/bugs/modalg_8/bug32964 @@ -0,0 +1,14 @@ +puts "=============" +puts "0032964: Modeling Algorithms - 2d Offset sometimes 'split' straight edges" +puts "=============" + +pload MODELING +vertex p1 -90 40 0 +vertex p2 40 40 0 +vertex p3 40 -90 0 +edge e1 p1 p2 +edge e2 p2 p3 +wire w1 e1 e2 +openoffset oo w1 1 40 +checknbshapes oo_1 -vertex 3 -edge 2 -wire 1 -shape 6 +checkview -display oo_1 -2d -path ${imagedir}/${test_image}.png