Override IGH_Goo.CastTo using python

Hello,

I have created some custom types in Grasshopper using Python by trying to override IGH_Goo (as I read here).To make theses “complete” I’m trying to override IGH_Goo.CastTo.

For example, I have a custom object Cable which contain characteristics of a cable (Line, young modulus and area). I would like to be able to use Line component or Curve component to get the line representing the cable.

I’ve been trying to do this for the past two days using python but I couldn’t make it works. :sweat_smile:

Does anyone have an idea of how to do this ?

Thank you :slight_smile: !

PS: I joined a concrete implementation of the cable component to illustrate :grin:
Cable example.gh (7.9 KB)