[Plugin] #SelectionHideShow.rb v1.1
22 posts
• Page 1 of 1
[Plugin] #SelectionHideShow.rb v1.1#SelectionHideShow.rb adds a context-menu sub-menu with various Selection, Hide and UnHide tools, such as 'Invert Selection', 'Hide/UnHide Selection', 'UnHide All Active' etc...
Edit: v1.1 Now tests with ".is_a?" to speed-up and avoids testing already unique groups[after AlexM's advice]. Last edited by TIG on Thu Jun 04, 2009 11:10 am, edited 2 times in total.
TIG
Re: [Plugin] #SelectionHideShow.rbVery practical!
![]()
Re: [Plugin] #SelectionHideShow.rbGreat!
I asked for this a while ago. I suggested it was something that should be a standard feature in SketchUp Now it is. Thanks for another great contribution. Regards Mr S ======= Re: [Plugin] #SelectionHideShow.rbThanks TIG. However I expected to see Reverse Faces in there too.
Re: [Plugin] #SelectionHideShow.rbReverse and Orient faces is already built-in on the context-menu - near the top [as are some other 'select tools']... adding them would only duplicate stuff...
TIG
Re: [Plugin] #SelectionHideShow.rbTIG
![]() ![]() These questions are linked at a speed of implementation of script on the large scenes. ![]()
![]() It would be desirable to correct these shortages...
Re: [Plugin] #SelectionHideShow.rbAlex, I have not run any tests on typename, but I use it regularly. Are you saying that it is much slower than .is_a?
I'd rather use the faster method too, I just never knew there was a faster one. I'm sure TIG isn't using a slow method on purpose either... Chris
Re: [Plugin] #SelectionHideShow.rb
Easily to check... The more elements in the model - the better results script.
Re: [Plugin] #SelectionHideShow.rbThat's some interesting numbers. I've always used kind_of? - wasn't aware of the is_a?. then again, I've never tested the speed of methods either.
Thanks for posting this test. Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
Re: [Plugin] #SelectionHideShow.rb v1.1Thanks Alex - you've probably noticed I used the .is_a? test everywhere else in the script - however, I didn't realise it was so much slower to use typename=="".
![]() I've also incorporated my own version of your group_miner speed-up suggestion that now avoids testing groups that area already unique... ![]() I just need to edit ALL of my other scripts to change e.typename=="" to e.is_a?() !!! ![]() Here's v1.1 viewtopic.php?p=161963#p161963 Last edited by TIG on Thu Jun 04, 2009 11:58 am, edited 1 time in total.
TIG
Re: [Plugin] #SelectionHideShow.rb v1.1Maybe we could add this info to a new stickcy where we collect such useful tips and info?
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
Re: [Plugin] #SelectionHideShow.rb v1.1
For a model ot a few kilobytes to 10 megabyte of substantial difference it is not, but my models ot 40 to 75 megabyte! _________________________ My model statistics:
P.S. It was even necessary to write the analogue of SketchUp Text tool, because a standard tool begins to work very long. ![]()
Re: [Plugin] #SelectionHideShow.rb
Hmm... .kind_of? is an alias for .is_a? - Is that fraction of a differences just some other random outside co-incidence? http://www.ruby-doc.org/core/classes/Ob ... ml#M000370 Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
Re: [Plugin] #SelectionHideShow.rb v1.1I did a somewhat larger test. By the looks of it .is_a?, .kind_of? and .class are pretty much the same. I take the differences due to other system factors at the time of execution.
AT - SpeedTest: is_a? - 0.89c kind_of? - 0.782c class - 0.875c typename - 2.297c Model Statistics: edges = 159630 faces = 61300 groups = 0 components = 1000 construction_lines = 0 construction_points = 0 images = 0 section_planes = 0 texts = 0 others = 0 Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
Re: [Plugin] #SelectionHideShow.rb v1.1Much larger test. (did have a few programs open while I did the tests.)
AT - SpeedTest: is_a? - 16.297c kind_of? - 16.141c class - 18.703c typename - 88.703c Model Statistics: edges = 8396595 faces = 1026520 groups = 52643 components = 526428 construction_lines = 2 construction_points = 4 images = 0 section_planes = 0 texts = 0 others = 0 Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
Re: [Plugin] #SelectionHideShow.rb v1.1I have lost a component somewhere in my drawing
to find it, I pasted a second one in a visible place when I select this, the entity info clearly says Component (2 in model) with the components window context menu, I selected all components I thought then, if I could hide the rest of the model, I would easily spot where the original one is but view/hide rest of model doesn't work unless you are inside the component, which means you can select only one of both, and the other one is deselected please help Frank
Re: [Plugin] #SelectionHideShow.rb v1.1View > Hidden Geometry ON will show all hidden objects.
If it's on a Layer that is OFF you won't see it though... The Outliner will also show all instances that are on ON Layers... You can select them in the Outliner and they select in the model. TIG
22 posts
• Page 1 of 1
|
Who is online
Users browsing this forum: Chaz12345 and 8 guests