From 3b08f644ed82cbe8a08d4a0874510f3a20959d2a Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Wed, 21 Feb 2024 14:54:09 +0100 Subject: [PATCH] Uncomment type assertion and comment out writing to stdout --- src/ifcgeom/mapping/IfcFixedReferenceSweptAreaSolid.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ifcgeom/mapping/IfcFixedReferenceSweptAreaSolid.cpp b/src/ifcgeom/mapping/IfcFixedReferenceSweptAreaSolid.cpp index 24cfff8c6a..fb52cef883 100644 --- a/src/ifcgeom/mapping/IfcFixedReferenceSweptAreaSolid.cpp +++ b/src/ifcgeom/mapping/IfcFixedReferenceSweptAreaSolid.cpp @@ -40,13 +40,13 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcFixedReferenceSweptAreaSolid // IfcDirectrixCurveSweptAreaSolid introduced in 4.3 changed attribute type // from optional IfcParamValue to optional IfcCurveMeasureSelect. // Invocation of mapping on pre-4.3 models can never result in a piecewise_function. - if (inst->StartParam()) { // && inst->StartParam()->as()) { + if (inst->StartParam() && inst->StartParam()->as()) { double s = *inst->StartParam()->as(); if (s > start) { start = s; } } - if (inst->EndParam()) { // && inst->EndParam()->as()) { + if (inst->EndParam() && inst->EndParam()->as()) { double e = *inst->EndParam()->as(); if (e < end) { end = e; @@ -57,10 +57,13 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcFixedReferenceSweptAreaSolid auto nsteps = (size_t)ceil(len); for (size_t i = 0; i <= nsteps; ++i) { auto m4 = pwf->evaluate(start + len / nsteps * i); + + /* std::stringstream ss; ss << m4; auto s = ss.str(); std::wcout << s.c_str() << std::endl; + */ Eigen::Vector3d tangent = m4.col(0).head<3>().normalized(); Eigen::Vector3d proj = (ref->components() - tangent * tangent.dot(ref->components()));