Grasshopper

algorithmic modeling for Rhino

Hi there

I wonder if there is some way to sort elements type in Grasshopper ?!

I'll try to explain :  I have a dxf file , this file contains different entities ( points , lines , circles , closed polylines , open polilynes ).

I need to sort these entities and bake them in different ways using different components according to the element type.

In a few words I'd like to grab these entities all together , send them in to a "sorting component " and have different element type in to the outputs ( i.e. 1 out put for circle .  1 for lines , 1 for points and so on )  in order to use them according to my needs.

is there a way / component that does this at least for certain entities ?

( what I am doing right now is to use rhino selection tools to pick different entities and then send them manually to different inputs but this is a bit time consuming and may lead to some mistake ).

thanks

Ivan

Views: 532

Replies to This Discussion

At its most basic level you can use the Params to identify different Geometry Types. What ever it flags as a Null is not that particular one and therefore you can dispatch the remainder down stream.

There are other ways such as using the Expression "Contains(s,p)" on the results of a panel to identify what the geometry is.

Hi Danny and many thanks for your quick answer

I have never used the param component before but it looks the easier between 2 options provided ( at least under a beginner point of view )

would you kindly attach the definition ? the icons have a different looks on my GH and I am not quite sure I am picking all proper components

if you could also attach a sample definition made using the expression editor that would be awesome

thanks, regards

Ivan

Sorry I didn't save it, plus I like to leave you some work to try and figure it out, aids the learning process :)

The Params I am referring to are the ones in the Params Tab > Geometry Panel the same ones you use to reference different types of geometry from the Rhino Document.

The other Components are [Null] and [Dispatch] both of which are found in the Sets Tab > List Panel. Also [Closed] component found in CUrve Tab > Analysis Panel

The [Expression] Component is found on the Maths Tab > Script Panel with the icon like this: "X|2"

Thanks Danny , that was a very good exercise

I really appreciate  ;)

Ivan

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