From: jgv Date: Wed, 29 Jul 2015 13:10:53 +0000 (+0300) Subject: 0026481: Incorrect result of BRepOffsetAPI_MakeOffset: excess hanging arcs in the... X-Git-Tag: V7_0_0_beta~393 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=016dfb16ba9184738d172bf810a130260ceafacf;p=occt.git 0026481: Incorrect result of BRepOffsetAPI_MakeOffset: excess hanging arcs in the open result with join type GeomAbs_Arc Test-case for issue #26481 --- diff --git a/src/BRepFill/BRepFill_OffsetWire.cxx b/src/BRepFill/BRepFill_OffsetWire.cxx index 18acc6fc50..9a3890de3a 100644 --- a/src/BRepFill/BRepFill_OffsetWire.cxx +++ b/src/BRepFill/BRepFill_OffsetWire.cxx @@ -811,6 +811,24 @@ void BRepFill_OffsetWire::PerformWithBiLo } } + //Remove possible hanging arcs on vertices + if (myIsOpenResult && myJoinType == GeomAbs_Arc) + { + if (!myMap.IsEmpty() && + myMap.FindKey(1).ShapeType() == TopAbs_VERTEX) + { + //myMap.RemoveFirst(); + TopoDS_Shape LastShape = myMap.FindKey(myMap.Extent()); + TopTools_ListOfShape LastList; + LastList.Append(myMap(myMap.Extent())); + myMap.RemoveLast(); + if (!myMap.IsEmpty()) + myMap.Substitute(1, LastShape, LastList); + } + if (!myMap.IsEmpty() && + myMap.FindKey(myMap.Extent()).ShapeType() == TopAbs_VERTEX) + myMap.RemoveLast(); + } #ifdef OCCT_DEBUG #ifdef DRAW diff --git a/tests/bugs/modalg_6/bug26481 b/tests/bugs/modalg_6/bug26481 new file mode 100644 index 0000000000..36b76c5e40 --- /dev/null +++ b/tests/bugs/modalg_6/bug26481 @@ -0,0 +1,16 @@ +puts "========" +puts "OCC26481" +puts "========" +puts "" +################################################################################################################### +# Incorrect result of BRepOffsetAPI_MakeOffset: excess hanging arcs in the open result with join type GeomAbs_Arc +################################################################################################################### + +smallview + +restore [locate_data_file OCC26481-linesarc.brep] a +fit +openoffset r a 4 10. +fit + +set only_screen_axo 1