Add STL output format as first-class export option #10
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#10
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?
Context
Earlier this morning we removed
--out-format stl(andgltf) frompc2cad_cli.pybecause mesh-format output was deemed out of scope for pc2cad (the tool's job is point cloud → editable CAD solid, not point cloud → mesh). The user has since reconsidered: mesh export IS a legitimate use case for this tool, just not as a substitute for CAD output — users may want both, or may want a fast STL preview while the analytic reconstruction runs.Scope
Re-introduce
stl(and optionallygltf) as--out-formatchoices, but with a clear semantic distinction from the CAD path:--mode analytic --out-format stl— produce an STL mesh from the fitted analytic primitives (tessellate the analytic B-Rep, NOT from the residual point cloud). This gives users a faithful preview of the analytic reconstruction.pointcloud_to_cad_converter.pyand other point-cloud → STL tools already do well.Concrete changes
pc2cad_cli.py: re-addstl(and possiblygltf) to--out-formatchoices with documentation noting the difference from the analytic-CAD path.pc2cad.py: ensure the CAD exporter can tessellate analytic solids into mesh format (build123d hasb.export_stlfor Solids/Compounds; the FreeCAD backend would needPart.Shape.tessellate()+ STL writer).PLAN.mdandpointcloud-to-cad-guide.md.Acceptance
pc2cad_cli.pyaccepts--out-format step|brep|stl(gltf optional).stloutput is generated from analytic primitives, not from a Poisson mesh of residuals.stlvsstep.Why this matters
Users scanning parts often want a quick visual preview without round-tripping through STEP into a CAD app. STL from analytic primitives is faithful (no Poisson artifacts) and fast.