Trim Multiple Surfaces with Multiple Surfaces

Hi All,

Can some one please help me with a Python script? I found the script on this Topic (link below), script by @Patrick_Tierney

The script works great when I try to trim one surfaces with multiple surfaces. What I am trying to achieve is to trim multiple surfaces with multiple surfaces as per screenshot below. Can it be done? Geometry.Trim works only with one surfaces for me. Springs.RecursiveTriming doesnt seem to work either.

> import clr
> clr.AddReference('ProtoGeometry')
> from Autodesk.DesignScript.Geometry import *
> #The inputs to this node will be stored as a list in the IN variable.
> base_surface = IN[0]
> circles = IN[1]
> points = IN[2]
> new_base = base_surface
> for i in range(len(circles)):
> 	new_base = new_base.Trim(circles[i], points[i])[0]
> #Assign your output to the OUT variable
> OUT = new_base

Kind Regards,

Easiest way will be to take the version of the code which works with one surface trimmed by many, and create a custom node from that as you’ll be able to leverage list lacing and levels that way.

1 Like

@JacobSmall that worked great! Thank you, much appreciated.