fix(compose): gate post-synthesis feature sweep in _compose_engine_reconstruction #81
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#81
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?
After 4 fix commits landed on Mark/pc2cad#77 (
89ed113,9c471f3,dbf6124,c0e076f),pc2cad_cli.py samples/methodology_assembly.ply --engine compose --deterministic-ransac --seed 42still ends withExported body+features reconstruction (body=compose_solid, features=2) to ....Root cause:
_compose_engine_reconstruction(~line 1711, pc2cad_compose.py) calls_find_feature_cylinders(...)unconditionally for compose_solid bodies.min_inliers=max(60, int(0.01*len(points)))is too loose -- 5000 plane points -> 60 inlier threshold is noise. Two spurious features still slip through.Fix: skip the sweep when the body's primitive set has no cylinder/cone/sphere, OR raise
min_inliers>=500for plane-only bodies. Add regression test in tests/test_compose.py assertingfeatures=0on the above CLI invocation.Fixed via commit
c6f901fon Mark/pc2cad main._compose_engine_reconstructionnow gates_find_feature_cylinderson whether the bodies that compose the synthesized solid actually
contain a curved primitive (cylinder / cone / sphere). The sweep
exists to recover curved features plane RANSAC swallowed (bolt
circles, bores); for a plane-only body there is nothing it could
legitimately find, and the loose
min_inlierscap was admittingspurious cylinders from radial noise on the 6000 plane points.
Verified end-to-end:
pc2cad_cli.py samples/methodology_assembly.ply --engine compose --deterministic-ransac --seed 42→features=0(was 2)pc2cad_cli.py samples/methodology_shaft.ply ...→features=1(real central bore, unchanged)Regression test: tests/test_compose.py::test_compose_engine_skips_feature_sweep_for_plane_only_body