Hello,
I have a question regarding the CustomPointObject Class.
Until now of the Custom Object Classes i have used mostly CustomCurveObject and been adding them to the rhinodoc with the AddRhinoObject(curveObject, curve) overload which seams to internally convert my customCurveObject to a curveObject.
Right now i’m scripting up a 2d Graph System with Nodes and for the Nodes customPointObjects seem more fitting. Adding customPointObjects to the Rhinodoc doesn’t work with AddRhinoObject(PointObject, Point), and adding just with AddRhinoObject(CustomPointObject) places all added PointObjects at the world origin.
What would be the recommended way of adding a customPointObject considering i don’'t really need a HistoryRecord for my functionality?
What are you trying to achieve with your custom point object? And, can that not be achieved by attaching metadata to a normal point object, by using e.g. the UserStrings, UserDictionary, or UserData?
for visualization e.g. overriding onDraw to give visual feedback to users depending on states and relations between different objects. Maybe this is a wrong approach and I should use classes that derive from display conduits.
I store another object in the custom Objects which has all the logic and methods I use so maybe this could be done as a custom user data object. I only read into custom user data today but it looks promising. And since you are mentioning it here I will try that approach next.
Out of curiosity, is there a particular reason customPointObject can’t be added to the doc like CustomCurveObject?
Yes for additional visualisation your best bet is a custom object, although a conduit might also work. My feeling is that that would require more bookkeeping, compared to overriding the drawing routines.
I don’t know why a custom point object does not work.