There are holes in the mesh. Keep the holes sized when scaling,can three do it?

I have a door with a handle on the door, when I scale the door panel, I want to keep the size of the hole in the door where the handle is placed, how can I do that?



Changing the scaling affects the entire object’s geometry and all descendant objects. This is a ground rule of scene graphs and 3D hierarchies and there is no way to prevent this from happening.

thanks! I’ve tried it, but I still want to ask again to see if there is any other way to achieve this effect :joy:. Now I think I need to think differently to achieve this.

Try it using a rectangular Three.Shape for the door with a rectangular hole for the handle, like shown in this example (Smiley shape, top left), source lines 295 - 318. Extrude the resulting shape like shown in same example, lines 333, 345.

Now you can move, scale, rotate the outer Three.Shape while leaving the “hole” Three.Shape unchanged.

See line 91 of the source, this approach doesn’t work either. Because my x or y axis scaling values ​​are not consistent, this causes the hole to deform.



The sample I gave you is meant as an inspiration only. It’s up to you to adapt it to your use case.

1 Like

I see. i’m trying.