Migrate export_step / export_stl / export_brep off FreeCAD, onto build123d + OCP — Phase 4: Rewrite export_stl to use OCP mesh + binary writer #44
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#44
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 4: Rewrite
export_stlto use OCP mesh + binary writerGoal: Replace
pc2cad.py:5212 export_stl(FreeCAD +tessellate) withan OCP
BRepMesh_IncrementalMesh+ binary writer pipeline. The_write_stl_binaryhelper atpc2cad.py:5183already accepts the(vertices, triangles)shape; just feed it OCP data.Approach:
BRepMesh_IncrementalMesh(compound, tol).BRep_Tool.Triangulation(face, loc)to getPoly_Triangulation(nodes + triangles). Applyloc.Transformation()tonode coordinates.
verticesandtrianglesarrays; pass to
_write_stl_binary.Files:
pc2cad.py:5212-5290(rewriteexport_stl),pc2cad.py:5288-5289(replace tessellate call).Acceptance:
python pc2cad_cli.py samples/sample_plane_cyl.ply --out /tmp/p4.stl --out-format stlwrites a binary STL.python -c "from stl import mesh; m=mesh.Mesh.from_file('/tmp/p4.stl'); print(len(m.vectors))"reports a positive triangle count.FreeCAD-tessellate output for the same sample (±20%).
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.Auto-triage: needs decompose
Marked
triage-approved+needs-decompose. decompose-executor will pick this up and break it into implementable sub-issues.Auto-triage: needs decompose
Marked
triage-approved+needs-decompose. decompose-executor will pick this up and break it into implementable sub-issues.