Commit Graph

4 Commits

Author SHA1 Message Date
Petru Conduraru 2e3d4486ca IfcCenterLineProfileDef: implement profile mapping
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.
2026-07-25 08:34:14 +03:00
Thomas Krijnen 65a5646bf0 Major update: taxonomy shared pointers, collection type safety, work towards hashing 2023-07-27 16:42:06 +08:00
Thomas Krijnen c78b2893de Proceed with merge 2023-03-21 20:15:01 +01:00
Thomas Krijnen ccde605029 File renames, build script and cmake updates 2022-11-15 13:19:24 +01:00