algorithmic modeling for Rhino
Tags:
Are u trying to ask for Recursive, Iterative process ??? Yes, can be done using plugins like Anemone and Hoopsnake. On a little advanced level scripting.
Thank you Shridhar!
That's what i'm looking for. I'm only in the beginner level in GS and not really good in scripting at all. So I'm trying to find a kind of readymade solution. Gonna try those plugins today... Thx
That's what scripting is for, here being a distillation of a Python script I found by finding the command TryFitCircleTTT in the Rhinocommon.chk help document and Googling it to discover a Rhino Python script not made for Grasshopper and full of silly error checking. Hey, if it fails, you'll know it anyway, so I stripped that crap out.
I hate how long it still is and wonder what all the fuss is about for so many cases that must need tweaking, which I labeled A to E:
The command TryFitCircleTTT requires three hint parameters just like the equivalent Rhino command itself when you use it, and these parameters are formatted from 0 to 1 for how far along the curve you have selected as your point.
A former thread on this question did have an all Grasshopper solution:
http://www.grasshopper3d.com/forum/topics/tangent-circles-between-2...
Thank you Nik.
I'm definitely meant recursive operations in common. Not only with circles. You know the scripting for me is like chineese arithmetic. Moreover I hope those kind of operations are so frequently required and the good people are have those scripts already made for sharing :))
Sorry, a line went missing as I made a cleaned-up screenshot, namely this line after "import Rhino":
import scriptcontext
I refactored that code to make it clearer and shorter.
What you call "refactored" as a chemist I call "distilled" and thank you, I just knew it was possible to fix that ugly beast but I could barely figure out what the original author was up to, even after stripping out hoards of bizarre error checking. It's now twice as fast too.
Here is the whole Grasshopper file, which now being both short and in Python, most people can modify at will.
This is an example of how to make circles between two curves using anemone. It is not the right way for this purpose, but I think that's what you were looking for.
EDIT:
B.T.W! I just saw on your profile you are in the jewelry sector, this problem is due to gems between two curves? If so, Peacock already has a component for this purpose.
http://www.food4rhino.com/project/peacock?etx
Great! Thanks!
That's the jewellery problem! The Peacock Rocks! Diggin' in deeper!
PS: Already got crushed rhino ^_^
Peacock "Gems by 2 curves" has an input that seems to require you specify where the gems are instead of having them placed automatically by packing, and nothing outputs if I clear the default values that offer an even spacing of 11 gems from 0.0 to 1.0, and though the Anenome script works it is not as robust to various shapes and sometimes just stops at some point even on mellow curves:
The Hoopsnake script in the other thread: Hoopsnake doesn't want to appear multiple times in a document since resetting one resets them all and it only runs the first instance when I pasted two more copies of the whole script in, so I'll do them separately, and instead of an input reset wire, there is a right click Reset All item in the pop-up menu.
I understand now how the two looping components work, in having a geometry input for the first item, then they accept a second item input as new geometry that then gets looped as the new geometry replaces the original. What a great hack, so I was wrong above about only being able to loop numerical values.
Since I really like Anenome better due to its nice interface, I've converted the old thread Hoopsnake program to Anenome. It still won't handle multiple curve pairs, so I made copies of the whole script.
I learned a lot today. Thanks guys. Given how well these straightforward scripts can work, I'll bet there's a much shorter Python version possible, one that most anybody could understand and thus adapt. If I have time I can start again this time from scratch. Converting the long one taught me about the problem though. Grasshopper makes it easier though, since Circle TTT only needs one center point hint whereas Rhinocommon TryFitCircleTTT needs three.
that was a week of hard brainwork. but i got it made!!!
So, the aim was to have..
1. Gems roadlike setting using only 2 curves.
2. The curves non complanar and have 3D rotations.
3. All the gems have defined size from a list of available sizes.
4. The gap between gems is controlled.
5. Prongs are placed among gems and totally controlled.
Keep on working on algoithm to make it more universal, controlled and bugs free.
Thank you guys for showing me THE WAY! ^_^
Here is the subject to discuss. Maybe someone finds interesting turns in my logic.
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by