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)