Skip to content

Instantly share code, notes, and snippets.

@jimfoltz
Created October 31, 2015 19:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jimfoltz/da53ea59cbcb36de95ba to your computer and use it in GitHub Desktop.
Save jimfoltz/da53ea59cbcb36de95ba to your computer and use it in GitHub Desktop.
UI.menu("Extensions").add_item("Print Model Size") {
JF::ModelSize.main
}
module JF
module ModelSize
def self.main
bb = Sketchup.active_model.bounds
# 8.times {|c|
# Sketchup.active_model.entities.add_cpoint(bb.corner(c))
# }
print "Model size: ["
print (bb.corner(1).distance(bb.corner(0))).to_s, " x "
print (bb.corner(2).distance(bb.corner(0))).to_s, " x "
print (bb.corner(4).distance(bb.corner(0))).to_s, "]\n"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment