Grasshopper

algorithmic modeling for Rhino

I would like to seperate faces with three, four and five edges ( for example triangle, quad and pentagon) automaticaly from one list to different lists, because the Input will vary between many surfaces with mixed types of faces.

Is it possible to evaluate the number of edges from faces from a surface?

or:

how can i split a list by nubers of thier subbranches?

In this example I have 6 branches with three or four Subbranches, witch I want to get in two seperate lists.

I hope it is undestandable and someone can help me here?

Views: 613

Replies to This Discussion

that is the list i want to seperate.

Attachments:
measure list length, then use greater than and test the list against the number 3. then cull patter the greater than list to get all sides having 4. then cull the equal to or less than to get the 3.

Hey Michael, thank you so much for your support. I think this is the way I was looking for. I only prefere to use "equality" instead of "larger than". The lists are now seperated as I expected, but why do each Item has always 5 Numbers in the headline -> {0;0;0;0;0} ??? Shouldn't the list with three looks like {0;0;0}, the list with four like {0;0;0;0}, and so on?

Attachments:

Hope you can open the attached file, it was saved with an internal version.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Attachments:

Thank you David for the endeavour, but what i want was to differ by the amount of edges from each face inside a Surface. This example creates faces with 3,4 or 5 edges, right?

Hi Johannes,

first I create a bunch of polygons with 3, 4, 5 & 6 sides at random. It doesn't really matter where these polygons come from, I just had to create a bunch to test the logic.

The bit after the Polygon component is the interesting part, it will group all curves with equal numbers of corners into a single data-tree where the branch identifier equals the number of corners.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

ok, i was confused about the result I saw in Rhino because . I have to check your approach once again.

I've played a liddle bit with your definition to get into it. At first I've replaced the random polygons against some different intersect Surfaces, also createt by grasshopper but wich I want to load from Rhino at the end. So now the input data is more that what I need. But as I read the output data the lines were sortet by their polygon types but they lost their info about their togetherness, right?

Anyway, I think I've to learn how to work with the grasshopper data tree, at first!

Attachments:

I know(?) that this can be made with standard components, but can replace item and other components (cant tell which one) have input&output for parallel replacing etc - which would work exact as parallel sorting with sort component ?

I often use parallel sorting, so I think this would be usefull (e.g. to find previous indices)

To make it more clear - this is how I use sorting :

List (b,a,c)

List of primary indices (0,1,2)

---- sorting b,a,c

outputting sorted list (a,b,c) + list of indices (1,0,2)

nice one, one thing I cannot figure out, what does outputting from the data viewer do to the data. I know it changes something but what?

The Param Viewer object exports a list of paths, basically the {0;0}, {0;1} stuff you see in it.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

ah thanks, just one of those routines I never used before, makes perfect sense now. I thought param viewer would just pass through the data similar to a parameter component like curve or point. Very good to know.   

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service