If I have a cube consisting of 6 faces (not a group or instance), and I have miscellaneous other entities inside of it ,such as other faces,edges etc, is there any way to erase everything inside of it? Something along the lines of erasing everything that cannot be seen?
First use BoundingBox.add to create a bounding box for the 6 faces.
Then use boundingbox_pick to return an array of objects.
(which will include your 6 faces.)
Subtract your 6 faces and their vertices from the array.
Then Entities.erase_entities array
yes, but it’s complicated…
I have a tool that does the opposite, i.e. it remove everything else…
The tricky part is that I don’t know which faces will be the outter-most faces, so if I make a bounding box, I wont know which faces to exclude from the delete. Any ideas there?
you either need to create the box in a two click tool or select a pre-existing one to add the bb…
once you have a reference to the bb, you can sort through the entities collection…
So now I’m confused. You said you know you have a 6 sided box. You need to know its faces to create the bounding box in the first place. Therefore you also know what faces to remove from the result array.
Maybe you need to explain your larger purpose.
Maybe you want to remove all objects inside all boxes that might exist?
Hi, the tool (plugin?) you mention that does the opposite of what the original poster wanted is actually EXACTLY the tool I want-- to make a box around a complex set of geometry (like part of a house) and delete everything outside the box. What is the name of the plugin??
SketchUp now has invert selection (since version 2019.2.)
So select what you want to keep, right-click the selection set and choose Select > Invert Selection from the context menu, then hit the Delete key.
I already use the invert selection for other things-- what I want to do is slice/intersect a box through a complex building model of many components and groups (I’m an interior designer who works with architects), and cut-and-keep everything in the box so I can save to a smaller model for design versions. It would be impossible to select everything I wanted to keep individually-- especially because I need to intersect groups and components. I’ve used a box to Intersect with Model and delete everything around it, but I don’t suppose you know of a more automated method or plugin?
Yes, that would be useful, and it looks like what @john_drivenupthewall’s extension does. Maybe now that he’s tagged, he’ll notice and reply.