Mesh intersection

Hi guys,

I ask for your help yet again.
I built this simple example to help explain my needs:
https://playground.babylonjs.com/#J8UE9C

What I’m trying to to is, through maybe CSG, remove everything but the part of the plane that has intersected the box.
https://camo.githubusercontent.com/3c59c49f85dc01a6691a44ffda53f6b0659f775c/687474703a2f2f6576616e772e6769746875622e636f6d2f6373672e6a732f696d6167652e706e67
So looking at this image, I guess what I need is only the blue part of a subtract or an intersect.

Is something like this possible? It’s not a necessity to stick to CSG, as long as I can attach a simple material to it.

Any help is greatly appreciated.

You can try to use a thin box instead of the plane and take the intersection of both planes:

https://playground.babylonjs.com/#J8UE9C#1

2 Likes

Thank you for your input. Here’s an update on this.

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

If I change the plane (or box as in your example) this doesn’t work anymore. This is actually what I’m trying to cut here, I added a plane in the example to make it easier to follow.

From my understanding, if I can manage to add the 0.01 in thinkness to the corrugated plane, then it would be fine (the thickness in the end result doesn’t bother me), but I’m unsure if I can extrude the mesh further, on the y axis.