mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 17:58:20 +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()) {
|
||||
std::vector<gp_Pnt>::const_iterator previous = points.begin();
|
||||
for (std::vector<gp_Pnt>::const_iterator current = previous+1; current < points.end(); ++current){
|
||||
w.Add(BRepBuilderAPI_MakeEdge(*previous, *current));
|
||||
previous = current;
|
||||
}
|
||||
std::vector<gp_Pnt>::const_iterator previous = points.begin();
|
||||
for (std::vector<gp_Pnt>::const_iterator current = previous+1; current < points.end(); ++current){
|
||||
BRepBuilderAPI_MakeEdge me(*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();
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user