What's new ? with C#... Blocks of course

Here is the blatant example of how blocks are despised and neglected by McNeel :

Here’s the V6 page of the Rhino developer docs regarding changes in the Rhinocommon SDK .
EXCITING STUFF ! Changes made to the classes that define what block definitions and block instances are made of !!!


This leads to a Youtrack page where, essentially, @stevebaer and @piac play “don’t get stuck with the hot potato”, which also leads to a basicly pointless Github page.
Then, there’s this amusing “TODO; describe what this means”.

But then, you realize this is not the V7 version of the page, as mentionned in a sleek banner :

But, as you follow the link to the “Updated” page, you soon realize that it’s the exact same page.

And by the time you see the new banner pointing to the V8 WIP version of the page, you have already lost hope, and for once, you’re not disappointed : you know already that it’s the same old page.

This time, the banner tells you that you might have thrusted too far into the future and advises you to go back a step.

Not being even able to put in words what the changes made to blocks actually mean is quite telling.

In case you want to see how InstanceDefinition can be used in Python:

Hi Nathan,

as I told you, since I have to swallow the red pill and learn object oriented programming, I’d rather go down the rabit hole with a map.
From what I’ve seen, the use of Rhinocommon with Python is not documented.


This is probably why David avised me to go the C# trail last time I met him in Barcelona.

The same example in C# then

You know Kung-Fu, man !

Thanks

Kung-fu is a big word. I just know how to type InstanceDefinition in the search box at GitHub - mcneel/rhino-developer-samples: Rhino and Grasshopper developer sample code

OK, so I see there is some sample code in the Rhinocommon… well… err… not so much.
Here’s the Rhinocommon page for the all important InstanceDefinitionGeometry Class :

So there’s also sample code on GitHub. OK
But why are there no links from the essentially “sample-code-less” Rhinocommon docs to the Github repository ?

Well, I checked the Github page for Rhinocommon /C# , and found out that less than 30 methods are documented !

So now I understand why they didn’t bother to put the links.

If I remember well from the olden days when I used Rhinoscript, almost every method had a nice little sample code that was actually the most useful part of the documentation…

Hi Oliver, @osuire

please allow me to explain a little. I agree that the page you mention might need to be tuned up or just get removed, but there’s not much here to get all so excited about. I want to thank you for reminding us about that page.

It’s not quite like that, especially not the second part, “block instances are made of”. This page is a rather geeky list which was meant to track some possibly breaking changes to RhinoCommon. There were less than expected items in the end. We work very hard to keep that list to a minimum, across different C++ implementations. That page shows a single change in the RhinoCommon implementation of blocks, that are no longer derived from ON_Geometry in C++, so they should not be derived from GeometryBase in RhinoCommon. That’s it. It’s simply a “where they are placed” question that does not impact anything, and to my knowledge, hasn’t made any difference to any plug-in. We just wanted to let people know.

The InstanceDefinitionGeometry class is now derived from ModelComponent, which means it’s part of the same types of things that go into “Tables”. Such tables are e.g. the layer table, the linetype table, etc. The same is now true for InstanceDefinition, which now derives from InstanceDefinitionGeometry, and not ModelComponent alone (but still descends from it, given that InstanceDefinitionGeometry is also a ModelComponent). If you understand object orientation, there’s not much to be added. This will ensure that in the future, all these items can be searched with the same type of API.

Yes, those gems are written and maintained by @dale, and that’s the same guy who wrote the samples for RhinoCommon. However, the RhinoCommon samples venture much deeper under the surface, and are meant for way more advanced users. You can’t expect, and we will never, document every RhinoCommon method to such detail. Last time I checked, there were over 15’000 methods/classes/properties in RhinoCommon. We will only cover broad, more complicated topics, such as blocks/instance definitions, display pipelines, etc.

I hope this is helpful. In the next days, we will fix that page. If you feel that you are confused about some particular page, please do not hesitate to specify that again. However, I encourage you to please keep the tone of the conversation friendly and open to different outcomes than the ones you might immediately come to.

Thank you,

Giulio


Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com

Sorry, Giulio, I guess that anything that touches blocks in Rhino makes me really nervous.
Although there’s a heavy omerta at McNeel surrounding this subject, I’m sure you know exactly what I mean.

OK then. If I take Nathan’s link for instance, why is it in “rhino-developer-samples / Rhinocommon / snippets / from_rhinocommon / cs” and not simply in "“rhino-developer-samples / Rhinocommon / cs” ?

Moreover, this page is just code. Nowhere is there any explanation of what it is supposed to do and how it does it.
So I guess it takes to already know all that stuff, and then you can use the documentation.
Hmmm…

How is a beginner like me supposed to make his way through this jungle ?