Modifying custom objects seems to change them to base type

Hi there.

I have a CustomCurve object that seems to ‘reset’ back to a normal curve when I modify its geometry interactively in Rhino (e.g. by pressing F10 and moving its points around).

Any ideas why this might be happening and how I might get around it?

It’s possible that you need to implement a constructor with the signature public MyCustomCurve(Curve crv)

If that is not it, can you post your code maybe?

I just checked and this happens with the custom line sample (SampleCsCustomLine.cs).

I modified the sample OnDraw to draw a red point at the midpoint of the line. If I modify the line geometry by dragging its points around, the red point disappears, suggesting it is no longer the custom curve.

Adding a Curve constructor doesn’t seem to help.