Sweep1 Trim Issue

I’m attempting to recreate historical wood paneled millwork using Grasshopper and running into an issue with Sweep1. My grasshopper script basically sweeps two different profiles along a curve and creates inset panelling along the wall.

The issue I’m running into is with Sweep1. When the wall curve (along which the profiles are swept) has a large outset section (as shown below), the swept profile will be trimmed properly:

When the outset section is quite small, the excess from the sweep will not be trimmed (see below):

Do you have any suggestions for how I can solve this? I’ve tried trimming afterwards, but would like to avoid manual work as there are many sections which need to be created.


draw a 45-Degree line in top-View.
more or less the angular cut you would make if this was a real life workshop / cutting issue.
use this line for trimming in top view.

there is also the option to avoid trimming and use shear.
there is some older topics about some Frames / wooden profiles where this is discussed

EDIT: voila

post your file you need more feedback.

Thanks @Tom_P . The first solution worked well.

I was definitely hoping to keep everything procedural, but sometimes the quickest solution is a manual one.