Skip to content

The signed distance from a given point to a 2D slice of a given 3D mesh (for example, obj file) #7587

Answered by sloriot
Pupillen asked this question in Q&A
Discussion options

You must be logged in to vote

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 an AABB_tree of segments and the function squared_distance() to get the distance. For the sign, you need to use Side_of_triangle_mesh. Note that you might want to compute and use only one AABB-tree for Polygon_mesh_slicer and SIde_of_triangle_mesh.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Pupillen
Comment options

Answer selected by lrineau
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants