Any ideas on how to simulate Cage Edit in Rhino Script?
I would also need to have access to curve points (not Control Points) when coding in Rhino.
Thanks In advance
Cage editing is really just grip editing of a Cage object. RhinoScript supports this:
You can certainly get a curve’s “edit” points:
For polylines, you can obtain their vertices (too):
Not sure what else you are looking for…
Thanks for providing the links
However as I went through:
I could not find anything similar to CageEdit that takes captive object(s) with control objects like:
Bounding box, Line, Rectangle, Box
and the deformation option (Fast/Accurate)
Could you please make an example accordingly?
Not every Rhino command is implemented as a RhinoScript method. And that is OK because RhinoScript is designed to augment Rhino’s command line scripting. Thus, it is very common, and often necessary, to script Rhino commands within your RhinoScript subroutines.
In this case, you will want to script the
CageEdit command using RhinoScript’s
Does this help?
Thanks for the note,
I can certainly do
What I do not know is whether or not I can append the options to the command; like this:
Rhino.Command("CageEdit" & controlobject = BoundingBox & CordinateSytem = World & Cagepoints = XPointCouint :4, YPointCouint :4 ...)
Call Rhino.UnselectAllObjects() Call Rhino.SelectObject(strYourId) Call Rhino.Command("!-_CageEdit BoundingBox World _XPointCount=2 _YPointCount=2 _ZPointCount=2 _Enter Global _Enter") Dim newObjs newObjs = Rhino.LastCreatedObjects()
and then check and do something with newObjs. … did not test the code, but it should give a startpoint. the underscore is for the script to run on another language…
do a command first by typing everything in the commandline remember every space " " and every Return “_enter” then step by step bring it to a string that works.
by the way - is cage-edit accessible via rhinocommon ?
Yeah the code is working,
No, but you could access cage grips and setup the relationship using command scripting.