How to extend a Brep's with custom properties in grasshopper?

I was looking into this just now as well, as I remembered I did it like this as well, but it seems now the new “Create Speckle Object” component creates an object with the input as seperate properties. This means the extended object with the custom property still doesn’t show up in the viewer.

Creating a speckle object by key value like in the screenshot does work, but loses the base properties of the brep (in the viewer). Am I missing something?

1 Like

The difference in your example between the two paths and indeed in Dim’s initial example is the lower one converts the BREP to a Speckle Object and the “Does not work” route is you are adding your custom_prop to a new Speckle Object which also has a breap as its geometry prop.

There is nothing unexpected in behaviour here, except that a geometry prop has no special status in Speckleverse.

In Dim’s example using ToSpeckle and in your KCSOV example the object being extended is a Speckle Object representation of the Brep itself, not an object with Brep as a property value.

In the above screenshot, you can see that ToSpeckle is implicitly called when feeding the Brep into the ESO nodes


The only point to be aware of, there is no expectation on the part of the Speckle Viewer that a BREP will be the displayValue. It anticipates meshes and linework. Either explicitly or implicitly calling ToSpeckle when feeding into a displayValue will likely be preferred.

Ah, this is what I missed, thanks! I understood what was happening, but I missed the ToSpeckle conversion component in my toolbar so couldn’t really find how to properly extend the base object itself (without code). Thanks for the extensive response!

1 Like

That’s fair, and for future readers, if you are missing it, you can enable it from the menu thusly:

Luckily the conversion is implicit, so not 100% necessary except when following an example !!

1 Like