I’m trying to trim multiple curves with multiple Breps in Grasshopper. I got it to work, but it seems like I’m going about it in a round about way, but this is the only way I’ve been able to get it to work. What I am doing is splitting out the Breps and doing a Trim with Brep, then passing the outside to another Trim with Brep… etc… so I end up with a chain of Trim with Breps like this:
I also have to have all these Trim Tree components in order to maintain the original tree structure of the original curves.
While this does work, it is very limited because I can’t give it any random number of Breps to trim with, if I want to add another one, I need to wire up another link in the chain.
Is there an easier way to do this that will automatically work regardless of how many Breps I supply, and will also maintain the original tree structure of the input curves? Or will I need a script to do this?
I think split with brepS will make your life easier
then it’s just a matter of finding which shattered segment lies inside a Brep and which one is outside, and for that you can use Point on Curve and Point in Brep to get a list of booleans
@inno Thank You!!! I never noticed that some components have an ‘S’ at the end to work on multiple items. That makes things SO much easier!!!
Insead of Split with Breps, I did Trim with Breps, and then it correctly keeps track of what was inside the Breps and what was outside. I still need the Trim Tree, but this is SO much better than the convoluted mess I had before!
I thought there should be a solution but instead of looking for a different component, I was trying to change the attributes of the inputs and things like that, and of course none of that worked at all.