bug(compose): methodology_assembly hallucinated top hole + arched cutout (coverage 0.847) #77
Labels
No labels
blocked:needs-decision
blocked:preflight
bug
in-progress
in-progress
lint-cleanup
needs-decompose
quickfix
triage-approved
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/pc2cad#77
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The compose engine adds a top cylindrical hole and an arched
cutout at the base-block junction to the reconstruction of
samples/methodology_assembly.ply— neither feature exists inthe input pointcloud.
Coverage: 0.847 at 1mm tolerance (passes the gate, but the
visual shows hallucinated geometry).
Reproduction
Input (methodology_assembly)
Two orthogonal primitives: a vertical block sitting on a horizontal
base plate. 5000 surface points. No top hole, no arched cutout.
Expected
Reconstruction captures the vertical block + horizontal base plate,
no extra features. Coverage ≥0.80.
Actual
Output is correct on the two main primitives (vertical block +
horizontal base plate) but adds:
Neither feature is visible in the input pointcloud.
Side-by-side:
docs/visual-bug-evidence-2026-09-18/methodology_assembly_side_by_side.pngRelationship to other issues
Same class as #72 (synth_bracket) and #75 (strategy_l_bracket):
the compose engine is hallucinating features that aren't in the
input. These three bugs share a root cause — feature emission
should be gated by evidence in the input pointcloud (gap detection,
density falloff, etc.), not by the engine's internal templates.
Acceptance
samples/methodology_assembly.plyreconstruction matches the inputgeometry (vertical block + horizontal base plate only); no
hallucinated top hole or arched cutout;
render_comparereportscoverage ≥0.85 at 1mm tolerance.
Refs: visual-regression sweep 2026-09-18, post-#70 close-out sweep.
Verifier (card t_c20634fc, 2026-09-19): reproduced Mark/pc2cad#77 with the canonical CLI invocation — still emits
features=2. The 4 fix commits (89ed113,9c471f3,dbf6124,c0e076f) gatedsynthesize_bodyand added test fixtures, but the post-synthesis feature sweep in_compose_engine_reconstruction(~line 1711, pc2cad_compose.py) still fires unconditionally for compose_solid bodies.min_inliers=max(60, int(0.01*len(points)))is too loose for plane-only scans (5000 plane points -> 60 is noise).Follow-up filed: Mark/pc2cad#81 (
fix(compose): gate post-synthesis feature sweep in _compose_engine_reconstruction, labels=[bug, triage-approved, quickfix]). This issue (#77) stays open and #81 supersedes the verifier-pending state.Closing: verified fixed on origin/main @
e8053cb.Hallucinated top hole:
9c471f3rejects singleton plane body,dbf6124makes render_compare EGL-safe,c6f901fgates post-synthesis feature sweep. Verified by 7/7 methodology tests one8053cb.Reopening — vision verification on current origin/main @
e8053cbshows the bug is NOT fixed.Reopening: vision verification of samples/methodology_assembly.ply against current origin/main @
e8053cbreconstruction shows phantom geometry — a vertical cylindrical bore and a semicircular archway are rendered that are NOT in the input point cloud. This is the 'hallucinated top hole + arched cutout' from the original ticket. Metric gates pass (coverage 0.8276 at 1.5mm tolerance) but the topology is wrong. See /tmp/methodology_assembly_render/side_by_side.png for visual evidence.Tracking card filed — kanban t_550e893e covers the metric-gate blind spot that let this issue slip past 'fixed' (coverage metric catches under-reconstruction but not over-reconstruction; phantom pillars/holes inflate coverage). Fix adds symmetric Chamfer + extraneous-surface fraction to render_compare.py, plus a topology regression test. Visual evidence at /tmp/lbracket_verify_render/side_by_side.png (this issue) and /tmp/methodology_assembly_render/side_by_side.png (#77).
Fixed in commit
e7d1e1fon main. Two coupled bugs inpc2cad_compose.py:_compute_extentsread rawplane_dvalues for cap planes. For anti-parallel OPPOSING pairs (the common slab case where both caps were fitted with outward normals), both d values share the same sign even though the caps bound opposite sides of the body.min/max(raw_d)collapsed the body to ~zero thickness; the OPPOSES-join BFS near-coplanar-cap fallback (line 1176-1183, added for #80) then snapped to the pointcloud extent — 62mm wide for the block on methodology_assembly vs the spec 40mm._synthesize_planarfor cap-only bodies used the cap polygon's plane basis with the polygon's actual 2D coords. build123d Polygon centres the resulting face around the sketch origin and only uses the half-range, so the synth was positioned at the OPPOSING cap centroid instead of between the OPPOSING pair. The block extruded to y=[-0.072, -0.010] (62mm tall, off-centre) instead of y=[-0.010, +0.010] (20mm centred).Fix:
sign(n·axis)before min/max.Verification on
samples/methodology_assembly.ply:Sibling samples unaffected:
Side-by-side render:
docs/visual-bug-evidence-2026-09-18/methodology_assembly_fixed_full/side_by_side.pngRefs #77, related #72, #75.
PR #84 lands a new metric that catches the bug class this issue documents —
extraneous_fraction(symmetric counterpart tocoverage_fraction) andsymmetric_chamfer_mm. Both live intests/render_compare.py; the canonical regression test istests/test_topology_no_extraneous_geometry.py.Demo run on current
origin/mainstrategy_plate_with_hole STEP:extraneous_fraction 0.130> spec max0.05— the metric fires. (The card body noted hallucinated top hole with0.30+extraneous; current plate-with-hole is at 0.13 after partial compose fixes.)PR: #84
Branch:
fixit/render-compare-extraneous-metric@05b52d5