Grasshopper

algorithmic modeling for Rhino

Hi, 

I am currently trying to orient a series of octagons along two curves. Currently the octagons are rotated to face the centre of an imagined circle.

There are a series of points which dictate spirals, curves have been drawn along these points (one interpolated, one polyline) and it's along these curves that I would like to orient my octagons so that they rotate smoothly along the length of the curve. 

For simplicity I have isolated the key elements of the script into  grasshopper file, though the original from which they were generated can also be uploaded if it is not enough information. 

Any help would be greatly appreciated,

Tom

Views: 4380

Attachments:

Replies to This Discussion

Does this help?

(It would help if I could see where to attach the file!!)
I'm sure I'm being retarded (its been a long day after lock in last night so my brain is running at half speed)

Anyway - use area to find the centroid of the octagons

Curve Closest Point with Centroid and Curve.

Evaluate Curve to find using the curve and the parameter from CurveCP (this is the key as it will give you the tangent of the curve at the closest point) - it might be worth using a vector display of the tangent just to highlight things - but not essential

Place an xy plane at the centroid of the octagon.

place a new vector (right click and set one vector - just draw a vertical line)

angle node - will you give you the angle between your newly created vector and the tangent coming out of evaluate curve

rotate object in plane - original octagon as geometry - angle from the angle component and plane from the xy located at the centroids...

God that was much more difficult than simply uploading the file .... Good luck!

Hi J-P, 

Thanks for the reply. The instructions were pretty clear thanks but I'm not sure I quite followed them correctly. The octagons are rotating following your script but they're not rotating quite as expected, certainly not following the curve angle. I'm sure it's a mistake I've made somewhere along the way. Attached is my edited script that perhaps may illustrate where I've gone wrong. Thanks!

Attachments:

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service