Explode block instances while keeping their original layers

It works on a simple model, I made a few layers with solids in each. Then update o the second component and then bake.

But it doesn’t work with a sublayer. Then it just don’t work.

The component that was red isn’t red anymore.

groet,

Albert

[cid:image001.jpg@01D28785.22BEB790]
T. +31(0)6 20 505 290
F. +31(0)8 77 846 652
www.compromiss.nlhttp://www.compromiss.nl/

You can try to turn “read full layer path” option on in the RHatt component - this will read the full nested layers path. This way your blocks will be named something like this “parentLayer::nestedLayer”

pascal, dragging the file into rhino does nothing. I first got a message saying it was blocked, so i unblocked it but now it does nothing.

Hi Evan - if you un-block and then drag onto the same Rhino as before, it does not work - you need a new session of Rhino. Here’s the latest that I have -

ExplodeBlocksToLayersV6.rhp (14 KB)

(Updated with default to NewLayerPerBlock)

Any luck?

-Pascal

6 Likes

yes i got it in but it doesnt seem to do what i needed, i PM’d you.

Hi Evan - start the command with no selection - you should see

image

Change the command line option to

image

then select the object. Does that do anything you like?

-Pascal

1 Like

Pascal your ExplodeBlocksToLayers command just saved me! thank you!

Dude,

This is so genius, just wanted to let you know!

Regards,
Luuk

I’m glad it helps!

-Pascal

Can it become native on Rhino7?

I had some trouble finding the right version to reinstall it at work :smile:.

Or maybe a script area on Food4Rhino?

Hello - the plug-in (rhp file) linked a few posts above should work - does it not?

-Pascal

Yes it does. The thing is I didn’t had it saved from when I installed at home, and when I tried researching it at work I got an older version by accident that was running out of index or something. It took me a while to realize I had a wrong version.

Having an area for scripts on food 4 rhino would had avoided that.

Great plugin Pascal, thank you.

Hi Pascal,
This ExplodeBlocksToLayers plugin is very useful. We recommend it to our customers often, but we have to provide instructions on how to install it. I am trying to make this easier for our customers, but you haven’t provided any attached licensing for the plugin.
If you could provide the source code, we could just include the command in our plugin, which would be ideal. Or if that isn’t an option, can we send it to our customers in an RHI file? We can certainly provide any attribution required and would not charge money. It’s just useful for our customers and we are looking for an easier way to get it into their hands.

Thanks!

Hi @pascal
Would it be possible to make a version of this most useful plugin where the sublayer organization (and distribution of the objects) of the block is maintained? What I mean is this: Let’s say I have a block called “Chair”, and inside are 3 objects on 3 separate layers. Organized like this
Chair (top layer)
-Back
-Seat
-Frame

I have eg. 10 of these blocks and would love to explode them and have them distributed like this:
Chair 01 (insertion layer of block)
-Back
-Seat
-Frame

and then
Chair 02 (insertion layer of block)
-Back
-Seat
-Frame
etc. for all 10 chairs.

I’m exporting massive amounts of furniture to Keyshot (hotel restaurant) and it would make life much easier to have the exploded blocks a little more organized when exploded. In the plugins current version, all objects in the block go on the same layer - it makes assigning materials in Keyshot a bit of a hazzle.
TIA, Jakob

Hi Jakob - let me check - I have not looked at what this thing does in quite a while…
@Normand - this is what I get here-
image

Isn’t that what you are asking? Note there is a command line option to make new layers or keep insertion layers - this result is from the former, I think it’s the default in the latest. Shout if I am missing the point…

Ah - maybe the numbering on the sub layers is what is not right - is that it? It would make sense not to do that I think.

I am not sure I understand this:

What if there is more than one instance on a layer?

-Pascal

Hi @pascal
I must admit I test the “make new layers” option :grimacing: Will test on Monday and report back :+1:
Have a great weekend :grinning:
-Jakob

Hi @pascal
Either I’m doing something wrong or I’m really bad at explaining myself (or both :joy:). I’m attaching a simple test file for reference.
I have an embedded block (buffet counters 3D). The original objects in the block are on the (sub-)layers in “Furniture blocks>buffet counters 3D”.
The instances of of the block are on the (sub-)layers “buffet counters>buffet counters 01, …02, …03 etc”. As shown on this screen grab:

What I would like, was for the block - upon explotion - to distribute the objects of the now exploded block to corresponding (and automatically created) sub-layers on the “block-insertion” layer, so that it looks like what is on this screen grab:

What I get get currently is this (with Layers=NewLayerPerBlock):

So I guess what i’m looking for is to use the insertion layer, but inherit the layer structure from the block. I have NO idea if it’s even possible to do that? :grimacing:
And the file:
https://www.dropbox.com/scl/fi/a9bmd0a3kvr57pk5z8rlw/block-test.3dm?rlkey=cznfccl3i93c1ro9ufamx23c5&dl=0

TIA, Jakob

PS This is just a simple example - imagine it with 150 chairs instead :slight_smile:

Ah, @pascal - I get it now! Sorry for being thick! I need to have the elements I want distributed on layers as nested blocks inside the main block, not just as layers and geometry. If I want the layers tabletop, cabinet etc., I need them to be sub-blocks inside the main block :+1:
Thanks for the help! :slight_smile:
-Jakob

Hi Jakob - yeah - that is what the thing does now - un-nests the blocks - can you work with that?. I see that what you describe might also be useful though. I’ll cogitate…

-Pascal

1 Like