Grasshopper

algorithmic modeling for Rhino

any ideas how to accomplish this? I want to orient an object along a curve, with no overlap/intersection ---- like threading beads onto a string....

Views: 4477

Replies to This Discussion

not the best way to do it, but maybe a starting point for you!

Best Regards

DeDackel

Attachments:

Hi Evan,

the attached script shows a way to use a simple forward and backtrace logic (using bisection along the curve parameterization) to try fitting as many curves along a path.

It will go forward within the domain range if the curve intersects with the previous one or if the distance is too little, and back if the distance became too small. The script will then accept the result within some small tolerance. You can input a distance between objects that is larger than 0.

Here a screenshot of a sample input. While probably not perfect, this method seems more general and precise than the ones using offsets -- but it's slower and uses the Curve.ClosestPoints(curve, pt, pt) method from Rhino 5.

Some further optimizations are probably also possible. I hope this is useful,

- Giulio
________________
giulio@mcneel.com

Attachments:

Thanks, guys. Both very helpful....

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service