-
Given a 3D mesh file (.obj) with a point, make a slice across the point to intersect this 3D mesh to get a 2D slice. How to get the signed distance of this point to this 2D profile efficiently? Is there a relevant algorithm or graphics library I can refer to? Thanks a lot! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You can get the list of intersection segments using [ |
Beta Was this translation helpful? Give feedback.
You can get the list of intersection segments using [
Polygon_mesh_slicer
])https://doc.cgal.org/latest/Polygon_mesh_processing/classCGAL_1_1Polygon__mesh__slicer.html) and build anAABB_tree
of segments and the functionsquared_distance()
to get the distance. For the sign, you need to useSide_of_triangle_mesh
. Note that you might want to compute and use only one AABB-tree forPolygon_mesh_slicer
andSIde_of_triangle_mesh
.