Grasshopper

algorithmic modeling for Rhino

I have a bunch of polyline generated with join curves. After struggling with the shatter command a day, I have discovered that the direction of the generated polylines randomly different. Is there way to unify the direction of the polylines?

Views: 1547

Replies to This Discussion

In case of open curves, try use "Flip Curve" component, you can assign a guide curve, maybe it helps.

In case of closed planar curves, you can "convert" them into surfaces, and depending on the angle between normal and Z+ vector determine if the curve is to be flipped or not. (counerclockwise perimeter make a positive normal)

Similar with non-planar closed curves but by using patch component.

Those are heavy solutions, slow.

Remember always to attach your data, or it will always be hard to get proper help.

The 'guide' input for the Flip Curve component is actually handy for both open and closed curves. If all curves (including the guide) are open, then each curve is reduced to a line from start to end. If flipping this line improves alignment with the guide, the curve is flipped.

If all curves (including the guide) are closed, then orientation is looked at instead.

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