Object begin edited via grip event

Hi Guys,
I am looking through the rhino common API for an event of an object being edited with control points but I cannot find anything. Is there something you can suggest? I looked for grip being moved or edited events but I cannot find the right one to connect to.

Anyone have an idea on how to achieve this?
Thanks
Alberto

Hi @Alberto,

There is no event that indicates an object is being grip edited. However, if you want to know that an object had been grip edited, then in a RhinoDoc.ReplaceRhinoObject event handler, check to see of RhinoReplaceObjectEventArgs.OldRhinoObject has it’s grips enabled using RhinoObject.GripsOn.

– Dale

Hi Dale,
thanks a lot. We already track that but our users would like to have a preview of the change so I would need to intercept the change before it happens. Is there any possibility of having this added sometime in future releases of Rhino?

Thanks a lot!
Alberto

Hi @Alberto,

I guess I need to understand better what problem you are trying to solve, and why? Perhaps you can provide more details why you want to intercept the change before it happens, as most all Rhino events let you know what happened after it happened. What would you change?

Thanks,

– Dale

Sure thing,

what we do in our plugin jevero is to track some lines and the users can build dependancies on top of the aforementioned lines. These depenancies will generate the footwear pattern that then will be used for building the shoe.

What happens at the moment is that once a line is changed all the objects dependant on that line are updated with the new curve geometry. Say that you have a number of stabs that follow a curve and you change the curve, the stab position will be adjusted so that they follow the new geometry.

What the users requested is that before the change happens, during the edit of the curve, we preview the new position of the stabs (or anything else). To achieve this we need to have access to the preview geometry.

I hope this explains what we want to achieve. If not please let me know and I will try to clarify further the issue.

Thanks again!
Alberto

Hi @Alberto,

Are these “lines” really just lines or are they other types of curves?

I’m wondering if a custom grip handler is what you need…

Thanks,

– Dale

Sorry my bad, they are CurveObjects :smiley:

OK, no problem ;-). I have an idea - give me a little time to (try to) type something up.

– Dale

Cool! Will wait for it :wink:

Just an idea of what I was thinking…

There is this sample - SampleCsRectangleGrips, which takes ‘rectangles’ and adds custom grips. Since this sample is doing all of the grip movement, there isn’t any reason a conduit couldn’t be tied to it and updated based on the new, dynamic location of the grips.

Make sense?

– Dale