How to Create Cage Box(Rhino 7 API C++)?


I should create Cage Box for object.

so I used below code.

ON_MorphControl* control = new ON_MorphControl();
CRhinoMorphControl* control_object = new CRhinoMorphControl();

control->m_varient = 3;

degreelist[0], degreelist[1], degreelist[2],
cv_counlistt[0], cv_counlistt[1], cv_counlistt[2]);



RhinoCaptureObject(control_object, (CRhinoObject*)captive)

To create cagebox and to capture object was success.

But after moved control point of cagebox, the following problem occurs…

please help me.

image image

Moved to Developer category.

Hi @K113,

Have you seen this SDK sample?


Sorry, but you have not described your problem enough for us to help. What are you trying to do, exactly, and why?


– Dale

Hi @dale ,

Thank you for your reply.

I have seen this SDK sample.

This sample is to create control point on curve.

I found out know when create control point on curve, use m_nurbs_surface0, m_nurbs_surface, SetCV.

but I can’t understand property of m_nurbs_cage, m_nurbs_cage0.

I want to create control point on bounding box and move control point on bounding box for object.

so I used ON_MorphControl, m_varient = 3, RhinoCaptureObject.

To create Cage box and control point on bounding box and to capture object was OK.

But when move control point, object get out of bounding box and grow in size.

I want to know how to create to work normally cage box(bounding box).

if you know how to set normal cage box for c++, please let me know.

Thank you.