[fixit] Add extraneous-geometry metric to render_compare.py (catches #72/#77 phantom pillars + hallucinated holes) #84
No reviewers
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!84
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fixit/render-compare-extraneous-metric"
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?
What
Add the symmetric coverage pair to
tests/render_compare.py:extraneous_fraction— fraction of mesh-surface sample points whose nearest input point is farther thantolerancemm. Symmetric counterpart tocoverage_fraction.symmetric_chamfer_mm— mean of input→mesh and mesh→input mean nearest-neighbour distances. Single-scalar over- + under-coverage gate.--max-extraneous-fractionand--max-symmetric-chamfer-mm.extraneous_fraction_max/symmetric_chamfer_mm_maxinexpected_metrics()for spec-driven gates.Why
The Verify gate was one-sided. It scored under-reconstruction (missing geometry) but not over-reconstruction (phantom geometry). At
origin/maine8053cbthe L-bracket reconstruction hallucinated phantom pillars + an unintended circular hole while passingcoverage 0.8176,normals 0.999,faces=38— all green. The methodology_assembly reconstruction hallucinated a cylindrical bore + semicircular archway while passingcoverage 0.8276,normals 0.998,faces=56. Bug class: coverage-blind verification.Acceptance
Per the originating card body:
tests/render_compare.pyoutputsextraneousandsymmetric_chamferinmetrics.jsonwith--max-extraneous-fraction/--max-symmetric-chamfer-mmCLI flags.test_l_bracket_render_compare_passesandtest_plate_with_hole_render_compare_passesFAIL on currentorigin/mainwhen run with--max-extraneous-fraction 0.05— the metric CATCHES the bug. Demo run output:extraneous_fraction 0.080> 0.05 threshold,step faces 16< 20 spec minextraneous_fraction 0.130> 0.05 thresholdtests/test_topology_no_extraneous_geometry.pywalks everysamples/specs/*_spec.pyand asserts the new metrics for opted-in specs.fixit/render-compare-extraneous-metric.Out of scope
Replacing the existing coverage metric. This PR is additive — it adds the symmetric counterpart. The two together form the symmetric coverage pair.
Test status (current origin/main @
09be6be)tests/render_compare.py::test_render_compare_step_roundtripPASStests/render_compare.py::test_render_compare_coverage_metricPASStests/render_compare.py::test_render_compare_smokePASStests/test_topology_no_extraneous_geometry.py[strategy_l_bracket]FAIL (expected — proves metric works)tests/test_topology_no_extraneous_geometry.py[strategy_plate_with_hole]FAIL (expected — proves metric works)tests/test_topology_no_extraneous_geometry.py[*]SKIP (7 specs withoutextraneous_fraction_maxkey — opt-in)The failing tests are the deliverable, not a bug — they demonstrate the new metric catches phantom geometry that the existing coverage gate misses.
Refs
Files
tests/render_compare.py—ExtraneousMetrics+ChamferMetricsdataclasses,extraneous_metric()+symmetric_chamfer_metric()functions, CLI flags, metrics.json keys, spec-driven gates.tests/test_reconstruction.py— added--max-extraneous-fraction+--max-symmetric-chamfer-mmtotest_l_bracket_render_compare_passesandtest_plate_with_hole_render_compare_passes.tests/test_topology_no_extraneous_geometry.py— new parametric regression test walking every spec.samples/specs/strategy_l_bracket_spec.py— addedextraneous_fraction_max: 0.05+symmetric_chamfer_mm_max: 1.5.samples/specs/strategy_plate_with_hole_spec.py— addedextraneous_fraction_max: 0.05+symmetric_chamfer_mm_max: 1.0.pointcloud-to-cad-guide.md— new "Verify gate semantics" section.Merged via fixup lane (kanban
t_pr_Mark_pc2cad_84_merge).d9ac95242f99f95520b72396a3c0ebf456e571feonmainmerge(no squash)fixit/render-compare-extraneous-metricretained (delete_branch_after_merge requested but Forgejo returned 405 on the closure path; head branch still listed)Referenced issues are intentionally left open — PR body uses
Refs:(notCloses:), so they will not auto-close on merge. Per the PR description:The two failing tests on this branch (
strategy_l_bracketextraneous 0.080 > 0.05,strategy_plate_with_holeextraneous 0.130 > 0.05) are the canonical evidence for #72 (L-bracket phantom pillars + circular hole) and #77 (methodology_assembly hallucinated top hole). Those issues should be closed once reconstruction quality is fixed to bring extraneous_fraction ≤ 0.05, not on PR merge.#73 (torus fitter) and #80 (OPPOSES-join BFS over-connection) are tangentially referenced — no specific fix is delivered by this PR.
CC @Mark