From: jgv Date: Tue, 28 Jul 2015 12:03:22 +0000 (+0300) Subject: 0026481: Incorrect result of BRepOffsetAPI_MakeOffset: excess hanging arcs in the... X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=a381cab78b117b852c40bf80f68338905a868a1b;p=occt-copy.git 0026481: Incorrect result of BRepOffsetAPI_MakeOffset: excess hanging arcs in the open result with join type GeomAbs_Arc --- diff --git a/src/BRepFill/BRepFill_OffsetWire.cxx b/src/BRepFill/BRepFill_OffsetWire.cxx index 03dda88f6c..54e0845c9a 100755 --- a/src/BRepFill/BRepFill_OffsetWire.cxx +++ b/src/BRepFill/BRepFill_OffsetWire.cxx @@ -827,6 +827,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 DRAW if (AffichEdge) {