mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-24 01:07:59 +00:00
#1814 check for the succesful creation of edge curves in IfcIndexedPolyCurve
This commit is contained in:
@@ -1053,12 +1053,16 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcIndexedPolyCurve* l, TopoDS_Wi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (points.begin() < points.end()) {
|
} else if (points.begin() < points.end()) {
|
||||||
std::vector<gp_Pnt>::const_iterator previous = points.begin();
|
std::vector<gp_Pnt>::const_iterator previous = points.begin();
|
||||||
for (std::vector<gp_Pnt>::const_iterator current = previous+1; current < points.end(); ++current){
|
for (std::vector<gp_Pnt>::const_iterator current = previous+1; current < points.end(); ++current){
|
||||||
w.Add(BRepBuilderAPI_MakeEdge(*previous, *current));
|
BRepBuilderAPI_MakeEdge me(*previous, *current);
|
||||||
previous = current;
|
double u, v;
|
||||||
}
|
if (me.IsDone() && !BRep_Tool::Curve(me.Edge(), u, v).IsNull()) {
|
||||||
|
w.Add(me.Edge());
|
||||||
|
previous = current;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
result = w.Wire();
|
result = w.Wire();
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user