From a8054968956e6a515521be9b7fb275b0ee2ec122 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Wed, 29 Jan 2020 17:29:33 +0100 Subject: [PATCH] Disable polyline point removal --- src/ifcgeom/schema/mapping.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ifcgeom/schema/mapping.cpp b/src/ifcgeom/schema/mapping.cpp index c27a0d3892..ccf91b2e69 100644 --- a/src/ifcgeom/schema/mapping.cpp +++ b/src/ifcgeom/schema/mapping.cpp @@ -1277,12 +1277,14 @@ taxonomy::item* mapping::map_impl(const IfcSchema::IfcPolyline* inst) { const double eps = precision_ * 10; const bool closed_by_proximity = polygon.size() >= 3 && (polygon.front().components - polygon.back().components).norm() < eps; + + // @todo this removes the end point, since it's identical to the beginning. if (closed_by_proximity) { - polygon.resize(polygon.size() - 1); + // polygon.resize(polygon.size() - 1); } // Remove points that are too close to one another - remove_duplicate_points_from_loop(polygon, closed_by_proximity, eps); + // remove_duplicate_points_from_loop(polygon, closed_by_proximity, eps); if (polygon.size() < 2) { return false;