Grasshopper

algorithmic modeling for Rhino

Hi, I'm trying to write a vb component that takes an input curve and then outputs both the clockwise and counterclockwise versions of this curve (on the xy plane). I thought this would be simple, but the Curve.Reverse method is giving me some grief. It doesn't matter where you place this method in the script, it reverses all versions of the curve. I was outputting the curve to A, then reversing it, then output it to another B but they both come out the same orientation. I also tried creating a copy of the input curve, but the reverse method still reverses the original and the copy... Any suggestions?

Steven

Crv%20Orientation.gh

Views: 1323

Replies to This Discussion

Ok, I've got it working now, the problem was that I should use Curve.DuplicateCurve, instead of a simple "=". It also looks like all of the outputs of the GH component are committed at the end of the script, regardless of where they appear in the script. Is that correct, David?

A few follow-up questions:

1/ what is the difference between Curve.DuplicateCurve and Curve.Duplicate?

2/ it looks like the Curve.ClosedCurveOrientation method returns the opposite values to what it should. If I draw a clockwise curve in rhino, and bring it into grasshopper, my script reports it as counterclockwise. Has anyone seen this before?

Thank you,

Steven

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service