Could anyone guide me how to use ‘Cage Edit’ using c# API?
Hi @sonamkumar.eng,
What does this mean? You want to write your own CageEdit
command? Can you clarify what you want to do and why?
Thanks,
– Dale
Hi Dale,
I can deform a mesh using CageEdit command in Rhino GUI. Want to automate same using c# API.
Thanks
-Sonam
Hi @sonamkumar.eng,
CageEdit
just creates a morph control object and then turn on it’s grips you can manipulate it’s captive. Which part of this process are you looking to do?
– Dale
Hello Dale,
We would like to morph triangular mesh or subD model using CageEdit. Our goal is to deform the surface model using the control points of CageEdit. We’re doing this using GUI, but would like to automate the process using C# API. Here are the steps:
- Create a CageEdit covering the mesh using bounding box control.
- User control points of the CageEdit to morph the shape.
Which API should we use to create a CageEdit using bounding box?
How can we move the control points of CageEdit through API?
Thanks
-Sonam
Hi @sonamkumar.eng,
Thanks for the clarification.
RhinoCommon does not have method(s) that allow you to create a morph control object and to capture another Rhino object. This is on the wish list. Your best option here is to just script the CageEdit
command.
Here is a simple example:
Let me know if you have further questions.
Thanks,
– Dale
Hi @dale, any estimate on when this will be available in Rhinocommon?
I see there is a sub MorphControl to morph an object from one curve to another (freezes for me). Perhaps something like this is coming for morphing from one array of points to another?
Sam
Perhaps you can explain further, hopfully in detail, what you are trying to do?
Thanks,
– Dale
Hi Dale,
Shoe upper patterns consisting of curves need to be mapped from one shoe last to another to shorten the design process and as an alternative to grading flattened patterns in 2D. The shoe lasts consist of multiple surfaces, so FlowAlongSrf wont do it (and converting to a single surface hasn’t gone so well either). Instead, I want to morph the curves from a set of key points on the original last to the corresponding key points on the target last. And following that, convert the lasts to meshes and do some mesh to mesh morphing.
I’m starting to do this just by scripting the cageedit command and then moving it’s grips with Rhinocommon. But if you know of a better way, please do let me know.
Thank you,
Sam
Hi @samlochner,
What your doing sounds plausible - I don’t have any other suggestions.
As for additional cage support in RhinoCommon, it’s on the list.
https://mcneel.myjetbrains.com/youtrack/issue/RH-21498
– Dale
Okay, thanks for giving it some thought.
Cheers,
Sam