Migrate export_step / export_stl / export_brep off FreeCAD, onto build123d + OCP — Phase 2: Migrate boolean ops to OCP (BRepAlgoAPI_*) #42
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#42
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?
Phase 2: Migrate boolean ops to OCP (
BRepAlgoAPI_*)Goal: Replace
shape.fuse / shape.cut / shape.commonwith OCP booleanoperations at every call site in
pc2cad.py.Approach: Use
BRepAlgoAPI_Fuse/BRepAlgoAPI_Cut/BRepAlgoAPI_Common. These are not method-chained like FreeCAD's — eachreturns a
BRepAlgoAPI_*object whoseShape()property gives the result.Wrap in a small helper
_fuse(shapes: List[TopoDS_Shape]) -> TopoDS_Shapethat handles the iterative fold.
Files:
pc2cad.py:3809, 3831, 3843, 3851, 3860, 3869, 3925, 3944, 3971, 3978, 4040, 4183— every.fuse / .cut / .commoncall site. Also theboolean ops inside
_cut_by_chamfers,_cut_by_fillet_tools,_cut_by_slot_tools,_cut_by_hole_tools.Acceptance:
git grep -nE "\.fuse\(|\.cut\(|\.common\(" pc2cad.py | grep -v _fuse_helperreturns no hits.
python -m pytest tests/test_pipeline.py -vpasses.python pc2cad_cli.py samples/sample_plane_cyl.ply --out /tmp/p2.stepproduces a valid STEP (boolean ops no longer raise NotImplementedError).
Decomposed from pc2cad#23
Auto-triage: needs decompose
Marked
triage-approved+needs-decompose. decompose-executor will pick this up and break it into implementable sub-issues.