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