Generating multiple objects with random slider values

Hey guys,

I would like to generate random gears which are defined by sliders values by recording the output shape (a Brep) every time. How do you run your script multiple times with random values (in the slider interval)? Is there a way to recompute as many times as you want by using a loop?


There is more than one way of doing this but I doubt anyone could propose the proper one for your case without you providing at least a piece of the definition

Thanks for answering

Just consider this simple example, how can I generate and store (bake) different cylinders 100 times for example?
I think that I know a way to do it : you generate a list of random values and you insert it to the circle radius parameter/vector amp but I have to do this with all the sliders. (3.8 KB)

I don’t think you need the sliders if you want just random values. Use the random component with pre-derined domain of numbers to select random one (that should correspond to the min and max of the slider to be replaced.

If you want a design table with different configurations, they should be defined in advance and only one slider should be needed (integers) to define the index of the configuration out of the list.

You did not mention scripting components but if you can use them, I would suggest go for them instead, you’ll have more control over what the inputs and the outputs will be.

If you want to go really crazy and define randoms continuously you can play with buttons and scripting components to generate several random configurations each click, then bake.

*(sorry no access to rhino now so I cannot view your file)