Closed a740615405 closed 3 years ago
I imagine you would have to walk through all vertices and see if they cross your plane and create new vertices if needed.
In any case not that easy to do and definitely not within this library because numpy arrays normally have a fixed size so splitting is not a trivial operation.
Are you trying to do calculations on the displacement of objects in water? My approach to the same problem has been to get the centroid of each triangle, check which centroids are below the surface, then take work out volumes based on those triangles whose centroids are below the surface. It's a bit rough because it means you have a sort of jagged edge along the plane, but it does avoid the difficult problem of having to reconnect the mesh; as you would have to if you were checking based on vertices.
I imagine you would have to walk through all vertices and see if they cross your plane and create new vertices if needed.
In any case not that easy to do and definitely not within this library because numpy arrays normally have a fixed size so splitting is not a trivial operation.
hello @WoLpH : Thank you very much for replying, I have solved the problem with another library named trimesh, that is easier using this lib.
Are you trying to do calculations on the displacement of objects in water? My approach to the same problem has been to get the centroid of each triangle, check which centroids are below the surface, then take work out volumes based on those triangles whose centroids are below the surface. It's a bit rough because it means you have a sort of jagged edge along the plane, but it does avoid the difficult problem of having to reconnect the mesh; as you would have to if you were checking based on vertices.
hello @Skullsploder : Thank you very much for replying, I have solved the problem with another library named trimesh, that is easier using this lib.
Excellent :)
Manipulating meshes never has been a goal for this library, just storing and loading.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I want to make a plane when you input a Z height number, that is parallel to XY plane. Then I want to split the stl file with this plane and measure the remaining volume below the plane.
How can I do this ?