You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When clipping a mesh with the method TriangleMesh3DOperations.clip, one would assume that all the points of the mesh, which satisfy the given predicate are part of the resulting clipped mesh. However, the way it is currently implemented is, that only the points which satisfy the predicate and are part of a triangle are clipped.
In Scalismo we do not enforce that every point in a mesh is part of a triangle. Indeed, it is perfectly valid in Scalismo to create a mesh with an empty triangle list. Therefore we should not assume or enforce that all points are part of a triangle in the clip mesh function.
The same problem most likely occurs when clipping tetrahedral meshes.
The text was updated successfully, but these errors were encountered:
I do not fully agree. For a TriangleMesh the natural intuition is, that it consists of triangles. For me, the concept of floating points not associated to any triangle is not represented in this class. For me, the fact that only points used in at least one remaining triangle are kept is a valid post-condition of the function.
Maybe we should discuss the opposite point, why we allow that a user can construct a triangle mesh where not all points are contained in at least one triangle.
For me it is not clear how to implement this more strict scenario. Would you throw an exception if not all points are part of a triangle or silently remove these points? Throwing an exception seems not a good option, as perfectly reasonable predicates in the clip operation might lead to such situations. But silently ignoring some points the user has specified could be problematic too, as shown in StatisticalMeshModel.marginal.
When clipping a mesh with the method
TriangleMesh3DOperations.clip
, one would assume that all the points of the mesh, which satisfy the given predicate are part of the resulting clipped mesh. However, the way it is currently implemented is, that only the points which satisfy the predicate and are part of a triangle are clipped.In Scalismo we do not enforce that every point in a mesh is part of a triangle. Indeed, it is perfectly valid in Scalismo to create a mesh with an empty triangle list. Therefore we should not assume or enforce that all points are part of a triangle in the clip mesh function.
The same problem most likely occurs when clipping tetrahedral meshes.
The text was updated successfully, but these errors were encountered: