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

Rotate an object 3D

$
0
0

I made a scrip to rotate with copy an object rotating it two angles but an error appear:

Dim arrObjects, arrPoint, arrvector1,arrvector2,lastObject1
arrObjects = Rhino.GetObjects("Select objects to rotate")
arrPoint = Array(0.0, 0.0, 0.0)
arrvector1= Array(0.0, 1.0, 0.0)
arrvector2= Array(0.0, 0.0, 1.0)
Rhino.RotateObjects arrObjects, arrPoint,92.1466,arrvector1,TRUE
lastObject1 = Rhino.LastCreatedObjects
Rhino.RotateObjects lastObject1, arrPoint,80.7656,arrvector2,FALSE
Rhino.RotateObjects arrObjects, arrPoint,66.6523,arrvector1,TRUE
lastObject1 = Rhino.LastCreatedObjects
Rhino.RotateObjects lastObject1, arrPoint,118.2595,arrvector2,FALSE

Only worked the first RotateObjects, then the second one generates an error:
“Type mismatch in parameter: Array is required”
It seems that lastObject1 failed, I tried also using lastObject but also failed.
I think a “LastCopiedObjects” command should exist

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 5835

Latest Images

Trending Articles



Latest Images