Partial border of combined curves

Hi all, I’m hoping to be able to script the following.

Looking at overlaying multiple curves and creating a single curve that represents part of the border.

In this example I have the profile of 3 x our CNC tools.

The end result is a curve that is the result of those tools if they were machined into a board (7mm in this example).

It is sort of a boolean curve trimmed.

Hope it makes sense!

as a starting point you may use

creating a closed curve.

now identify the domain / section that overlapping with the initial black rectangle:

you get the intersection domain.
use

or

to remove it.

1 Like

After the region union, you could also replicate the Trim with Brep GH component’s behaviour, which computes the intersections between the curve and a brep, shatters the curve using Curve.Split and then selects the piece of curve inside/outside the brep using Brep.IsPointInside. This may avoid dealing with seam problems, for the cost of computing an extrusion.

TrimWithBrep.gh (9.7 KB)

That is mint @magicteddy ! This was definitely above my pay grade and experience. I’m going to need to go a bit deeper than just Python & RS.
Regards,
Adrian

Thanks @Tom_P , I’m keen to learn some of the RhinoCommon functions - I can see that is where some of these extra features will be available!
Adrian