Cage edit equivalence command in python

Hi Elena​imani,

I have been trying to do something similar. It seems like there isn’t an “rs.CageEdit” command available however you can access it through the rs.Command function.

Here is a bit of code that I have used for this:

#load GUID of Mesh
Model=rs.GetObject('Select Mesh',32)

#cage edit
strModel=str(Model) + " "
rs.Command("_CageEdit " + "selid " + strModel + " _enter " + "BoundingBox " + ...
 ..."World " + "XPointCount " + "7 " + "YPointCount " + "ZPointCount " ...
 ...+"5 " + " _enter " + "Global ")

This duplicates the commands you would enter without python in the command line. You can then select points to move using GetGripObjects:

#prompt to select cage points to move
CagePoints=rs.GetObjectGrips("select cage points")

It would be nice if there was something a little more integrated to do this but for now this works.

Hope this helps!