Hello!
I want to create a cage and a cage editor to transform the selected nurbs surface via c# , but I couldn’t find any usage of cage and cage editor in sdk library. I also got another ideal of that. Making cage editor’s control points move, and then gets transformation.
is it possible? because I don’t know how to move the objects if you don’t assign the object type(like point,curve,surface …)
I also read this sample before. http://wiki.mcneel.com/developer/sdksamples/cageedit
it was successful in c++ , so I think it must can be done by c# , but there were some error in transferring to c#
i.e : RhinoCaptureObject( control_object, const_cast<CRhinoObject*>(captive) ); This doesn’t appear to be exposed in Rhino 4.0’s .NET toolkit, so I can’t assign captive object.
Unfortunately, there is not a way to setup and perform cage editing in RhinoCommon yet. It’s on the to-do list, but you probably won’t see this feature added until Rhino 6.
I think I need to explain what I am doing now:
I tried to change the surface geometry(ship) automatically by using algorithm (written by c# ).
I tried to move the surface control point to lead transformation, but this method can not change the shape, only let surface be longer or bigger . if I move the control points separately, the shape would change too much and become unsmoothly.
This way I need cage editor to change the surface.If it not work , do you have any suggestion to lead transformation?
Gonna bump this thread: I wanted to modify a cage in Python but that doesn’t seem to be working.
The docs are kind of ambiguous. There are some Rhinocommon methods concerning cages, but only as referenced by their grips, however calling rs.EnableObjectGrips or ObjectGripCount on a cage doesn’t work.
If I call rs.GetObject with rs.filter.cage (134217728) nothing can be selected. If I use filter 0 and select a cage, ObjectType on the cage returns 131072 which is MorphControl.
If I use rs.GetObject with rs.filter.grip, I can select a cage grip and it has ObjectType 1 (point), but calling MoveObject on the grip/point has no effect.
Any hope here? Or are cage points not really grips and I’m just coming at this wrong?
Bumping this again, are there ways to create and reference cages and their grips directly in Rhinocommon for Rhino 7? I can’t find them under Geometry.