The mapping for IfcCenterLineProfileDef was a stub returning nullptr,
so any swept solid using this profile produced no geometry. The
dispatch then fell through to the IfcArbitraryOpenProfileDef parent
mapping, whose open zero-area loop fails the face cast in the sweep
mappings anyway.
The taxonomy offset_curve item sketched in the earlier commented-out
attempt is not implemented by any kernel (AbstractKernel throws
not_implemented_error, the OpenCASCADE loop converter throws for it),
so the offset is instead computed at mapping time. The centerline is
offset to both sides by Thickness/2 in the profile plane and closed
with end caps, using straight miter joins at polyline vertices. This
preserves the constant thickness along the curve that the profile
definition prescribes, which the circular arc joins of a generic
offset algorithm (the pre-0.8 BRepOffsetAPI_MakeOffset path) would
violate, matching the design note from the earlier implementation.
Centerlines with curved (arc or spline) segments are detected and
rejected with a warning for now, keeping the previous no-geometry
behavior for those.
Verified with IFC4 and IFC2X3 test files, straight and L-shaped
centerlines: output solids are watertight, mitered, and have exactly
the expected thickness, extents and volume.
This is the geometry-side prerequisite for the sheet-from-centerline
authoring discussed in #2077.
Generated with the assistance of an AI coding tool.