-
Hi, I have a static closed STL shape in 3D (for example, a tetrahedron). I am sampling points randomly in 3D space. I need to consider points that are inside the shape. Is it possible to implement using the FCL library? |
Beta Was this translation helpful? Give feedback.
Answered by
lmontaut
Dec 1, 2023
Replies: 1 comment
-
Hi @Rennngw,
You can then access the faces normals and faces offsets of the mesh to check if your points are inside/outside the shapes (by considering all hyperplanes defining your shape):
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
jcarpent
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @Rennngw,
In the
hppfcl3x
branch, if your object is convex, you can load it by using aMeshLoader
then call thebuildConvexHull
method of BVHs:You can then access the faces normals and faces offsets of the mesh to check if your points are inside/outside the shapes (by considering all hyperplanes defining your shape):