bug(fitter): methodology_flange has no bolt holes — output is a solid disc with no central bore (coverage 0.890) #76
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#76
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's feature-hole detector fails on
samples/methodology_flange.ply. The output is a solid discwith no bolt holes and no central bore — the defining features of
a flange are missing.
Coverage: 0.890 at 1mm tolerance (passes the gate, but the
visual is geometrically wrong — the gate alone doesn't catch this).
Reproduction
Input (methodology_flange)
A disc-shaped flange with a bolt-hole circle (multiple small holes
around the perimeter) and a central bore. Some noise; the holes are
visible as gaps in the pointcloud.
Expected
Reconstruction captures the flange's defining features:
render_comparereports the holes are present in the output STEP.Actual
Output is a plain solid cylinder/disc. No bolt holes. No central bore.
The cover passes the coverage gate because the disc wraps the input
loosely, but the geometric match is wrong.
Side-by-side:
docs/visual-bug-evidence-2026-09-18/methodology_flange_side_by_side.pngReport findings
featureslist contains a single plane-based profile; no holes,no capped cylinders, no bolt-hole pattern. The feature-hole
detector (
_find_feature_cylinders) is not picking up the holeson this fixture, even though the same detector finds the holes
on
strategy_plate_with_hole(coverage 0.965, single hole found).Acceptance
samples/methodology_flange.plyreconstruction contains thebolt-hole pattern (multiple cylinders in the bolt-circle) and
the central bore.
render_comparereports coverage ≥0.85 andthe STEP contains the expected hole features.
Refs: visual-regression sweep 2026-09-18, post-#70 close-out sweep.
triage-runner partial fix landed (refs #76)
Shipped in commit
becf5afon main.What is fixed:
_find_feature_cylinderssweep on the synthesized solid's bbox (previously it returnedfeatures=[]always, so only the body+features fromfit_primitivescylinders were subtracted — and the flange's bolt holes and bore are missed by cylinder RANSAC because each bolt hole has only ~40 inliers)._find_feature_cylindershad two coupled bugs preventing the central bore from being detected onmethodology_flange:candidates[0](the strongest histogram peak) and gave up if it failed a downstream check. The body-outline peak at r=half_body_radius was the strongest candidate on the flange and got rejected, but the next strongest (the bore at r=10mm) was silently dropped. Now the sweep iterates all candidates per axis.Result:
methodology_flangeSTEP now hasfeatures=1(the central bore) where it wasfeatures=0before.render_compare.pyat 1mm tolerance: 0.911 (up from 0.890).test_plate_hole_detected_and_exportedand the other 94 unit tests still pass — no regressions.Still missing (known gap, documented in
_try_axisdocstring):Acceptance status:
This is partial progress; please verify the bore appears in the rendered output and either accept this or open a follow-up for the bolt-circle detector.