From c1b47d38fc50f7a7a040e6995c58d1260a18db1e Mon Sep 17 00:00:00 2001 From: hiaselhans Date: Wed, 19 Apr 2023 22:24:15 +0200 Subject: [PATCH] align extruded solids according to the PartBuilder --- src/build123d/operations_part.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/build123d/operations_part.py b/src/build123d/operations_part.py index 58b2cda..09f8c72 100644 --- a/src/build123d/operations_part.py +++ b/src/build123d/operations_part.py @@ -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: context._add_to_context(*new_solids, clean=clean, mode=mode) elif clean: