align extruded solids according to the PartBuilder

This commit is contained in:
hiaselhans 2023-04-19 22:24:15 +02:00
parent ef35afa085
commit c1b47d38fc

View file

@ -153,6 +153,16 @@ def extrude(
) )
) )
# Align the extrusions to the current workplanes
if to_extrude is not None:
if workplanelist := WorkplaneList._get_context():
if workplanes := workplanelist.workplanes:
new_solids = sum([
[wp * solid for wp in workplanes]
for solid in new_solids
], start=[])
if context is not None: if context is not None:
context._add_to_context(*new_solids, clean=clean, mode=mode) context._add_to_context(*new_solids, clean=clean, mode=mode)
elif clean: elif clean: