Move grouped curves in Python Rhino

Hey guys, I’m trying to find a way to move and perhaps rotate a group of curves that was already imported into Rhino.
I wanted to complete this through python script editor but so far the rhinosyntax library i know that can achieve such thing is by getting individual object’s GUID and then move it.
I was wondering if it is possible to move a group at a time.
even if there’s anywhere I can start from that would be appreciated.
Thanks!

Hi @henrysayhitou, you might start with this:

import Rhino
import scriptcontext
import rhinoscriptsyntax as rs

def DoSomething():
    
    message = "Select group to rotate"
    obj_ids = rs.GetObjects(message, rs.filter.curve, True, False, False)
    if not obj_ids: return
    
    center_point = Rhino.Geometry.Point3d(0.0, 0.0, 0.0)
    rotation_angle = 180.0
    axis = Rhino.Geometry.Plane.WorldXY.ZAxis
    copy = False
    
    rs.RotateObjects(obj_ids, center_point, rotation_angle, axis, copy)
    
DoSomething()

_
c.

I see I see thanks! this is very helpful!
I’ll try it out and see if i have any questions

Moved to Scripting category.

1 Like