Project Curves on overlapping Breps

Hey there, what im trying to do is pretty simple: project multiple splited curves on the highest/ first Brep in Z direction with out projection the curves on every lower brep

I tryed to find the closest point from the curve mid to the Breps but in some areas the closest point isnt the projected point which leads to a mess of vectors.

then green circle shows what i try to do and the red circle show points where it doesnt work.

Project on (29.4 KB)

this is my script so far - i hope you have a solution or a differnt way to go :slight_smile:
Thanks a lot !

Yes, but not in Grasshopper. I worked with this stuff a lot in a previous life… This is a Python script, designed specifically for projecting curves representing roads, buildings etc. onto a stepped terrain model. Try it out and let me know if it’s useful… (5.7 KB)

Something went wrong with your file:

Unfortunately i didn’t know how to use phyton :frowning: but maybe im trying to learn it for this Issue.

You don’t need to know how to use Python, just run the script. To run a python script once or twice, save it to your desktop, in Rhino type _RunPythonScript, browse to the file and open. Follow the command prompts to select your objects.


haha thats easy - i have learned something new :smiley: your script did exactly what i tried - excelent work and thanks a lot!!

Glad it worked for you. Rhino does not really have a good native solution to this problem, which is why I wrote the script. With some work, it could also be done in Grasshopper, there is nothing really complicated going on, it’s just a matter of first splitting all the curves with the projections of the contour lines, then projecting each split segment to all the surfaces one by one and retaining only the uppermost result of each projection.


That python script is really good, thanks for sharing it @Helvetosaur

I ended up trying to do what you explained in GH…it worked for the most part. I needed the NGON add-on to get the boolean intersection to work on the whole list of 2D feature regions. The built-in region intersection only worked with one closed region at a time. (a very clumsy attempt at for-each in GH on my part)

I did this a few weeks ago:

File: (763.1 KB)
For the full workflow I added a c# that exports each contour as pdf

File: (776.1 KB)