Repository navigation
fix(saved-mesh): anchor a curved edge's end to the plane's saved corner when it lies on the plane but off that corner - #2246
Conversation
…er when it lies on the plane but off that corner An end sample on the plane but up to PLANE_ANCHOR_LIMIT off the plane's own saved sample was refused as 'shared edge surface samples disagree', leaving round piles and columns with flat ends as record boxes.
|
@oguzhanakk @DrunkOnJava I found a related public reproduction for closing a stored trim corner. The affected carrier here has only planes, so it exercises a separate case from this PR's plane-to-curved-edge anchor. On the pinned BIM4LCA Housing Concrete As-Built pair, public element The local reader trial retains the authored stations for paired planar spans. Between any two stations the charts are affine, so the larger endpoint discrepancy bounds the whole span. Both incident faces use the same positions. The result has 66 triangles, zero one-sided or overused edges and zero same-direction edge pairs. Revit's own IFC for the same save also has 66 triangles for that GlobalId. An independent comparison of vertices and triangle centroids gave maxima of Would you prefer a separate reader patch for the all-planar case? I would keep the retry local to the carrier and retain the existing refusal unless the shared trim passes the full closed, oriented body check. |
|
@shifatrHtH thanks, that's a clear public reproduction. As you say, it's a different mechanism: an all-planar carrier whose stored corner doesn't close, while this PR only anchors a curved edge's end to the plane's saved corner. So I'd keep #2246 as it is and take this as a separate reader patch. Your approach sounds right to me: keep the retry local to the carrier, use the same positions on both incident faces, and keep the existing refusal unless the shared trim passes the full closed, oriented body check. The 66-triangle match with Revit's own IFC for that GlobalId, plus the other 60 elements reproducing their previous rows across all 12 BIM4LCA pairs, is the evidence I'd want with it. Please go ahead, or tell me if you'd rather I open it and you review. |
Summary
refined_plane_edgetakes the plane's own saved sample for a curved face's end sample that lies on the plane but off that saved sample by less thanPLANE_ANCHOR_LIMIT, as it already does for an end sample that leaves the plane. Such an edge was refused asshared edge surface samples disagree, and its element stayed a record box.Motivation
Families of round sections cut by planes (piles, round columns, cylinders with flat ends) are refused when the cylinder face's edge ends a few hundredths of a millimetre from the corner the plane saved: the end projects onto the plane (residual under 1e-14), but 1e-6 to 1e-4 ft from the plane's own sample, against
close's 1e-7. #2085's anchor handles the same gap when the end sample leaves the plane, not when it stays on it but moves along it. The samples between the ends are unaffected and still must agree.Changes
src/research/native_saved_mesh.rs,refined_plane_edge'sanchor: an end sample needs no anchor only when it projects onto the plane and onto the plane's saved sample (close); otherwise the existing test applies (model distance to the plane's sample withinPLANE_ANCHOR_LIMIT, 3.9e-4 ft). Strictly a widening: every edge accepted before is accepted the same way.changelog.d/fixed/shared-edge-corner-anchor.md.Testing
Unit tests are banned here; none added.
cargo fmt --checkandtools/release/changelog.py checkpass;cargo clippy --release --lib(Rust 1.100) finds nothing in the changed code (its one finding,enum_variant_namesinpartition_name_candidates.rs, is onmaintoo). I did not run the wholetools/check-local.sh.research/autodesk-sample-projects.tsv, 2024-2027),mainat a79664d against this branch: no change in elements, IFC classes, body sources or refusals on any of them; time and peak RSS within noise.Audit-honesty checklist
PLANE_ANCHOR_LIMIT) along the last span of the edge, exactly as Family instances that stay boxes: expose symbol geometry and instance placement #2085's anchor leaves them.Breaking changes
None in the API. IFC output changes for the elements above (body source and representation).
Legal and contribution hygiene
Related: #2243 (the same contributor's saved-mesh change for hollow framing and overrunning walls). This pull request is independent of it and applies to
mainon its own.