Remove mesh output paths (out of scope for pc2cad) #9
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#9
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?
pc2cad is a point-cloud → editable CAD solid pipeline. The output is STEP/FCStd + JSON report. Mesh export (.stl/.ply) and freeform mesh reconstruction are OUT OF SCOPE — that is a separate pipeline (point cloud → STL). This tool only outputs CAD primitives.
Scope
Remove from pc2cad_cli.py
--modeflag'shybridchoice (keep onlyanalytic)--freeform*flags (--freeform,--freeform-poisson-depth,--freeform-density-trim,--freeform-bpa-radius-scale,--freeform-alpha)--out-residualflagstlandgltfchoices from--out-format(keepstep,brep)b.import_stl(tmp_stl)and includes aCompound([prim_solids + [residual_solid]])— that is mesh in CAD, remove it)if args.out_residual is not None ...call site at the end of main()freeform_methodandfreeform_*kwargs from theFitConfig(...)constructor callRemove from pc2cad.py
residual_mesh: Optional[o3d.geometry.TriangleMesh] = Nonefield fromFitResultdataclassresidual_mesh = None; if config.freeform_method: residual_mesh, freeform_report = _reconstruct_freeform_mesh(...)block — replace with a simple residual stats report ({"remaining_points": ..., "total_points": ..., "residual_ratio": ...}) under theresidualkey in the report dict (rename key fromfreeformtoresidual)residual_mesh=residual_meshkwarg from the FitResult constructor call siteexport_residual_mesh()function at the bottom of pc2cad.py (around lines 3142-3151)fieldto the dataclasses import and addreport: Dict[str, object] = field(default_factory=dict)as a default on FitResultfreeform_methodfield on FitConfig — only if no caller references it after your editsUpdate PLAN.md
DO NOT touch
load_point_cloudwith--use-vertices) — that is a valid entry point (mesh in, CAD out). The input concern is fine.--use-verticesflag andmesh_samplesargumentpointcloud_to_cad_converter.py— already clean per grepbuild123d_converter_generator.py— separate file, leave alone unless it references removed symbolsscripts/andtests/— only update to match the new surface; do not rewriteAcceptance
python -m pytest tests/ -xpasses--mode hybrid,--out-residual,--out-format stl,--out-format gltfas unknownpc2cad.pyno longer hasresidual_meshorexport_residual_meshsymbolspc2cad_cli.pyno longer references freeform / mesh output pathsremove-mesh-outputinMark/pc2cadBackground
The user already tried implementing this directly and got stuck mid-edit. The working tree has partially-applied broken edits across pc2cad.py, pc2cad_cli.py, and pointcloud_to_cad_converter.py. Kilo quickfix should clean up: either finish them or revert and reimplement cleanly, whichever is faster.
Use the systematic-debugging skill to investigate before fixing. Use the shell-scripting skill for any shell commands. Commit on the branch as instructed. Report back when done.
Overseer cleanup: quickfix session idle-killed at 10min. Partial work left in working tree (pc2cad.py: 2 ins / 3 del — dataclass
reportfield switched tofield(default_factory=dict),residual_meshremoved from FitResult).Refactor in
.tmp_tests/REMOVE_MESH_EXPORT.mdis far from complete. Still TODO:residual_mesh = None; ... _reconstruct_freeform_mesh(...)block infit_primitives(line ~1964) and replace withresidual_report: Dict[str, object] = {"remaining_points":..., "total_points":..., "residual_ratio":...}. Rename report keyfreeform->residual(line 1992).residual_mesh, ... = _reconstruct_freeform_mesh(...)call site (line ~1985).freeform_method=...and allfreeform_*kwargs fromFitConfig(...)constructor inpc2cad_cli.py.stl,gltffrom--out-formatchoices in CLI; remove--out-residualand--mode hybridflags.residual_mesh,export_residual_mesh,--out-residual, user-facingfreeform_method).cd /home/b/Projects/pc2cad && python -m pytest tests/ -x— all tests must pass.Work has NOT been verified or committed. Recommend manual hand-off or re-dispatch with explicit scoping.
Closing as superseded. The half-broken state this issue was opened to address has been resolved by reverting the working tree to clean HEAD. The pc2cad.py FitResult dataclass is back to its original form. The original mesh-removal scope is still a valid refactor but should be re-scoped as a fresh ticket rather than fixing prior in-flight work.