Move a list of points in a direction with Rhino.Geometry

Hello everyone,

There’s a problem I have in moving a list of points to a specific axis with or without pattern like sin or cos with Rhino.Geometry. I know that when we want to move other types of geometries, we go like:

g = G.Duplicate() # where G is an input geometry from outside.
d = rg.Transform.Translation(dir) # where dir gets input from outside.

g.Transform(d)

But there is a problem with list of points. There is no ‘Duplicate’ or ‘Translation’ in the suggestions.

Can anyone help me to find the proper function?

Thank you,
Mehrzad

The simplest solution is to add the point with a translation vector. While there is a function for that, again the simple implementation is to use the +operator. Or to move the point in place, the += operator:


MovePoint.gh (3.6 KB)

@AndersDeleuran Thank you for your reply. Didn’t know about the ‘Add’ function. Now it is working perfectly.

1 Like