Skip to content

Commit

Permalink
align extruded solids according to the PartBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
hiaselhans committed Apr 19, 2023
1 parent ef35afa commit a34bf3a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/build123d/operations_part.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,14 @@ def extrude(
)

if context is not None:
# Align the extrusions to the builder workplanes
if to_extrude is not None:
workplanes = WorkplaneList._get_context().workplanes
if workplanes:
new_solids = sum([
[wp * solid for wp in workplanes]
for solid in new_solids
], start=[])
context._add_to_context(*new_solids, clean=clean, mode=mode)
elif clean:
new_solids = [solid.clean() for solid in new_solids]
Expand Down

0 comments on commit a34bf3a

Please sign in to comment.