TopLoc_Location loc;
Standard_Real first, last;
Handle(Geom_Curve) c3d = BRep_Tool::Curve(sec, loc, first, last);
+ if (c3d.IsNull()) continue;
if (!loc.IsIdentity()) {
c3d = Handle(Geom_Curve)::DownCast(c3d->Copy());
c3d->Transform(loc.Transformation());
const TopoDS_Edge& bound = TopoDS::Edge(myBoundFaces.FindKey(i));
// Do not cut floating edges
if (!myBoundFaces(i).Extent()) continue;
+ // Obtain bound curve
+ c3d = BRep_Tool::Curve(bound, loc, first, last);
+ if (c3d.IsNull()) continue;
+ if (!loc.IsIdentity()) {
+ c3d = Handle(Geom_Curve)::DownCast(c3d->Copy());
+ c3d->Transform(loc.Transformation());
+ }
// Create cutting sections
TopTools_ListOfShape listSections;
{ //szv: Use brackets to destroy local variables
- // Obtain bound curve
- c3d = BRep_Tool::Curve(bound, loc, first, last);
- if (!loc.IsIdentity()) {
- c3d = Handle(Geom_Curve)::DownCast(c3d->Copy());
- c3d->Transform(loc.Transformation());
- }
// Obtain candidate vertices
TopoDS_Vertex V1, V2;
TopTools_IndexedMapOfShape CandidateVertices;
--- /dev/null
+puts "============"
+puts "OCC25175"
+puts "============"
+puts ""
+###########################################################################
+# BRepBuilderAPI_Sewing can crash if an edge without 3D curve is presented
+###########################################################################
+
+pload XSDRAW
+
+igesread [locate_data_file bug25175_3.igs] a *
+
+sewing result 0.1 a
+
+set 2dviewer 1
+