feat(cli): wire engine='compose' and use_deterministic_ransac into pc2cad_cli.py (Phase 4 / Phase 5 plumbing only in API) #69

Closed
opened 2026-09-16 15:28:54 +00:00 by Mark · 1 comment
Owner

The compose engine (commits 13ddca4 through 0cf5dfd) and deterministic
RANSAC (commit f686579) are implemented and exposed via programmatic
callers — compose_body_with_features(engine="compose") and
FitConfig(use_deterministic_ransac=True).

The CLI does NOT expose either flag. Users running python pc2cad_cli.py samples/X.ply --out out.step --report out.json always go through the
legacy heuristic path regardless of what they want.

Reproduction

python pc2cad_cli.py --help | grep -E 'engine|deterministic'
# No output — neither flag exists in the CLI surface.

Impact

  • The CLI is the documented user-facing entry point per AGENTS.md and the
    pointcloud-to-cad-guide.md. Programmatic callers exist (compose_body_with_features,
    fit_primitives) but the CLI is what most users run.
  • Test fixtures that run via the CLI (tests/test_cli_mode.py and the
    render_compare gates) cannot exercise the new engine path. Plan §7
    acceptance ("all committed samples reconstruct with coverage >= 0.80")
    cannot be verified end-to-end via the CLI today.
  • Determinism is half-shipped: same python invocation produces same
    output, but the CLI's fit_primitives() call doesn't pass
    use_deterministic_ransac=True unless someone adds it to FitConfig
    in pc2cad_cli.py.

What's needed

  1. Add --engine {legacy,compose} and --deterministic-ransac flags
    to pc2cad_cli.py (or --no-deterministic-ransac since the new path
    is gated behind a default-False flag).
  2. Plumb both flags into the FitConfig and the engine parameter on
    compose_body_with_features.
  3. Update tests/test_cli_mode.py to cover both flag combinations.
  4. Update docs/pointcloud-to-cad-guide.md with the new CLI surface.

Acceptance

python pc2cad_cli.py samples/X.ply --out out.step --engine compose \
    --deterministic-ransac

selects the new engine + deterministic RANSAC. Default behavior unchanged
(legacy engine, open3d RANSAC).

Context

Filed as the integration gap that blocks plan §6.4 task 5 (CLI plumbing).

The compose engine (commits 13ddca4 through 0cf5dfd) and deterministic RANSAC (commit f686579) are implemented and exposed via programmatic callers — `compose_body_with_features(engine="compose")` and `FitConfig(use_deterministic_ransac=True)`. The CLI does NOT expose either flag. Users running `python pc2cad_cli.py samples/X.ply --out out.step --report out.json` always go through the legacy heuristic path regardless of what they want. ## Reproduction python pc2cad_cli.py --help | grep -E 'engine|deterministic' # No output — neither flag exists in the CLI surface. ## Impact - The CLI is the documented user-facing entry point per AGENTS.md and the pointcloud-to-cad-guide.md. Programmatic callers exist (compose_body_with_features, fit_primitives) but the CLI is what most users run. - Test fixtures that run via the CLI (tests/test_cli_mode.py and the render_compare gates) cannot exercise the new engine path. Plan §7 acceptance ("all committed samples reconstruct with coverage >= 0.80") cannot be verified end-to-end via the CLI today. - Determinism is half-shipped: same python invocation produces same output, but the CLI's `fit_primitives()` call doesn't pass `use_deterministic_ransac=True` unless someone adds it to FitConfig in pc2cad_cli.py. ## What's needed 1. Add `--engine {legacy,compose}` and `--deterministic-ransac` flags to pc2cad_cli.py (or `--no-deterministic-ransac` since the new path is gated behind a default-False flag). 2. Plumb both flags into the FitConfig and the engine parameter on `compose_body_with_features`. 3. Update tests/test_cli_mode.py to cover both flag combinations. 4. Update docs/pointcloud-to-cad-guide.md with the new CLI surface. ## Acceptance python pc2cad_cli.py samples/X.ply --out out.step --engine compose \ --deterministic-ransac selects the new engine + deterministic RANSAC. Default behavior unchanged (legacy engine, open3d RANSAC). ## Context Filed as the integration gap that blocks plan §6.4 task 5 (CLI plumbing).
Author
Owner

Closed retroactively after fix landed on main in 21acdaf523.

Commit message: fix(test): seed plane RANSAC in profile_operations gate (Mark/pc2cad#66)

Card closure was correct; close step was bypassed (likely push-failed-recovery retry path).

Closed retroactively after fix landed on main in `21acdaf523`. Commit message: `fix(test): seed plane RANSAC in profile_operations gate (Mark/pc2cad#66)` Card closure was correct; close step was bypassed (likely push-failed-recovery retry path).
Mark closed this issue 2026-09-18 13:23:35 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Mark/pc2cad#69
No description provided.