Delete non-seen/inner mesh?

Hi, I am having trouble removing un-needed mesh from a model. I am building with LEGO models in Blender, and all of the hidden bricks and faces are un-nessisarry and I do not know how to remove them. Is it possible to do it automatically like with a script? Here’s a picture:

The one on the left is what I have. I want the un-seen faces on the orange brick to be deleted. On the right, I am showing you what the orange brick looks like.

If you need more info, please ask!

Thanks in advance! :smiley:

Just select the faces and press X to delete them. Even if you have quite a few objects it will only take a few minutes.

You do not understand. I have a huge amount to do. That was just a simple example, I have thousands of bricks I have to do this on. That’s why I was wondering if there was some type of script or something that would detect what was able to be seen and delete un-seen faces.

Here’s another example:

Left: the mesh I want to keep
Right: The mesh that was hidden under it that I want to delete.

I’d look into the mask modifier, were I you. I’m not an expert with it so I can’t exactly provide detailed instructions, sorry. It essentially hides the faces that are behind another object. Something like that. Good luck!

If it’s easier to select the pieces you want to keep, then do that. Select what you want to keep, hit H to hide it, then hit A to select whatever is left, then x to delete it. Alt-H will unhide the desired mesh and that will be all that’s left.

Blender modifier Boolean:Union or better boolean:
Then import the mesh back to Blender if needed.

Just be aware that booleans will create some very bad topology that can ruin surface shading. If you’re making these for 3d printing, then booleans are probably fine. If this is for rendering, beware.

well, you managed to isolate the parts in this image, so just press b to box select the lot and press x and delete faces ( just make sure you de select your main model first…)