Heyhello. I’m new to rhino and these forums so please do correct any mistakes.
I’ve been trying my hand at scripting to lighten a part of my workload and found an odd mismatch between the output of RhinoScript and Python.
When I try to copy objects inside a group using CopyObjects, Python adds all the copies into the existing group while RhinoScript creates new groups for the copies.
I would prefer it if Python followed the output of RhinoScript since grouping groups seems easier to do than splitting them as well as it just working better in my usecase.
My question is whether the mismatch is unintentional and/or whether it would be worth bringing them in line.
Here, a snippet of Python code to illustrate:
def CopyGroup():
objects=rs.GetObjects("Select objects",preselect=True)
group = rs.AddGroup()
rs. AddObjectsToGroup(objects,group)
rs.CopyObjects(objects,[-10,0,0])
CopyGroup()
thanks in advance.
6 posts - 3 participants