What is the proper way then? I do not want to derive objects from Rhino.Geometry.SomeObject because it creates objects that are affected by drag/move/explode etc.
I can only think of creating conduits but then I cannot select these objects.
Also there is no event for hovering over objects.
Third option could be using workspaces but I do not want to use multiple files. Also, there are no methods currently to automate that with scripts.
Made me think of another probable solution, which seem a bit more complex and but anyways I’ll ask.
Is it possible to create an extension of Rhino3dmIO (Rhino3dm) so that I can create custom objects there using not RhinoCommon but a custom API that derives from RhinoCommon?
Custom behavior in general is pretty limited in RhinoCommon. Please help me understand what you are trying to achieve and I can then figure out a solution or at least tell you in is not currently possible.
For starters I want a point that ignores translations. Like a permanent origin point. That I can copy and select as reference to some other object but not move it.
Subsequently I want the same behavior with lines, curves, polysurfaces that will not allow to be exploded.
Implementing it with conduits, but I need to understand how can I implement selection of the objects.
Of course perhaps the best current option is just to use GH to create immutable objects. Here the selection in 3D is still an issue. I know @DanielPiker has a grab tool but I don’t know what/how he did it. Also, I don’t use kangaroo but, I think it only selects vertices, and only if the solver is running.
It definitely seems quite a lot of work if there is a need of hovering (enter/leave) and selecting events implementation on conduits (by a beginner coder like me).
I need some guidance on where to start.
I wanted to start with a point but apparently even that is not working as I thought it would.
In my opinion you can implement your desired behaviour by deriving from CustomPoint. It’s going to be a lot of effort and quite a hack so maybe rethinking what you are trying to achieve would be wise.
Overriding the OnTransform method of your custom point you can revert any and all translations and Explode should not work on points anyways.
That doesn’t work. At least when I tried to override the method didn’t work because the point created on the canvas is normal RhinoCommon point and it is affected by translations.
Perhaps I must not derive my custom point from Rhino.Geometry but Rhino.DocObjects.
What I was trying to do is create a new type deriving from Rhino.Geometry.* I was trying to override the Rhino.Geometry.Point.Transform Which is a method of GeometryBase.
Problem was I didn’t want to store and check for GUIDs every time I try to move something.
I will try now to create a custom class derived from one of the Rhino.DocObjects.* classes and see if I can “negate” the effect of transformations and “explosions”.