From e282a184740efbb9c2b90889a61577711c602c70 Mon Sep 17 00:00:00 2001 From: Richard Brice <37087370+RickBrice@users.noreply.github.com> Date: Sun, 8 Mar 2026 09:55:47 -0700 Subject: [PATCH 1/2] Fixes crash in taxonomy::loft::print_impl when axis == nullptr --- src/ifcgeom/taxonomy.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ifcgeom/taxonomy.h b/src/ifcgeom/taxonomy.h index 5d70d4490c..c1162eebb0 100644 --- a/src/ifcgeom/taxonomy.h +++ b/src/ifcgeom/taxonomy.h @@ -1068,8 +1068,10 @@ typedef item const* ptr; virtual kinds kind() const { return LOFT; } virtual void print_impl(std::ostream& o, int indent) const { - o << std::string(indent, ' ') << "axis" << std::endl; - axis->print(o, indent + 4); + if (axis) { + o << std::string(indent, ' ') << "axis" << std::endl; + axis->print(o, indent + 4); + } } virtual size_t calc_hash() const { From 610d639c21051047750b2b7b597411daa308375f Mon Sep 17 00:00:00 2001 From: Richard Brice <37087370+RickBrice@users.noreply.github.com> Date: Sun, 8 Mar 2026 10:37:05 -0700 Subject: [PATCH 2/2] Fixes rotation lerp test in make_loft --- src/ifcgeom/infra_sweep_helper.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ifcgeom/infra_sweep_helper.cpp b/src/ifcgeom/infra_sweep_helper.cpp index 58f6d3108a..123e13b063 100644 --- a/src/ifcgeom/infra_sweep_helper.cpp +++ b/src/ifcgeom/infra_sweep_helper.cpp @@ -160,12 +160,12 @@ taxonomy::loft::ptr ifcopenshell::geometry::make_loft(const Settings& settings_, } auto interpolated_offset = lerp(offset_a, offset_b, relative_dist_along); - if (rotation_a == rotation_b && rotation_a) { - // @todo we don't support an overridden rotation on only one of the placements + if (rotation_a.has_value() && rotation_b.has_value() ) { + // @todo we don't support an overridden rotation on only one of the placements // in which case we would need to lerp with the rotation component below in m4b. interpolated_rotation = lerp(*rotation_a, *rotation_b, relative_dist_along); } else if (rotation_a != rotation_b) { - Logger::Error("Direction vectors on cross section placements only supported when used consistently"); + Logger::Error("Direction vectors on cross section placements only supported when used consistently"); } taxonomy::loop::ptr w1, w2;