mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +00:00
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:
@@ -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>(
|
||||
|
||||
Reference in New Issue
Block a user