Grasshopper

algorithmic modeling for Rhino

This should be simple. I'm trying to move a curve in VB.  I tried the following (where x is the curve):

Dim vect As New Vector3d(0, 3, 0)
A = x.Transform(Transform.Translation(vect))

but the return is a Boolean, not a curve.  How do I get the geometry of the translated object?

Thanks,

Jon

Views: 1179

Replies to This Discussion

Hi Jon,
yes, the example is right, and it does move the curve without making a copy. But the return value is just stating whether the operation succeeded or not.
So, all you need to do is:
Dim vect As New Vector3d(0, 3, 0)
If x.Transform(Transform.Translation(vect)) Then
A = x
End If


Otherwise, also Curve.Translate() will do.

- Giulio
______________
giulio@mcneel.com
McNeel Europe, Barcelona
Gotcha. Thanks, Guilio.

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