I made a custom mesh grips with custom user data, similar to your rectangle one.
Though, something doesn’t work: when dragging grips, OnDraw() properly draws a dynamically modified mesh, but at the end of a grip drag the original mesh is not replaced. A line in the command prompt appears: Unable to transform 1 object.
It seems as if NewGeometry() is not giving a proper mesh, but I really think it does. I’m struggling with this, as the code is very similar to a plugin with polylineCurves and custom user data that works.
Is there something when going from polylineCurves to meshes that I’m missing?
I checked to see if the mesh is valid, and it really is valid! I also checked that is has user data, with mesh.HasUserData.
I’m quite surprised, I didn’t expect it. I don’t understand why it’s unable to transform the mesh, if NewGeometry() is providing a valid mesh for any drag.
I made it from the rectangle grips sample to work with meshes. It just freely modifies the vertices of a given mesh.
First, create a sample mesh with the command “SampleMeshGripsCreator”, then edit it with “SampleMeshGripsModifier”. In wireframe mode, the original mesh is in black and the dynamically drawn mesh is in red. Drag a grip and check if at the end the black mesh is replaced by the red mesh or not.
In my case it’s not replaced, and the message “Unable to transform 1 object” appears. I have Rhino 5.13 for Windows.
Please take a look and tell me what happens. I would highly appreciate if anyone else tried too.