Grasshopper

algorithmic modeling for Rhino

Hello and thank you for any help. 

I have made a small script that takes some curves, creates a point where they intersect, then uses this point to create spheres on the points. I then found the intersection of where the curves hit the sphere and created a plane on that point. My problem comes in here when the planes are made they are either all oriented towards one axis or various other axis and I want them to be perpendicular to the curves that they were made from and be facing the opposite of the center point of the sphere(created initially) I will add photos ASAP, Im just having issues with Bootcamp and screenshots(silly problem). 

Any ideas on how to orient the planes to be perpendicular to a curve and have the opposite direction of a center point. 

Thanks. 

Views: 1288

Replies to This Discussion

please along with the photos upload your definition too.

cheers

alex

Hello

From the screenshot it is not clear if these curves are lines or other curves. If they are lines you just need to put the curves to the z input of plane normal component, instead of the intersection points, and these lines will act as z vectors for the planes.

If the curves are not lines then you can do the following

cheers

alex

Attachments:

Thanks that worked great!  I tried it with multiple intersection though and it only works on one of the intersections. I have ideas of whats wrong but Im not sure I know how to fix it. Do you know if this could work at multiple intersections?

Thanks Alex,

Hello again

without a grasshopper file to check, i cant tell. please upload your file to take a look.

When the curves are selected as a group it works, when a full structure of curves is used it doesn't quiet work. I assume it has something to do with the data structure but don't know enough to understand what needs to happen. thanks for all your help. 

please upload the grasshopper file (with the rhino file too)

i cannot help you just looking the screenshot.

Links

Attachments:

Ok

you can do the following

First cull duplicates is used so that there aren't any extra spheres created (caused by overlapping points). Then each curve (that is why graft is used) is checked for intersections with the spheres.After curves graft you have a data tree with 30 branches (lists) each one containing one curve. The spheres are all of them in a list. When inputing those to brep-curve intersection component the default longest list data matching behavior outputs the intersection points in data tree with 390 branches (since we test each curve with all the spheres 13x30=390) where some branches have N=0 items, because not all spheres intersect with the curves.

Grasshopper keeps the data structure intact, so trim tree is used to bring the point data tree structure paths to be the same with the data tree of the curves, so that further components can be used.

cheers

alex

ps. studying data matching, list and data trees management is essential, then you will be able to work easily.

The file

Attachments:

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service