The dimension classes that Grasshopper uses (they are completely different from the native Rhino dimensions, although there is sufficient overlap to convert them into each other) are defined in one of the standard GHA assemblies, and thus not readily available from other plug-ins or scripts.
However it sounds like you want to implement your own dimension class, which both displays differently and potentially bakes to a standard Rhino dimension. This is possible, although it can be pretty gruelling to do this in a C# script component. You would typically need to create about four different classes before you can really work with your own data types:
The data type itself. In this case the dimension.
The goo which wraps around that data and makes it Grasshopper friendly.
A parameter type which can handle your goo.
One or more components which generate or consume your data.
Now you can reduce this list to just two, because the goo and the data could be the same class. Also you can use Generic parameters to hold your data.
Would it be much of a difference to do it in a custom plugin (.gha) rather than in a script component, or do I have to handle previewing and converting it into “standard Rhino objects” all the same.
Basically if feel quite safe using rhinocommon and other assemblies in a script component, but when it comes to Inheritance and wrapping and unwrapping (Interfaces) I am still lacking the big concept, which gets me stuck once in a while.
I can read your script fine an basically understand what it does, but I am far from “composing” this myself.
Also I am sometimes not clear what grasshopper actually does behind its curtains. For instance I had trimmed surfaces that I was just filtering with a C# ScriptComponent and it untrimmed all surfaces when feeding it as a surface. Feeding it as Brep worked fine, the trimming persisted.
Is there some document (schematic or layout) which shows what grasshopper does and its conversion / communication to standard Rhino, or do I just need to have the right skills to read the Grasshopper SDK properly?
Yes it’s easier to manage collections of types and functionality in VisualStudio. Also the autocompletion and code analysis is much better than in the script editor.