Skip to content

Instantly share code, notes, and snippets.

@alexschreyer
Last active August 29, 2015 14:16
Show Gist options
  • Save alexschreyer/ab31f8e55cc6c6ce8b34 to your computer and use it in GitHub Desktop.
Save alexschreyer/ab31f8e55cc6c6ce8b34 to your computer and use it in GitHub Desktop.
Drop selection to ground (z=0) in SketchUp
mod = Sketchup.active_model # Open model
ent = mod.entities # All entities in model
sel = mod.selection # Current selection
sel.each { |i|
vec = Geom::Vector3d.new 0,0,-(i.bounds.min.z)
t = Geom::Transformation.new vec
ent.transform_entities(t, i)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment