algorithmic modeling for Rhino
The only thing that prevents a given class from being able to be inherited is if is declared as either sealed in C# or NotIheritable in VB.Net. Once the class is inherited, then you will be required to implement any methods that the base class has declared as abstract in C# or MustInherit in VB.Net. Any methods that the base class has declared as virtual in C# or Overridable in VB.Net can have their behavior overridden if you would prefer to provide your own implementation of that method (the ToString method is a great example of that). After that, you're free do whatever you'd like within your class.
The GeometryBase class was not designed to be directly inherited by classes outside of RhinoCommon. I thought I had this protected by hiding all of the constructors, but it looks like there is a protected GeometryBase class constructor which should have been made internal. This will be made internal in the future making it so you will not be able to subclass GeometryBase.
That being said, I do hope to provide for custom geometry/rhino objects in a different way in the future. If and when we support custom Geometry or RhinoObject classes in RhinoCommon, these will most likely show up in a Custom namespace.
In short, don't do this.
Thanks,
-Steve
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson.
Powered by