Split Mesh or Vertex using another Vertex Positions


I need help!!
How can I split the mesh or mesh Vertex using another Vertex Positions. Basically I need to keep the original mesh part as a different mesh, which part is inside the closed line mesh.
CSG is not preferable on my scenario.

Here is the PG link:



This is quite an involved process, but certainly not impossible. Given the existing mesh you already have, in black, and the path you want to separate, in red:

You’re going to have to compute the vertices in the intersection between the mesh edges and the path, and from there basically retriangulate the two areas separately. It’s a bit similar to what the Blender Knife Project tool does: Knife Project — Blender Manual. You could have a look at the Blender code to see how it does it: blender/blender: Official mirror of Blender (github.com)

Thanks @carolhmj.

Long time back I’m here.
I’m not able to achieve this thing properly. I’m not expert in babylonjs, just at beginner level.
In this PG I missed edge to edge vertices. Just getting the vertices which is inside the path. Can I get further help from anyone.

Here is another PG I have try,