Grasshopper

algorithmic modeling for Rhino

Hi!

Basic list question, but I can not find answer anywhere.. 

I have 100 circles, circles are divided into 3 to 7 parts by random. 

How can I divide that resulting list (3to7 points per circle) into 5 chunks ->

1 chunk with all items that divide circle into 3 parts.

2 chunk with all items that divide circle into 4 parts.

3 chunk with all items that divide circle into 5 parts.

etc. until items that divide circle into 7 parts.

Hope you can understand my problem.

I added image of definition below.

Thanks!

Views: 1699

Replies to This Discussion

I forget who wrote this script, excuse me.
But I think this is what you need!

Attachments:

Thanks for fast reply!!

this is very cool! (I wonder if this is possible without c++?)

This is almost solved, now I get all circles that are divided.

What I need is those points, grouped and divided. 

All points that divide circle in 3 parts, 4 parts etc. 

 

You must give the same amount of values in both parameters. Therefore, you have to repeat 6 times 6, 5 times 5, 4 times 4, 7 times 7, and 3 times 3..., altogether a list of 6 + 5 + 4 + 7 + 3... elements, a value for each point.
This script is wrinting in C#, not C++. And of course, can be done with standard components, perhaps someone else help you with that.

Ok, I understand that part about same amount of values.

But how can I achieve that if random component divides circles every time in different length list ? 

Ok I did found answer! 

Had to use longest list component.. 

Thanks for help! 

Have a great weekend! 

See you've already found your answer - but here's what I came up without C# scripting.

Attachments:

Brilliant!! I always struggle with lists.. 

Thanks! 

another way

Attachments:

thanks!!

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