Mirrored groups/components -> make unique
-
hi there,
is there a ruby script or plugin which "fixes" mirrored groups/components?
why? we give our models to people working in max - import is fine and even instances come in pretty nice - only problem we encountered is that components which got mirrored are bad in max - because of inverted normals in some rare situatons and negative values in the scale dialog / x-form ....
this can be handled inside of max but it would be nice if i could provide a sober solution out of sketchup...
so a solution would be handy that finds mirrored objects with negative values and makes them unique and resets scale to positive 1x1x1 ... iterateing throuth nested componetns and so on...
also i now that probably its not that easy with nested stuff if the outside container is positive and somewhere in level xx of the nested geometry there is the mirrored object...
i hope someone understands and can help me with the problem or provide another workflow or tipp to overcome this issue
thanks and have a nice year 2016
-
It hardly needs a plugin.
You could run something like this one-liner [then do the export - but because you lose any component instancing [everything becomes unique], you might NOT want to save the SKP afterwards, without an undo or two to get those instances back?]m=Sketchup.active_model;m.start_operation('!');m.definitions.each{|d|next if d.image?;d.instances.each{|i|i.make_unique}};m.commit_operation
If you have any Ruby skills you could perhaps adjust it, to do the export and then do a
;model.abort_operation
to undo the changes, but keep the exported file... -
thanks for the help - i will try to get my hands on ruby as soon as possible! there is no way around it any longer
Advertisement