Grasshopper

algorithmic modeling for Rhino

Is there away to separate different curve types from a list. My list has planar curves and line like curves, I want to cull out or remove the line like curves. Any suggestions and if not can there be a future component to do so? Thanks.

Views: 4933

Replies to This Discussion

You could probably cull the line-like items simply by attending at their string name:

if (input=='line-like) then Cull

Can you post the file?

Basically I'm using a voronoi cluster on a spherical shape, I want just the outside shell lines this way I can use those lines to split the surface of the sphere. I dont want all the inside voronoi stuff. So I figured since any lines inside the voronoi pattern are always straight I could somehow remove straight lines and keep only arched ones. I need a way to work for all closed freeform curved breps. essentially I will start with a sphere but mold it maybe in rhino or in GH. Maybe you can help me solve it this way of removing straight pieces or maybe you know a better way to go about it all together.

You will need this cluster:http://www.grasshopper3d.com/forum/topics/3d-voronoi-4

 

P.S. also I noticed when I use brep components (explode) I get an extra edge which is the line of the sphere, I have pulled out and labeled it in my definition, I need a way to make that go away easier as well if possible.  

Attachments:
essentially I want to create something like this. http://3ddreaming.blogspot.com/2011/09/nympha-cultural-center-for-f...

Connect the output of wherever your curves are coming from to a panel.  Bring down a Math>Script>F(x)1 component.  In 'x' goes the output of the panel with the curve types. The function would be:

Contains(x,"Planar")

 

WOW cool, but correct me if I'm wrong, don't i need line like not planar, the arced lines are still planar. So would i type "line-like"

My list has planar curves and line like curves, I want to cull out or remove the line like curves.

I was just responding to your original post.

 

So would i type "line-like"

 

No, you want "Line-like"

Great tip, thanks.

 

Hey

I tried out the above defination, but i cannot get the F(x) to work with Contains(x,"Planar) since this is also an older threat is their got any change to the way u make F(x) ?

To get the opposite, i.e. Does not contain(x,"Planar Curve)

What would you write in the function for the opposite? "Does not contain", a long shot, does not work.

Using Luis' example from above

Simply go to the P input of the Cull Pattern Component and select Invert from the context menu. This will swap all 1s for 0s and 0s for 1s.

So in effect you are still identifying the ones that contain Planar Curves but changing the logic of the cull input

Almost Taylour. It's:

Not Contains(x, "Planar")

Not is a keyword that inverts a boolean. Thus, True becomes False and False becomes True.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

There are some weird things happening with brep/brep intersection, but this thing seems to work :

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service