Grasshopper

algorithmic modeling for Rhino

Python-Finding Shortest Curve Lengths in a Set of Polylines

(image/file included) Hi, I'm looking for some help solving a problem that's been causing me headaches. I have a set of closed polyline curves (forming rectangles). I offset each curve by a certain amount (in this case, 12). However if this offset number exceeds the length of the smallest polyline curve, the whole thing fails.

So I want to introduce an 'if' condition to set an upper limit to an offset to only apply to those polyline curves which are too small.

To do this I found the curve lengths for each set of polylines. Problem is, I'm only getting the sum of all four polylines for each curve. I started to write an rs.ExplodeCurves script but cannot get it to work.

If someone could take a look at this and help to set me in the right direction, that'd be great. Thanks!

Views: 446

Attachments:

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