Preview in Grasshopper

Point3d is a struct mate, you cannot derive from structs at all.

Luckily it doesn’t matter, because Grasshopper only allows you to store types in parameters that implement the IGH_Goo interface.

If you haven’t downloaded the Grasshopper SDK documentation yet you should probably start there (it’s available via the GH help menu). It has an example of how to implement a new data type.

To do what you want to do is not perhaps entirely possible. The point type already exists in Grasshopper and you cannot override its ToString() method. So you’ll have to create a new type which can have a custom ToString() and also a custom preview display, and it can automatically convert itself to (or from) a GH_Point, but as soon as you feed that type into a standard Point parameter it will be converted and all that additional information will be lost.

1 Like