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

    [REQ] Distance of 2 groups/components

    Scheduled Pinned Locked Moved Plugins
    4 Posts 3 Posters 399 Views 3 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.
    • C Offline
      chrisik
      last edited by

      Is there a plugin out there that can quickly measure the distance of the midpoints of two selected groups and/or components in all 3 dimensions and direct distance. Or is somebody out there that can write this little plugin? thanks.


      Example of the plugin

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

        Center Point All by TIG

        @unknownuser said:

        Adds a centerpoint to anything that's selected - Group, ComponentInstance, Line, Circle, Face etc

        then you can or

        GIF_measure.gif

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

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

          @chrisik said:

          Is there a plugin out there that can quickly measure the distance of the midpoints of two selected groups and/or components in all 3 dimensions and direct distance. Or is somebody out there that can write this little plugin? thanks.

          Something like this? First select 2 components and/or groups then right click on either one and select 'Calc xyzd'.

          unless file_loaded?((__FILE__))
          	UI.add_context_menu_handler do |menu|
          		sel = Sketchup.active_model.selection
          		if (sel[0].is_a?(Sketchup;;ComponentInstance)||sel[0].is_a?(Sketchup;;Group))
          			if (sel[1].is_a?(Sketchup;;ComponentInstance)||sel[1].is_a?(Sketchup;;Group))
          				menu.add_separator
          				menu.add_item('Calc x,y,z,d') {
          					center0 = sel[0].bounds.center
          					center1 = sel[1].bounds.center
          					x = Sketchup.format_length((center1.x-center0.x).abs)
          					y = Sketchup.format_length((center1.y-center0.y).abs)
          					z = Sketchup.format_length((center1.z-center0.z).abs)
          					d = Sketchup.format_length(center0.distance(center1))
          					UI.messagebox "x = #{x}\ny = #{y}\nz = #{z}\nd = #{d}"
          				}
          			end
          		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
          • C Offline
            chrisik
            last edited by

            πŸ‘ YES. Thank you very much. This is a big timesaver for me. πŸ˜„

            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