Cutting with custom mesh doesn’t work

Hi everyone,

I really have a problem with an imported mesh that i want to cut with a box using the subtract function.

Here’s my playground: Babylon.js Playground

It doesn’t word because the result object keeps the box inside instead of deleting it.

Where is my mistake?

Thanks a lot for any help.

1 Like

Welcome to the forum @ttho :slight_smile:

@Evgeni_Popov might be able to help with this.

2 Likes

CSG does not work / work well with non closed shapes: you should give a thickness to the sheet and see if that helps.

3 Likes

Thank you @Evgeni_Popov. I’m new to BabylonJS, so could you please give me some instructions to add the thickness to the sheet?

@ttho, use the sheet to print it on the cube

https://playground.babylonjs.com/#PIEE5J#3

cTXU2o9ayW

Thanks @Vladimir_V_Bauklien for your help. But I will need to cut a see through hole on the sheet. The box should be deleted after it is done, but it is not.

So I say - first make a profiled sheet from a cube, then make a hole in it.

By the way, I got quite a collection of such sheets made in all ways.

First we merged it from cubes - everything was great until it turned out that the texture is stretched on this sheet as if these cubes are not merged, and that it is not treated.

Then we made it of ExtrudeShape - everything was great until it turned out that when zooming out, the edges of the grid are being smoothed and the profile disappears.

And that it is not treated:

chrome_MBvIBDgyHS

https://playground.babylonjs.com/#MR8LEL#43

Then I got tired and made this installation point by point:

beWgIYK2Kj

https://playground.babylonjs.com/#I092BE#270

Then we made a model in a Sketchup and uploaded it.

3 Likes

Reusing the closed profile from @Vladimir_V_Bauklien:
https://playground.babylonjs.com/#MR8LEL#664

3 Likes

Thanks @Vladimir_V_Bauklien and @Evgeni_Popov for your helps.

1 Like

еке564

1 Like