SketchUcation Plugin Store

 

 

[Plugin] Unhide ALL (Edges) - Inside Groups / Components ???

[Plugin] Unhide ALL (Edges) - Inside Groups / Components ???

Postby Howard Leslie » Wed Nov 28, 2007 11:18 am

Does anybody know of a ruby that will mine down into all groups / components and then Unhide ALL - (especially edges) ???
...
See attached file - a VERY small sample from a huge file.
...
As you can see, all the edges are hidden.
...
All geometry is inside groups / components - some groups / components are nested.
(although not in this small sample).
...
What I would like to do is Unhide ALL edges - without having to edit each group / component manually one by one.
...
Any help much appreciated
Regards
Howard L'
Please, register (free) to access all the attachments on the forums.
Howard Leslie
 
Posts: 236
Joined: Mon Nov 12, 2007 2:41 pm
Location: Cumbria; UK
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: engineering and mechanical design
Level of SketchUp: Advanced

Re: Unhide ALL (Edges) - Inside Groups / Components ???

Postby tomasz » Wed Nov 28, 2007 6:53 pm

Hello Howard,
I am glad I am the first who has come with rescue (there are plenty of experienced Ruby masters over here :) ).
Here is my small script. I have tested it and it works fine. It un-hides all drawing elements (not only edges but also faces, groups and components).

Cheers
Tomasz
Please, register (free) to access all the attachments on the forums.
tomasz
SU2TH & SU2KT Developer
 
Posts: 768
Joined: Fri Nov 16, 2007 8:46 pm
Location: Poland
Name: Tomasz
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: Unhide ALL (Edges) - Inside Groups / Components ???

Postby Howard Leslie » Thu Nov 29, 2007 10:02 am

Tomasz,
Thank you so much for producing this script.
For the task I am currently working on, it works really well.
...
May I suggest a refinement to make this script much more useful (V 1.1) ?

If a user has some geometry selected eg just a few groups and components - then the script will only "unhide all" from the users selection. (ie "unhides all" from the groups / components selected).
Otherwise, if no selection is made (default mode) - then the script "unhides all" from the whole model (as now).
...
Thanks once again for producing this wonderful script
Regards
Howard Leslie
Howard Leslie
 
Posts: 236
Joined: Mon Nov 12, 2007 2:41 pm
Location: Cumbria; UK
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: engineering and mechanical design
Level of SketchUp: Advanced

Re: Unhide ALL (Edges) - Inside Groups / Components ???

Postby Gaieus » Thu Nov 29, 2007 11:19 am

I'm sure Tomasz could do that - the kerky exporter works the same way if geometry is selected... :roll:
Gai...
User avatar
Gaieus
Administrator
 
Posts: 27601
Joined: Sat Oct 20, 2007 8:24 am
Location: Pécs, Hungary
Name: Csaba Pozsárkó
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: historical reconstruction
Level of SketchUp: Advanced

Re: Unhide ALL (Edges) - Inside Groups / Components ???

Postby tbd » Thu Nov 29, 2007 3:10 pm

here ya go unhide from groups/components on selection or all if no selection
Please, register (free) to access all the attachments on the forums.
SketchUp Ruby Consultant | Podium 1.x developer
http://plugins.ro
User avatar
tbd
 
Posts: 1018
Joined: Wed Nov 14, 2007 10:47 am
Location: Romania
Name: TBD

Re: Unhide ALL (Edges) - Inside Groups / Components ???

Postby tomasz » Thu Nov 29, 2007 8:42 pm

Thanks TBD,
'Case' looks much nicer :)

Tomasz
tomasz
SU2TH & SU2KT Developer
 
Posts: 768
Joined: Fri Nov 16, 2007 8:46 pm
Location: Poland
Name: Tomasz
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: Unhide ALL (Edges) - Inside Groups / Components ???

Postby JClements » Fri Nov 30, 2007 9:53 am

Try using the last posted script on this file.
Please, register (free) to access all the attachments on the forums.
John
Illustrator
Beaverton, Oregon
User avatar
JClements
Premium Member
Premium Member
 
Posts: 773
Joined: Wed Nov 14, 2007 4:32 pm
Location: Portland/Beaverton, Oregon
Name: JClements
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: illustration, cartoons
Level of SketchUp: Intermediate

Re: Unhide ALL (Edges) - Inside Groups / Components ???

Postby Howard Leslie » Fri Nov 30, 2007 1:55 pm

Tomasz / TBD,
I've noticed some strange results with the last script that was posted (TBD)
Or maybe its just my misunderstanding of how GROUPS work ???
...
See attached file

All Geometry are Groups - NO Components.
See what happens when 1 group is copied several times eg the blue cube.
When selected and the script is run - ALL instances of that group are edited. (edges are unhidden)
I might expect this to happen with Components but not Groups.

Is it possible to get the script to run on selected geometry only ???
...
Regards
Howard L'
Please, register (free) to access all the attachments on the forums.
Howard Leslie
 
Posts: 236
Joined: Mon Nov 12, 2007 2:41 pm
Location: Cumbria; UK
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: engineering and mechanical design
Level of SketchUp: Advanced

Re: Unhide ALL (Edges) - Inside Groups / Components ???

Postby azuby » Fri Nov 30, 2007 5:51 pm

