Strategy gap: profile-extrude detection does not compose compound shapes into a single body #32
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#32
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?
Profile-extrusion detection is not finding compound shapes
What
pc2cad.py::derive_profile_operations(around line 4317) emitsprofile_extrudeprimitives only when it can pair two parallelplanes with a polygon on one of them. For a compound shape (e.g. a
prismatic mechanical part with a top, bottom, and side walls), the
planes all exist in the fit, but they are not being composed into a
single
profile_extrudeprimitive that represents the overallextruded body. Each plane is emitted as its own independent
profile_extrude(post-commit16404ff's single-plane fallback) orleft unpaired.
The result on the
sample_plane_cyl.plytest (and theMerge_01_pc.plyRevopoint scan): the analytic fit produces a setof
planeprimitives andprofile_extrudeprimitives, but nosingle primitive represents the overall extruded body of the object.
The build123d export path (
pc2cad_profile.py::extract_profile_sketches)then iterates over the per-plane profile_extrudes and produces a STEP
file that is a stack of independent slabs, not a single coherent
solid with the right topology.
Reproduction
Expected
For a compound shape with a clear top plane, a bottom plane, and
side walls, the fitter should emit a single
profile_extrudeprimitive representing the overall extruded body, with the
side-wall planes and other features handled as cuts/booleans on
that body, not as independent profile_extrudes.
Actual
Each plane becomes its own
profile_extrude(or is left as a bareplane). The build123d export produces a stack of independentslabs. No top-down composition into a single body.
Suggested fix (not for me to implement)
Replace the pairwise-plane-pairing logic in
derive_profile_operationswith a top-down strategy: find thelargest overall planar profile, then pair it with a parallel plane
to determine the body depth, then treat the remaining planes as
side walls / feature candidates. See also the related bugs about
the missing feature-detection strategy and the missing "largest
whole shape" decomposition.
Related
sample_plane_cyl.ply) — adjacent symptom
2026-06-20 strategy review