Searching a plugin to deeply explode nesting groups
-
I often need to deeply explode a group that consists of other groups (and so on). For example to use the solid tools you need to bring all solids to the same level (by ungrouping/exploding all parent groups).
Does anybody know an extension that can deeply explode a selected group by bringing the deepest children (groups) to the top? In other words I want to bring all deeply nested solids on one level by a one-click operation.
Background:
Most times I create a lot of groups of nested solid objects to ease the organization when creating complex models for 3D printing. Obviously his manually exploding operation of many nested groups took a lot of time.
Expressed more formally:
The "deep explode" operation should automatically explode all groups and subgroups (of the currently selected element) that only consist of other groups but does not contain actual (ungrouped) faces/edges.
PS: Any help is highy appreciated because this has been really time consuming for me!
-
Not sure if Bomb.rb is up to date with current sketchup versions.
http://www.smustard.com/script/Bomb
Here's on old thread about exploding...
http://sketchucation.com/forums/viewtopic.php?f=79%26amp;t=41718Great. Now I said bomb and exploding on the internet.
Dear FBI, CIA, NSA et cetera...
I am not a terrorist. mkay? thanks and bye.
-
@krisidious said:
Not sure if Bomb.rb is up to date with current sketchup versions.
Thanks for the link, I have a look to the code and this script explodes all groups. What I need is to recursively explode all subgroups of the selected element without exploding the deep-most groups. Only "artificial" groups (not having actual shaped/edges) should be exploded to bring all deeply nested solids down to the same level.
Unfortunately Bomb.rb does not help here...
-
@mythos said:
I often need to deeply explode a group that consists of other groups (and so on). For example to use the solid tools you need to bring all solids to the same level (by ungrouping/exploding all parent groups).
Does anybody know an extension that can deeply explode a selected group by bringing the deepest children (groups) to the top? In other words I want to bring all deeply nested solids on one level by a one-click operation.
Background:
Most times I create a lot of groups of nested solid objects to ease the organization when creating complex models for 3D printing. Obviously his manually exploding operation of many nested groups took a lot of time.
Expressed more formally:
The "deep explode" operation should automatically explode all groups and subgroups (of the currently selected element) that only consist of other groups but does not contain actual (ungrouped) faces/edges.
PS: Any help is highy appreciated because this has been really time consuming for me!
i asked a similar question in this forum a while ago
i wanted to explode down to the eepest level of embedded component, and stophttp://sketchucation.com/forums/viewtopic.php?f=180%26amp;t=51438
it works well with component
maybe you could adapt TIG's code to do the same with groups instead of components -
@krisidious said:
Great. Now I said bomb and exploding on the internet.
Dear FBI, CIA, NSA et cetera...
I am not a terrorist. mkay? thanks and bye.
You are on the black list now, lol
-
Thank you very much for all your answers. It seems that there is no existing script that does exactly what I need. Thus I started to have a deeper look into the Ruby documentation of SketchUp. Actually it was pretty easy to implement the needed behaviour for my own.
You can find a first version of my "Flatten Hierarchy" script as attachment to this posting (just copying it to your plugins folder). Any comments or improvements are highly appreciated since even if I am a software developer I have never been working with Ruby before.
Here is a short description explaining what the script does:
Traverses through the selected entities and deeply explodes all nested groups and components that only have groups and components (but no actual geometry like edges or faces) as direct children. In other words this script flattens the hierarchy of the selected entities by bringing all nested groups and components up to the current level of selection without interfering any geometry.
-
That's great Mythos... It will come in handy I'm sure. Can't wait to see what you come up with next.
-
wow that's was fast! great plug-in very simple and efficient
it's is even useful to know if the group/component have any loose geometry inside by looking the disabled button on the context menu.
-
Thanks for the kind words. Actually I have had a lot of fun learning the SketchUp API.
Do you think it's worth to submit the script to the SketchUp extension library?
-
Absolutley... But, I would submit to the Plugin Store instead.
-
@mythos said:
Thank you very much for all your answers. It seems that there is no existing script that does exactly what I need. Thus I started to have a deeper look into the Ruby documentation of SketchUp. Actually it was pretty easy to implement the needed behaviour for my own.
You can find a first version of my "Flatten Hierarchy" script as attachment to this posting (just copying it to your plugins folder). Any comments or improvements are highly appreciated since even if I am a software developer I have never been working with Ruby before.
Here is a short description explaining what the script does:
Traverses through the selected entities and deeply explodes all nested groups and components that only have groups and components (but no actual geometry like edges or faces) as direct children. In other words this script flattens the hierarchy of the selected entities by bringing all nested groups and components up to the current level of selection without interfering any geometry.
does exactly what is written; so:
if a component contains groups
it is exploded and disappears as a component in the component listthis might be a problem
it is not a default, but one should be aware of that
possible to choose? explode ONLY groups or ONLY components?
-
@mythos said:
Thank you very much for all your answers. It seems that there is no existing script that does exactly what I need. Thus I started to have a deeper look into the Ruby documentation of SketchUp. Actually it was pretty easy to implement the needed behaviour for my own.
You can find a first version of my "Flatten Hierarchy" script as attachment to this posting (just copying it to your plugins folder). Any comments or improvements are highly appreciated since even if I am a software developer I have never been working with Ruby before.
Here is a short description explaining what the script does:
Traverses through the selected entities and deeply explodes all nested groups and components that only have groups and components (but no actual geometry like edges or faces) as direct children. In other words this script flattens the hierarchy of the selected entities by bringing all nested groups and components up to the current level of selection without interfering any geometry.
does exactly what is written; so:
if a component contains groups
it is exploded and disappears as a component in the component listthis might be a problem
it is not a default, but one should be aware of that
possible to choose? explode ONLY groups or ONLY components?
-
Hello, sorry for digging up years old thread. I wonder if anyone can help this work with the newest version of sketchup.
-
@tammaotrinhtham said:
Hello, sorry for digging up years old thread. I wonder if anyone can help this work with the newest version of sketchup.
I just installed it in SketchUp 2017 and it works as described. What makes you think it doesn't work?
Advertisement