A way to prevent two objects to occupy the same space

Hello.

I am trying to figure out a way to create objects that can not occupy the same space as each other.

So, for example. I have a box in real life (I will call it “the box” from here on). I want to build something to put in that box (I will call it “the gizmo” from here on). My goal is to use Sketchup to see how the gizmo can move and rotate when put inside the box.

So I create the box in Sketchup using the real life measurements. Then I create the gizmo that I want to fit in the box. When I do, I want Sketchup to prevent me from rotating it inside the box if it touches the walls of the box.

The “box” in real life is not an easy to understand square box, but rather full of curves and strange angles so it is not clear (not to me at least) if the gizmo will fit just by looking at the measurements, and especially when we get to rotating the gizmo inside the box.

So is there a way to do that?

This sort of intelligence isn’t built into SU, and I’m not sure if it’s available within the plugin / ruby script realm either. (Others will know better about this option).

From a manual standpoint I think you can check for your clearances fairly easily…

Take your box and apply a transparent material to it. . . Glass, or Water, or edit something else.

Keep your gizmo a solid color ( ‘White’ would be good). . . Place it in the box, and rotate away.

It’s not going to be very difficult to determine when your gizmo breaks through the walls of the box during rotation. since you’ll be able to see a color change appear on it whenever it does so.

You’re going to need something that has some form of collision detection. 3D meshes in themselves don’t actually have this built-in.
I’ve never really had any need for it myself, but I believe the Sketchyphysics extension will do that…and rather more.

1 Like

Thanks to JimD and AlanF! Good suggestions, both of them. It will help me going forward!