Grasshopper

algorithmic modeling for Rhino

Repeating a list for every piece of data in a list?

Hey there

Right now I'm trying to create an algorithm that will make the geometry for a row of gears, which will all have randomized sizes, gear teeth, etc. So far the algorithm is working, but I'm having trouble with the teeth.

Essentially, the first part of the code creates the circles (Image 1&2).

What the second code should do, is, based on a random number, generate a set of lines going from the center of each circle to the outer rim of the circle. Each line should be equidistant from each other, creating a "wagon wheel" type design. As you can see from the images, The program is drawing the lines, but it is only drawing one set of lines, and splitting them between all of the circles. What I want it to do is draw an entire new set of lines (hopefully a different / randomized amount every time) for each circle, so I can go from there and turn them into "gears".

Thanks for the help. I hope everything I linked made sense.

IMAGES http://imgur.com/gallery/HgAke

Views: 486

Attachments:

Replies to This Discussion

Your link is broken: http://imgur.com/gallery/HgAke

It's bad practice to run data through a panel; better to wire them in parallel instead of series.

Not a good idea, IMHO, to rename components; rename inputs and outputs instead.  For example, "FULL RADIUS DRAWER" is an 'Ellipse' component...

But both radius inputs to 'Ellipse' use the same value!?  So why not use a 'Circle' instead?

You are inserting zero as the first value of three lists: "FULL Radius", "OUTER Radius" and "INNER Radius", but a radius of zero produces an error for both ellipse and circle, so why do that?

Instead of a list ('Series') of "ANGLES FOR TEETH LINES", why not just divide the curves (circles, ellipses) by eighteen?  Much more accurate than plotting points using X/Y values.

P.S.  The more I look at this, the more questions I have - so I'll stop at this for now.

Attachments:

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

© 2025   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service