[Plugin] Originate component axes
-
I guess you saw "Axis component" by sahi. (in Plugins Index) This only helps set axes within the components as far as I know, and probably only one by one.
-
This one liner copy/paste + <enter> into the Ruby Console will move the insertion points [axes] of all selected instances to the origin, also making multiple-copies unique...
m=Sketchup.active_model;s=m.selection.to_a;is=s.find_all{|i|i.class==Sketchup;;ComponentInstance};m.start_operation('t');is.each{|i|i.make_unique if i.definition.instances[1];d=i.definition;t=i.transformation;es=d.entities;es.transform_entities(t, es.to_a);i.transform!(t.inverse)};m.commit_operation
-
Prefect, this is exactly what I meant (and nested components are not affected, exactly as I wished).
Thank you very much, TIG!
(Note to myself and others: the plugin uses the original world axes so if one moves the axes elsewhere, do not be surprised)
I'd have a question though. Now I have a bunch of lines of code: what do I need to do to have a plugin from those?
And thanks Tim as well of course - but I did not go to try after this
-
That's ok, Csaba. If I were TIG, I would have done the same thing as he.
EDIT: only, it would have taken me a week to get back to you. -
Funny, just today I was needing the same thing.
Thanks! -
Thanks very much again, TIG!!!
-
Hi Gaï, TIG, tim, Jan,
Can someone shows in what sort of case this new plugin is (very) useful? Excuse me but my mind is dry to imagine it
simon
PS: However, thank you TIG for this one and how many others+++
-
Hi, simon:
What I understand is this plugin will place the axes/origin of numerous components at the global axes origin of the model space. Gaieus can explain his purpose better than me. I was just cruising the Plugins Index in response to his request. -
As long as components haven't been purged from model, it would make it very easy to replace stuff that has been deleted from the working model - sort of paste in place for things not on the clipboard.
-
It's great plugin!
But unfortunately it do not work for proper crop orientation of "make unique texture" function(
-
There is a way to make it work on any components and groups in the model not only the top level ones?
-
I would like it to work for all nested components within a component. So if we use the co nand on one component, all the nested components should also get originated axes. Currently it works for a single component. We have to manually select the nested components every tome within a component to make this plugin work.
-
In addition to making this work on groups as well as the components, It should have option to work on all nested groups and components?
Also, perhaps way to choose which axis to change to. Not limited to the world only, but perhaps to the axis of the currently active component or group?
I hope this makes sense.
-
Is there a similar plugin to force align ALL selected component/groups AND nested subgroups/subcomponents local Y+ axes to world Z+?
That would be extremely handy when preparing models for game engines and similar stuff..
I'm searching everywhere with no luck..
Advertisement