From: ika Date: Thu, 24 Apr 2014 12:31:26 +0000 (+0400) Subject: 0024218: ShapeFix_Face requires double execution to produce valid shape when FixSplit... X-Git-Tag: V6_8_0_beta~367 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=7719318359b831e5d232a45fda2445fc92a5a06b;p=occt-copy.git 0024218: ShapeFix_Face requires double execution to produce valid shape when FixSplitFaceMode is in effect Test case for issues CR24218 --- diff --git a/src/ShapeFix/ShapeFix_Face.cxx b/src/ShapeFix/ShapeFix_Face.cxx index 23a6ebcff4..b3bf90e00c 100644 --- a/src/ShapeFix/ShapeFix_Face.cxx +++ b/src/ShapeFix/ShapeFix_Face.cxx @@ -2266,7 +2266,16 @@ Standard_Boolean ShapeFix_Face::FixSplitFace(const TopTools_DataMapOfShapeListOf const TopTools_ListOfShape& IntWires = MapWires.Find(wire); TopTools_ListIteratorOfListOfShape liter(IntWires); for( ; liter.More(); liter.Next()) { - B.Add(tmpFace,liter.Value()); + TopoDS_Shape aShape = tmpFace.EmptyCopied(); + TopoDS_Face aFace = TopoDS::Face ( aShape ); + aFace.Orientation ( TopAbs_FORWARD ); + B.Add (aFace,liter.Value()); + BRepTopAdaptor_FClass2d clas (aFace,::Precision::PConfusion()); + TopAbs_State staout = clas.PerformInfinitePoint(); + if (staout == TopAbs_IN) + B.Add(tmpFace,liter.Value()); + else + B.Add(tmpFace,liter.Value().Reversed()); NbWiresNew++; } if(!myFwd) tmpFace.Orientation(TopAbs_REVERSED); diff --git a/tests/bugs/heal/bug24218 b/tests/bugs/heal/bug24218 new file mode 100644 index 0000000000..32bab7bcc7 --- /dev/null +++ b/tests/bugs/heal/bug24218 @@ -0,0 +1,19 @@ +puts "============" +puts "OCC24218" +puts "============" +puts "" +####################################################################### +## ShapeFix_Face requires double execution to produce valid shape when FixSplitFaceMode is in effect +####################################################################### + +restore [locate_data_file bug24218_f.brep] f + +decho off +checkshape f +decho on + +fixshape r f +o +checkshape r + +fixshape rr r +o +checkshape rr