Change position of a geometry in c#

hi
how can i change postion of my Object in runtime ?

imagine i have a curve
i used this code but didn’t get good result

doc.Objects.Transform(playerBody, Transform.Translation(new Vector3d(body.Position.X, body.Position.Y, 0)), true)
it just move my object for example if i run this code at loop my object move , move and move to inifinity

i want to change just postion of my object

That is expected. Rhino does not handle transform like other 3D softwares (i.e. blender, 3DS max or maya) where an object has a local transform and all its data is defined wrt that transform. The way it works in rhino is that the data is transformed after your method call.

Therefore in the example you are proposing you are not moving the object to a specific position but rather translating it of a vector so for each iteration of your loop the object will be translated out to infinty and beyond.

Hope it helps
Alberto

1 Like

thank you Alberto i make a class and get true result
ezgif-1-671851422b00
so in Rhino i should made an Class for converting bullshit logic of Rhino :rage:

You are welcome, if you want to keep a transform separated from the data you can use blocks and instances that have a specific transform applied to the single object. Depends on your needs.

Cheers