Stop processing IfcIndexedPolyCurve with < 2 verts at mapping stage #5474

as they're invalid and would't be able to create a curve
This commit is contained in:
Andrej730
2024-09-27 16:30:20 +05:00
parent 14cea7453b
commit fe3b66c044
@@ -34,6 +34,10 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcIndexedPolyCurve* inst) {
}
std::vector<taxonomy::point3::ptr> points;
if (coordinates.size() < 2) {
throw IfcParse::IfcException("IfcIndexedPolyCurve has less than 2 points.");
}
points.reserve(coordinates.size());
for (auto& coords : coordinates) {
points.push_back(taxonomy::make<taxonomy::point3>(