Complex trimming of curves

I made a simplified version of a task that I have to do very frequently in Rhino. I have two closed curves that are laterally .75 inches apart they also may or may not intersect when viewed from the front. The example was simplified via drastically reducing the number of intersections that may occur.
The end result of my efforts is to create a closed curve using only the ‘inside’ lines. Therefore, the tasks that I perform to accomplish what I want is to highlight both curves and trim away all portions of the curves that are on the ‘outside’. Next I project to C Plane to make both curves co-planar and then finally I join.

I believe, for many reasons, that GH is the right tool as (opposed to Rhino scripting using Python). There are many tasks that I perform to create the curves ahead of what I have described as well as using the curves subsequently.

I have gone through a lot of GH tutorials on many occasions but they are typically geared to creating interesting 3D meshes or 3D solids. I just can’t seem to get any good footing on how to attack this.

Any help will be greatly appreciated.

gh Problem to solve…3dm (131.6 KB)

Something like that is working


Thanks tons. You made it look simple. However, I tried many of those same components prior to writing.

I think there is something still that I just don’t understand… I thought I wired my version up just like yours and it failed.

Can you post your files with internalised curves ?

Although I have a long history with Rhino, I am afraid I haven’t gotten very far with GH. Will you explain the process to ensure that I do internalize the curves?

I tried searching for it and didn’t find info on the process.


can’t you just do that with CurveBoolean?


Thanks for the interest. Yes you certainly can use curve boolean but I have to do it a lot. I thought that the process I described would be easy to do in GH. Laurent showed how easy it was to “automate” curve boolean. As I stated, there is much to do ahead of the curve boolean and a lot to do afterwards to accomplish the total work. I believe I can eventually figure out the front and back processes in GH and thus save myself a LOT of work.

Ok, yes depends on how many curves you have to process. As for the failure, seems this is a bug in rhino 6 GH. In Rhino 5 it works as expected. If you switch the curves it works (A into B and B into A).

if you right click on a component that has data stored (like the curve component) you can choose Internalize data. This way it stores the curve inside of the GH definition.


You were right… I think. I reversed A and B and it worked, I think…

I messed around with it a bit more and then broke it somehow.

As you showed me, I internalized the curves and here is the file.

I hope I get through this learning curve and still be sane!Curve (17.8 KB)

Just my dumb luck that this is the time I picked to really learn GH. (and these were the components that I picked for what I thought was the easy part of my overall process). I thought since the trimming process was so easily described that it would be perfect little bit to learn on. I still have Rhino 5 installed. In your opinion, should I go back to that to continue the learning process or wait a bit for the GH bugs in Rhino 6 to be shaken out a bit more???


Are you using Rhino 5 or Rhino 6?

I am using Rhino 6, I looked at your script and it didn’t worked, then I flipped the curves and it worked !!

Here with another way of doing, a bit long
Curve (14.1 KB)

This is now logged under RH-46523 and yes I can repeat it.

Sorry about the late response, we’ve been pretty focused on crashes these past few weeks.


  Thank you very much for the response.  Is there a timeframe for this to be fixed.  Everything I am learning grasshopper to attempt to automate seems to depend on this.

The problem is that sometimes curve area measurements are now negative. I’m hopeful it will be fixed within the week, but in the meantime I’ll add a bunch of abs() calls into my code, so if you’re on the Service Release Candidate update schedule you should hopefully get a fixed version this or next Tuesday.

How long does it typically take to get into a “normal” Rhino Service Release?