Geometry Pipeline: Filter by block definition name?

I like how you can filter in the Geometry Pipeline component. When referencing blocks though, the “name” of the block is actually part of the “type” in Rhino.

So is there a way to filter all block instances with the same block definition name?


In the image you can see that the actual name of the block “placement_box” is under type and not name.

So in the Geometry Pipeline component is there a way so I can get only those instances? There is a type input, but it only seems to accept the geometry type but not the block definition name.

ps: I am aware you can explode a block and get the block definition name, but it would be much better not having to do that and already filter it at the geometry pipeline stage.

This is what the Block Name Filter input on Explode Block is intended for — it will only explode blocks that match a certain name. I realize that leaves you with a bit of an ugly tree structure… you can also use the attached script to pre-filter a list of referenced blocks before exploding to avoid this. (8.0 KB)
Does that help? I’m a little reluctant to add any block-specific features to the dynamic pipeline.

Exactly. That part is fine. But its not trivial to filter the actual block by name, since the explode block doesn’t output the block again. That’s why in my opinion it would make sense to be able to filter by name already in the Geometry pipeline.

I think the confusion comes from the Geometry pipeline and Explode block both having a “name filter”, yet in one you filter by the name of the instance and one by the name of the block.

The script component you’ve sent over still has a bug somewhere.

ah, the one I uploaded works on Mac, which uses a more modern version of C#. This one works on windows. (9.7 KB)

1 Like