I’m looking to add a new mesh built from points of intersection to achieve a “cross-section” like effect, similar to what can be found in the example here:
- three.js examples
and here using bvh: - three-mesh-bvh - Clipped Edges
However given the sort of materials I am wanting to render, using a stencil does not seem compatible. I’m using a similar code base to the following example for fetching intersection points as seen here:
I have modified versions of the code for this functionality to try and generate a plane based on the points returned as can be seen in this example I put together:
The issue I am facing is using those vertices to create a new mesh to act as the “cap” on top of the clipped mesh. Everytime I try to plug these vertices into a mesh geometry all that is generated is a random array of triangles.
MAIN QUESTION: Is this sort of mesh building from intersection points possible? If so am I missing some form or processing or ordering on the received values?
Any help or pointing in the right direction would be greatly appreciated!
Many thanks.
