mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-05 23:41:44 +00:00
ifcgeom: build the swept-area directrix from the offset curve far from origin (#4848)
IfcSurfaceCurveSweptAreaSolid regressed in 0.8 for geometry far from the origin (for example parapets on a georeferenced building), which went missing or glitched. The kernel offsets the directrix toward the origin when it is far away (mean.norm() > 1e2), storing the offset copy in a local curve variable and setting applied_temporary_offset so the finished solid is translated back by +mean. But the wire was still built from scs->curve, the un-offset original, so the offset never took effect and the result was translated by +mean from its correct location. Build the wire from curve instead. When no offset is applied curve aliases scs->curve, so near-origin geometry is unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
committed by
Thomas Krijnen
parent
97a85fe5a7
commit
e333c1c100
@@ -128,7 +128,12 @@ bool OpenCascadeKernel::convert(const taxonomy::sweep_along_curve::ptr scs, Topo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
auto w = convert_curve(scs->curve);
|
// Build the wire from curve, which is the directrix offset toward the origin
|
||||||
|
// when applied_temporary_offset is set. Using scs->curve here left the wire
|
||||||
|
// far from the origin yet still translated the result back by +mean, which
|
||||||
|
// misplaced sweeps far from the origin (#4848). When no offset is applied
|
||||||
|
// curve aliases scs->curve, so near-origin geometry is unaffected.
|
||||||
|
auto w = convert_curve(curve);
|
||||||
if (w.which() != 2) {
|
if (w.which() != 2) {
|
||||||
Logger::Root().Error("UNS", 9, "Unsupported directrix");
|
Logger::Root().Error("UNS", 9, "Unsupported directrix");
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user