Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5788

How to copy a Vector3d in Python?

$
0
0

@Eugen wrote:

Hello!
Is there a simpler way to copy a Vector3D than like so?
There’s no Copy() or Set() method in Vector3D.

import Rhino.Geometry as rg

va = rg.Vector3d(1,2,3)
vb = rg.Vector3d(0,0,0)

vb.X = va.X
vb.Y = va.Y
vb.Z = va.Z
vb *= 10

print va
print vb

Thanks!
Best regards
Eugen

Posts: 15

Participants: 6

Read full topic


Viewing all articles
Browse latest Browse all 5788

Trending Articles