From 2e6f5c1bd95c89e4d7b6fe320fa99ccebdb45d79 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Mon, 3 Feb 2020 14:00:21 +0100 Subject: [PATCH] Fix #776 IfcPolygonalFaceSet units --- src/ifcgeom/IfcGeomShapes.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ifcgeom/IfcGeomShapes.cpp b/src/ifcgeom/IfcGeomShapes.cpp index 7e76e1ac12..41869cd0e3 100644 --- a/src/ifcgeom/IfcGeomShapes.cpp +++ b/src/ifcgeom/IfcGeomShapes.cpp @@ -1537,7 +1537,10 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcPolygonalFaceSet* pfs, TopoDS_ for (std::vector >::const_iterator it = coordinates.begin(); it != coordinates.end(); ++it) { const std::vector& coords = *it; - points.push_back(gp_Pnt(coords[0], coords[1], coords[2])); + points.push_back(gp_Pnt( + coords[0] * getValue(GV_LENGTH_UNIT), + coords[1] * getValue(GV_LENGTH_UNIT), + coords[2] * getValue(GV_LENGTH_UNIT))); } auto polygonal_faces = pfs->Faces();