Is there a plugin...
-
...for the rotation of all selected groups/components so that their x-y-plane gets horizontal?
e.g.:
-
Try the allign & distribute by Sdmitch ? (not yet tested with your case)
-
@cotty said:
...for the rotation of all selected groups/components so that their x-y-plane gets horizontal?
e.g.:
[attachment=1:34yh7xbl]<!-- ia1 -->rotateplugin.JPG<!-- ia1 -->[/attachment:34yh7xbl]
This just requires resetting the axes in the transformation.
unless file_loaded?((__FILE__)) UI.add_context_menu_handler do |menu| sel = Sketchup.active_model.selection if sel.first.is_a?(Sketchup;;ComponentInstance)||sel.first.is_a?(Sketchup;;Group) menu.add_separator menu.add_item('Put on XY Plane') { Sketchup.active_model.start_operation "Put on XY Plane" sel.each{|ci| next unless (ci.is_a?(Sketchup;;ComponentInstance)||ci.is_a?(Sketchup;;Group)) t=ci.transformation.to_a t[0]=1;t[1]=0;t[2]=0;#t[3]=nil t[4]=0;t[5]=1;t[6]=0;#t[7]=nil t[8]=0;t[9]=0;t[10]=1;#t[11]=nil #t[12]=0;t[13]=0;t[14]=0;#t[15]=nil ci.transformation=ci.transformation.set! t } Sketchup.active_model.commit_operation } end end file_loaded((__FILE__)) end
-
@Sdmitch
Does the plugin "plane" on the current x,y plane of each local "Z" object? -
-
So Cool!
What must do with the code above ? Run on the Console, or...
-
@pilou said:
So Cool!
What must do with the code above ? Run on the Console, or...
You can copy and paste it in the Ruby Console to check it out.
Or you can copy and paste it to an .rb file and save it in the Plugins folder.
-
"Or you can copy and paste it to an .rb file and save it in the Plugins folder."
Which text editor is recommended/preferred to create.rb files? I'm a total newb to ruby but want to learn. I run a windows 10 computer.OK I downloaded notepad++, converted the text file and installed it in the proper plugins folder and it works great. Thanks again sdmitch.
-
Thank you very much, sdmitch!
It does exactly what I was searching for...
Advertisement