I've written an extension, unfortunately my web provider had a problem and my website has old content :( (I'll fix this).

azuby
Please, register (free) to access all the attachments on the forums.
error initus :: Blocks | CurrentDate | d/Code | extensionmanager | FFlipper | HideEdges | MeasuredArea | ModelHistory* | PluginsHelp | PronButton | SAWSO | SCP | SU²CATT

Bad English? PM me, correct me. :)
azuby
 
Posts: 309
Joined: Mon Nov 12, 2007 3:36 pm
Location: Berlin (Germany)

Re: Unhide ALL (Edges) - Inside Groups / Components ???

Postby tbd » Fri Nov 30, 2007 9:09 pm

azuby: unfortunately it suffers from the same problem - somehow duplicated groups have the same entities as in a component
SketchUp Ruby Consultant | Podium 1.x developer
http://plugins.ro
User avatar
tbd
 
Posts: 1018
Joined: Wed Nov 14, 2007 10:47 am
Location: Romania
Name: TBD

Re: Unhide ALL (Edges) - Inside Groups / Components ???

Postby TIG » Fri Nov 30, 2007 9:42 pm

I wrote this 'group_miner' script some time ago. It mines down through into any groups and makes sure that all groups are unique... Put it into your Plugins folder and it auto-runs at start up to ensure that the model is initially 'fixed'. You can invoke it in any script (remember to 'require' it if needed BUT it's a short bit of code to copy/paste inside any script anyway)... OR just type 'group_miner(Sketchup.active_model.entities)' to repeat the process 'live'...
Please, register (free) to access all the attachments on the forums.
TIG
User avatar
TIG
Global Moderator
 
Posts: 13898
Joined: Mon Nov 12, 2007 7:24 pm
Location: Northumbria UK
Name: TIG
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: Unhide ALL (Edges) - Inside Groups / Components ???

Postby tbd » Fri Nov 30, 2007 10:06 pm

and here is the fix (thanks TIG) - works with both .skp from JClements & Howard L' (for the cube in JClements .skp you need to triple click to select all connected as it is not a group)
Please, register (free) to access all the attachments on the forums.
SketchUp Ruby Consultant | Podium 1.x developer
http://plugins.ro
User avatar
tbd
 
Posts: 1018
Joined: Wed Nov 14, 2007 10:47 am
Location: Romania
Name: TBD

Re: Unhide ALL (Edges) - Inside Groups / Components ???

Postby JClements » Fri Nov 30, 2007 10:42 pm

Thank you TBD and TIG.

This will be useful.
John
Illustrator
Beaverton, Oregon
User avatar
JClements
Premium Member
Premium Member
 
Posts: 773
Joined: Wed Nov 14, 2007 4:32 pm
Location: Portland/Beaverton, Oregon
Name: JClements
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: illustration, cartoons
Level of SketchUp: Intermediate

Re: Unhide ALL (Edges) - Inside Groups / Components ???

Postby Howard Leslie » Mon Dec 03, 2007 10:06 am

Tomasz / TBD / TIG,
Thanks to all of you for working on this script.
Now works really well.
Regards
Howard L'
Howard Leslie
 
Posts: 236
Joined: Mon Nov 12, 2007 2:41 pm
Location: Cumbria; UK
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: engineering and mechanical design
Level of SketchUp: Advanced

Re: [Plugin] Unhide ALL (Edges) - Inside Groups / Components ???

Postby Jim » Thu Jan 07, 2010 4:02 pm

Is the fix posted in this thread still needed for the latest SketchUp versions?
Jim
Global Moderator
 
Posts: 4126
Joined: Mon Nov 12, 2007 10:13 pm
Location: NEOH
Name: Jim
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: other
Level of SketchUp: Intermediate

Re: [Plugin] Unhide ALL (Edges) - Inside Groups / Components ???

Postby TIG » Thu Jan 07, 2010 5:22 pm

Jim wrote:Is the fix posted in this thread still needed for the latest SketchUp versions?

Currently the failure to ensure that copies of a group become single instances of a definition is not fixed - group.make_unique still reports as being deprecated, but it is needed - it is possible to have several copies made of a group definition where they act like component instances, and so changing one instance changes the lot - it's what Components are supposed to do BUT that's NOT what groups are supposed to do... When you copy a group it should automatically become a single instance of its definition - there should never be the equivalent of group.definition.instances[1]. It doesn't currently work properly - either manually or scripted... :roll:
Last edited by TIG on Fri Jan 22, 2010 12:57 pm, edited 1 time in total.
TIG
User avatar
TIG
Global Moderator
 
Posts: 13898
Joined: Mon Nov 12, 2007 7:24 pm
Location: Northumbria UK
Name: TIG
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] Unhide ALL (Edges) - Inside Groups / Components ???

Postby Pout » Fri Jan 22, 2010 12:53 pm

Jim wrote:Is the fix posted in this thread still needed for the latest SketchUp versions?


i just did the test, and yes it is still needed
Pout
 
Posts: 272
Joined: Thu Aug 21, 2008 10:46 am

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago

Keyframe Animation plugin - animate your SketchUp model by adding movement to any object.

Premium Members get 20% discount!

Ad Machine
Robot
 
Posts: 2012



 

Return to Plugins

Who is online

Users browsing this forum: 5565star, andy1347, bonio, ptsly, revit dp and 13 guests