[REQ] find similar groups and create components
-
I have a huge issue, I'm doing some work for industrial designers and they supplied me with a bunch of .stp files which converted are massive in SU, like 320mb each. I need to reduce them in order to work on them but to do so I need to convert groups to components.
There are hundreds of groups that are all exaclty the same like cogs, nuts, rollers, etc and I only need one component and all others a copy of it, how can I achieve this with SU?
Is there a plugin that looks through model for identical groups andcan make one a component and all others a copy of it?
Desperate help needed as SU is buckling under the poly's at moment.
-
Pete, you could try ThomThom's Component compare. http://forums.sketchucation.com/viewtopic.php?t=30143 Then use the Selection Toys to convert the group copies into components.
-
Adam, I tried it but did not do a thing, could it be because it's not native SU geometry and imported?
-
Not sure. I used it the other day on a Chief Architect import and it worked beautifully....but that was windows and such. Perhaps try this route instead - http://forums.sketchucation.com/viewtopic.php?t=26008 Would be more tedious (Outliner should help) but might be more predictable.
I also had issues previously with the component comparison plugin not doing anything for me, even on simple box test. I redownloaded the plugin and updated Thom's lib files and it seemed to have corrected it. Is it not working at all, even on a simple test?
-
I may have an outdated lib file, can you direct me to the most recent one?
-
2.6 is his latest, but it's not specifically needed for the plugin. - http://forums.sketchucation.com/viewtopic.php?t=30503
However, like you, on my end the plugin itself seemed broken for a while.. If I remember I re-downloaded and re-installed all of my plugins from Thomas and it seemed to fix the issue. Can't say what it was specifically. If it is working properly, when you run the script with nothing selected you should receive a warning that says "Analyzing all definitions in a model can take a long time. Are you sure you want to continue?"
-
I re-installed again and did everything correctly even got the warning and clicked okay and nothing happened.
I dunno what's up.
-
I'm assumming that the groups don't have names and must be compared entity by entity?
-
I believe you are right, they are all grouped as per import from Deep exploration which I used to convert the .stp to .skp.
-
Solo, could you try this:
#1 make one of the similar groups a component ( explode the group before )
#2 select the component
#3 run Similar objects/ Replace Similar Objects.All similar groups become instances of the component.
-
Solo, I hate to rain on your parade but creating a group and copying it 99 times versus placing 100 instances of that group converted into a component actually increased the filesize.
-
@sdmitch said:
Solo, I hate to rain on your parade but creating a group and copying it 99 times versus placing 100 instances of that group converted into a component actually increased the filesize.
What I want is to make it faster to navigate in SU, so making it a component and then the other 99 of the same mesh as a instance of that component would make it lighter in SU.
-
@gilles said:
Solo, could you try this:
#1 make one of the similar groups a component ( explode the group before )
#2 select the component
#3 run Similar objects/ Replace Similar Objects.All similar groups become instances of the component.
I tried that to no avail, nothing happened.
-
This is the ruby consol report:
Replacing Similar Objects... Error; #<NoMethodError; undefined method `definition=' for #<Sketchup;;Group;0x148c1b6c>> C;/PROGRA~2/Google/GOOGLE~1/Plugins/tt_cc.rb;139;in `replace' C;/PROGRA~2/Google/GOOGLE~1/Plugins/tt_cc.rb;137;in `each' C;/PROGRA~2/Google/GOOGLE~1/Plugins/tt_cc.rb;137;in `replace' C;/PROGRA~2/Google/GOOGLE~1/Plugins/tt_cc.rb;119;in `each' C;/PROGRA~2/Google/GOOGLE~1/Plugins/tt_cc.rb;119;in `replace' C;/PROGRA~2/Google/GOOGLE~1/Plugins/tt_cc.rb;33 C;/PROGRA~2/Google/GOOGLE~1/Plugins/tt_cc.rb;139;in `call' C;/PROGRA~2/Google/GOOGLE~1/Plugins/tt_cc.rb;139
-
I believe that is because only components have definitions.
-
You should report to Thomthom.
Could you post a model? -
-
Could you isolate some groups in a separate model to give it a try?
-
@sdmitch said:
I believe that is because only components have definitions.
Components, Groups AND Images ALL have "definitions".
However, unlike "instance.definition" there is NO API "group.definition" method [OR indeed "image.definition"] UNLESS it has been added by additional code within a script to make the method - so therefore this suggests 'something is missing', because TT WOULD have included for this somewhere in his coding... ?
So... do you have all of the support files installed properly [needed TT Libs etc] ?: -
It seems that TT Libs aren't request for this one.
Advertisement