{Req] Hide Solids
-
I have many components/files that were created before the solid tools in the new versions of Sketchup. I am going back to each file, with the intent of making all the parts solid. Which has turned out to be harder than I though it should be.
So my request, is there a one line code that I can use, that if I select a group/component and if the selected group/component is a solid, it is hidden. Such that I can by using this one line, make selections, and after multiple selection, have only non solids left. And I can go to each remaining non-solid part and either try the repair solids plugins or remodel the part.
I need all solids because I am going back to figure out the weight of each model.
Thank you in advance for your help.
Ken
-
Hello Ken,
do you have any difficulties to do this job with the SuSolid plugin?
The only difference is that the solid is pink and not hidden. -
Your plugin indicates there is a problem. However, with many parts nested, it is hard to tell just which part is not solid. I just wanted to drill down by selection and every time I hit a solid it disappears leaving me with just non solids. Now that I have a less complicated model, I can use the plugins designed to handle non-solids to make the required corrections.
Thank you for your reply.
Ken
-
Hmm,not a bad idea.
-
I have made it and tested it a little and is a very useful feature.The only thing that I miss is a good "UNHIDE ALL" button.
Tomorrow I will send you the version of SuSolid plugin with the "Hide Solids" option in Settings menu. -
Two one-liners to copy/paste into the Ruby Console +<enter> to run them...
To hide all active solidsSketchup.active_model.active_entities.each{|e|e.hidden=true if e.respond_to?(;manifold?) and e.manifold?}
To show all active solids
Sketchup.active_model.active_entities.each{|e|e.hidden=false if e.respond_to?(;manifold?) and e.manifold?}
-
Hello Tig.
What about nested solids? -
The last code only works on 'active_entities', as you can already hide everything outside of the current edit context using view settings...
BUT to hide/show absolutely everything 'solid' both in the model and nested inside groups and definitions use these two one-liners...m=Sketchup.active_model;m.entities.each{|e|e.hidden=true if e.respond_to?(;manifold?) and e.manifold?};m.definitions.each{|d|next if d.image?;d.entities.each{|e|e.hidden=true if e.respond_to?(;manifold?) and e.manifold?}}
and
m=Sketchup.active_model;m.entities.each{|e|e.hidden=false if e.respond_to?(;manifold?) and e.manifold?};m.definitions.each{|d|next if d.image?;d.entities.each{|e|e.hidden=false if e.respond_to?(;manifold?) and e.manifold?}}
-
Darn, I am overwhelmed.
Seems the solution is at hand.
voljanko, thank you for your reply and plugins.
TIG, thank you for your code. Every day a little bit more on the Sketchup ruby learning curve.
Ken
-
Hello Ken,
I have sent to your email the version with your "Hide Solids" feature.
Please test it and if you confirm it, I will include it also in free version of SuSolid plugin, so everybody can benefit from your ideap.s.it would be better if you rename this thread to something more specific.Suggestion:"Hide Solids"
Edit: done TIG -
David
Thank for updating your plugin. The new "hide solid" is great for taking apart old models component/group by component/group that were not made correctly (solid) when first modeled.
Now I can cycle thought a project and make sure each and every part/component/group that should be a solid is solid. Not only does the plugin now hide parts that are solid, it give you and opportunity to correct each non solid.
Again thank you for the fast reply.
Hope everyone enjoys the new feature.
Ken
-
Hello Ken,
thank you for the review and "approval" of the new feature of the SuSolid plugin.
And most of all, thanks for the great idea.
Now I have updated the free version of the plugin on my site http://www.SuSolid.comHow to use the new "Hide Solids" feature:
1.In "Settings" menu set the "Hide Solids" to "Yes".
2.Now when you click the "Analise" tool (or any solid repair tool) you will still see the magenta colored solids,but when exit the tool or re-click it,the solids will hide.
3.To unhide solids,just set the "Hide Solids" to "No" and the solids will unhide.
Advertisement