sketchucation logo sketchucation
    • Login
    πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    Is there a plugin...

    Scheduled Pinned Locked Moved Plugins
    9 Posts 4 Posters 1.4k Views 4 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • cottyC Offline
      cotty
      last edited by

      ...for the rotation of all selected groups/components so that their x-y-plane gets horizontal?

      e.g.:

      rotateplugin.JPG

      my SketchUp gallery

      1 Reply Last reply Reply Quote 0
      • pilouP Offline
        pilou
        last edited by

        Try the allign & distribute by Sdmitch ? (not yet tested with your case)

        Frenchy Pilou
        Is beautiful that please without concept!
        My Little site :)

        1 Reply Last reply Reply Quote 0
        • sdmitchS Offline
          sdmitch
          last edited by

          @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
          
          

          Put on XY Plane.gif

          Nothing is worthless, it can always be used as a bad example.

          http://sdmitch.blogspot.com/

          1 Reply Last reply Reply Quote 0
          • pilouP Offline
            pilou
            last edited by

            @Sdmitch
            Does the plugin "plane" on the current x,y plane of each local "Z" object?

            Frenchy Pilou
            Is beautiful that please without concept!
            My Little site :)

            1 Reply Last reply Reply Quote 0
            • sdmitchS Offline
              sdmitch
              last edited by

              @pilou said:

              @Sdmitch
              Does the plugin "plane" on the current x,y plane of each local "Z" object?

              Yes, it doesn't change the transformations point of origin.

              Nothing is worthless, it can always be used as a bad example.

              http://sdmitch.blogspot.com/

              1 Reply Last reply Reply Quote 0
              • pilouP Offline
                pilou
                last edited by

                So Cool! πŸ˜„

                What must do with the code above ? Run on the Console, or...

                Frenchy Pilou
                Is beautiful that please without concept!
                My Little site :)

                1 Reply Last reply Reply Quote 0
                • sdmitchS Offline
                  sdmitch
                  last edited by

                  @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.

                  Nothing is worthless, it can always be used as a bad example.

                  http://sdmitch.blogspot.com/

                  1 Reply Last reply Reply Quote 0
                  • M Offline
                    mics_54
                    last edited by

                    "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.

                    1 Reply Last reply Reply Quote 0
                    • cottyC Offline
                      cotty
                      last edited by

                      Thank you very much, sdmitch!
                      It does exactly what I was searching for... πŸ‘

                      my SketchUp gallery

                      1 Reply Last reply Reply Quote 0
                      • 1 / 1
                      • First post
                        Last post
                      Buy SketchPlus
                      Buy SUbD
                      Buy WrapR
                      Buy eBook
                      Buy Modelur
                      Buy Vertex Tools
                      Buy SketchCuisine
                      Buy FormFonts

                      Advertisement