Algorithm or software for slicing a mesh

前端 未结 5 595
春和景丽
春和景丽 2021-01-31 05:38

What is the right approach for slicing a 3D mesh? The mesh are all closed surfaces and the slices need to be binary images of what\'s inside the mesh. So for example, a mesh rep

5条回答
  •  长发绾君心
    2021-01-31 06:29

    It would be faster (for yourself, not running-time) if you implement it yourself: These are the simple steps you need to do:

    1-Extract all the triangles of the mesh

    2-For each triangle,

    2-1- check if any of triangle points are on the slice-plane,

    2-2- if not, then for each of its three edges, find the intersection with your slice-plane (if there is any). You must either have 2 of them intersected with the plane or none.

    2-2-1 If 2 edges intersected with the plane, then you add a line between these 2 points on the plane.

提交回复
热议问题