prevent index out of bound in case of a single point

This commit is contained in:
hlg
2019-02-14 03:16:03 +08:00
committed by Thomas Krijnen
parent acde878946
commit df49f1bc1b
+1 -1
View File
@@ -912,7 +912,7 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcIndexedPolyCurve* l, TopoDS_Wi
throw IfcParse::IfcException("Unexpected IfcIndexedPolyCurve segment of type " + IfcSchema::Type::ToString(segment->type()));
}
}
} else {
} 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));