[REQ] Distance of 2 groups/components
-
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.
-
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
-
@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
-
YES. Thank you very much. This is a big timesaver for me.
Advertisement