Slicing Concave Mesh Into Half.
Demo video: https://www.youtube.com/watch?v=_yqTljJ0mW0&t=166s
- slice convex, concave and meshes with holes.
- if your mesh is too complicated, the cross-section surface sometimes not created.
Download the files and put the ConcaveMeshSlicer.gd into your project.
In your script that you want to slice meshes, create the MeshSlicer node.
var meshSlicer = MeshSlicer.new()
To slice a mesh, use the slice_mesh function.
#Slice a mesh in half using Transform3D as the local position and direction. Return an array of the sliced meshes.
#The cross-section material is positioned and rotated base on the Transform3D
meshSlicer.slice_mesh(slice_transform:Transform3D,mesh:Mesh,cross_section_material:Material)