const TopoDS_Edge& anEdge = TopoDS::Edge(iter.Value());
BRepAdaptor_Curve2d BAcurve2d(anEdge, theRefFace);
gp_Pnt2d aPnt2d = BAcurve2d.Value((BAcurve2d.FirstParameter() + BAcurve2d.LastParameter())/2.);
- TopoDS_Face RequiredFace;
+ TopoDS_Shape RequiredFace;
for (Standard_Integer jj = 1; jj <= theFaces.Length(); jj++)
{
const TopoDS_Face& aFace = TopoDS::Face(theFaces(jj));
TopAbs_State aStatus = Classifier.Perform(aPnt2d);
if (aStatus == TopAbs_IN)
{
- RequiredFace = aFace;
+ RequiredFace = aFace.Oriented (TopAbs_FORWARD);
break;
}
}
- BB.Add(RequiredFace, aWire);
+ if (!RequiredFace.IsNull())
+ {
+ BB.Add(RequiredFace, aWire);
+ }
+ else
+ {
+ Standard_ASSERT_VOID (false, "ShapeUpgrade_UnifySameDomain: wire remains unclassified");
+ }
}
}
--- /dev/null
+puts "======================================================="
+puts "0030897: Modeling Algorithms - Crash in UnifySameDomain"
+puts "======================================================="
+puts ""
+
+restore [locate_data_file bug30897_bleriot_16.brep] a
+
+unifysamedom result a
+
+checkshape result
+
+checknbshapes result -solid 1 -shell 1 -face 51 -wire 121 -edge 379 -vertex 324
+
+set tolres [checkmaxtol result]
+
+if { ${tolres} > 0.00385} {
+ puts "Error: bad tolerance of result"
+}
+
+checkprops result -v 403016