sketchucation logo sketchucation
    • Login
    🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    Reset/zero transformation, scale and rotation

    Scheduled Pinned Locked Moved Plugins
    7 Posts 6 Posters 3.9k Views 6 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.
    • PixeroP Offline
      Pixero
      last edited by

      Is there a plugin to reset the transformation, scale and rotation of a component?

      1 Reply Last reply Reply Quote 0
      • JQLJ Offline
        JQL
        last edited by

        Right click menu?

        Reset Scale and Reset Skew.

        Rotation is harder but if you use the move tool without selecting the component you find the red dot dongles and you can rotate to 0.

        www.casca.pt
        Visit us on facebook!

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

          @pixero said:

          Is there a plugin to reset the transformation, scale and rotation of a component?

          Maybe this

          unless file_loaded?((__FILE__))
          	UI.add_context_menu_handler do |menu|
          		sel = Sketchup.active_model.selection
          		if sel.first.is_a? Sketchup;;ComponentInstance
          			menu.add_separator
          			menu.add_item('Reset Scale Rotation') {
          				mod = Sketchup.active_model
          				ent = mod.entities
          				mod.start_operation 'Reset Scale Rotation'
          				cmp=sel.first;org=cmp.transformation.origin
          				t=cmp.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]=org.x;t[13]=org.y;t[14]=org.z;#t[15]=nil
          				cmp.transformation=cmp.transformation.set! t
          				mod.commit_operation
          			}
          		end
          	end
          	file_loaded((__FILE__))
          end
          
          

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

          http://sdmitch.blogspot.com/

          1 Reply Last reply Reply Quote 0
          • PixeroP Offline
            Pixero
            last edited by

            Thanks, will try this. 👍

            1 Reply Last reply Reply Quote 0
            • J Offline
              Jim
              last edited by

              Another option would be to set the Transformation to IDENTITY.

              instance.transformation = IDENTITY

              This would also move the instance to the Origin, but it's easy to move it back if that's what you need.

              Hi

              1 Reply Last reply Reply Quote 0
              • TIGT Offline
                TIG Moderator
                last edited by

                Alternatively, could you perhaps reset the object's transformation back to the inverse of what it was ?

                obj.transform!(obj.transformation.inverse)

                TIG

                1 Reply Last reply Reply Quote 0
                • G Offline
                  galinette
                  last edited by

                  Alternatively, you can delete that component instance, and create a new one with the components window. It will have an identity rotation/scale, just place it on the origin.

                  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