algorithmic modeling for Rhino
I have a very pesky tree.
I know what I'd like to do but my brain has melted trying to figure out how to get it done. There are too many integers floating around in my head.
Hopefully this example is clear enough...
TREE
{branch}(index) = value
{0}(0) = 1
{0}(1) = 2
{0}(2) = 3
{1}(0) = 0
{1}(1) = 3
{1}(2) = 4
{2}(0) = 0
{2}(1) = 3
{3}(0) = 0
{3}(1) = 1
{3}(2) = 2
{3}(3) = 4
{4}(0) = 1
{4}(1) = 3
PAIRINGS (specified by the first occurance of a branch / value combination)
list1 : list2
{0}(0) = 1 : {1}(0) = 0
{0}(1) = 2 : {2}(0) = 0
{0}(2) = 3 : {3}(0) = 0
{1}(0) > this index has now been used, move on to the next one (etc.)
{1}(1) = 3 : {3}(1) = 1
{1}(2) = 4 : {4}(0) = 1
{2}(1) = 3 : {3}(2) = 2
{3}(3) = 4 : {4}(1) = 3
Thanks!
Tags:
So my friend has this Maya MEL routine that I wanted to see if I could recreate with GH. The key thing is the labeling since every face and clip angle are unique.
Here's the jist of it with a photo, and it was only devised for triangular faces:
I could track all my edge labels (via the neighboring cell discussion) but from that info (the pesky tree) I needed unique face pairs to output a single crease angle.
Now (with your scripted component) I have the crease angles. All the 3D text is temporary for trouble shooting. This is 3 faces from a dodecaheadron:
So now I have the remaining hurdle as to whether the proper crease angle is the GH angle or the GH reflex angle.
The funny thing with the "pesky tree" is the meaning of the pattern doesn't become apparent until it's more complicated than the simpler excerpt from above.
I think I could make the scripted component a little cleaner if I use some nested loops instead of your search and remove method, but that may take me a while.
But it all the fun comes from this guy:
Actually, I like your code a lot (now that I look at it again)...
If David gets the [Item Index] component to work, I think it would be much easier to do everything without scripting.
Thanks for your help!
Hi Taz,
Not sure if you missed this but there is a very simple VB script to take care of the Item Index work around.
http://www.grasshopper3d.com/forum/topics/problem-with-item-index?c...
UPDATE:
So measuring the angle between vectors turns out to not be necessary. As always, trigonometry is our friend.
The vectors are necessary to draw an arc, but constructing an arc is the same as measuring the angle since the arc subtends the angle. And if the radius is a unit length, then the arc length is the angle (in radians).
Now my crease angle is always correlated with the surface normals (since a polysurface normal is used to construct the arc).
-taz
hallo,taz
please tell me how can i find those neighborhood surface.
many thanks
where can i find the gh file so i can learn dome thing out of it !!!
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