Created
June 16, 2017 13:19
-
-
Save thomthom/56316c2108ec9479b6407efed0b53f8d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'set' | |
model = Sketchup.active_model | |
selected = Set.new(model.selection.to_a) | |
edges = model.selection.grep(Sketchup::Edge) | |
faces = Set.new(model.selection.grep(Sketchup::Face)) | |
border = edges.reject { |edge| edge.faces.all? { |face| faces.include?(face) } } | |
selected.subtract(border) | |
model.start_operation('Interior Erase', true) | |
model.active_entities.erase_entities(selected.to_a) | |
model.commit_operation |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment