From 5bbd5ea1b858c7c85e33bd17f8a15dcc85162714 Mon Sep 17 00:00:00 2001 From: Richard Brice <37087370+RickBrice@users.noreply.github.com> Date: Sun, 30 Aug 2026 10:47:50 -0700 Subject: [PATCH] Fixes IfcSectionedSurface and IfcSectionedSolidHorizontal use of PBE.OffsetLateral and OffsetVertical by adding unit conversion factor. --- src/ifcgeom/mapping/IfcSectionedSolidHorizontal.cpp | 8 ++++---- src/ifcgeom/mapping/IfcSectionedSurface.cpp | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/ifcgeom/mapping/IfcSectionedSolidHorizontal.cpp b/src/ifcgeom/mapping/IfcSectionedSolidHorizontal.cpp index eba582a951..546c8712d6 100644 --- a/src/ifcgeom/mapping/IfcSectionedSolidHorizontal.cpp +++ b/src/ifcgeom/mapping/IfcSectionedSolidHorizontal.cpp @@ -63,10 +63,10 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcSectionedSolidHorizontal& in // Corresponds to the profile X, Y directions (hopefully). Eigen::Vector3d po( - pbde.OffsetLateral().value_or(0.), - // @todo I don't understand whether vertical is an offset relative to the tangent plane or to the global XY plane - pbde.OffsetVertical().value_or(0.), - 0. + pbde.OffsetLateral().value_or(0.) * length_unit_, + // @todo I don't understand whether vertical is an offset relative to the tangent plane or to the global XY plane + pbde.OffsetVertical().value_or(0.) * length_unit_, + 0. ); profile_offsets.push_back(po); diff --git a/src/ifcgeom/mapping/IfcSectionedSurface.cpp b/src/ifcgeom/mapping/IfcSectionedSurface.cpp index 34eab74760..a0ef5f727b 100644 --- a/src/ifcgeom/mapping/IfcSectionedSurface.cpp +++ b/src/ifcgeom/mapping/IfcSectionedSurface.cpp @@ -65,10 +65,10 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcSectionedSurface& inst) { // Corresponds to the profile X, Y directions (hopefully). Eigen::Vector3d po( - pbde.OffsetLateral().value_or(0.), - // @todo I don't understand whether vertical is an offset relative to the tangent plane or to the global XY plane - pbde.OffsetVertical().value_or(0.), - 0. + pbde.OffsetLateral().value_or(0.) * length_unit_, + // @todo I don't understand whether vertical is an offset relative to the tangent plane or to the global XY plane + pbde.OffsetVertical().value_or(0.) * length_unit_, + 0. ); profile_offsets.push_back(po);