We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I´m tying to make a sketch that "project" on a HE_Mesh mesh any random external point, any point located out of the mesh surface. Does anybody know which can be the better way?
I tried the HE_Mesh method : getClosestPoint (final WB_Point p, final WB_KDTree< WB_Point, Long > vertexTree)
So given any query point like:
WB_Point randomPoint;
And given a vertexTree, KD-tree from myMesh (from vertexTree()
) that returns a KD-tree containing all vertices.
WB_KDTree<WB_Coordinate, Long> myVertexTree = mesh.getVertexTree();
Then I get trouble trying to make a sentence like this:
WB_Point myClosestPoint = mesh.getClosestPoint(randomPoint, myVertexTree);
The problem is that the method getClosestPoint ( WB_Point , WB_KDTree<WB_Point, Long > ) in the type HE_Mesh is not applicable for the arguments WB_KDTree <WB_Coordinate, Long>
Is there any method like getVertexTree()
that returns a WB_KDTree<WB_Point, Long>
,
or how can I translate the WB_KDTree<WB_Coordinate, Long>
into a WB_KDTree<WB_Point, Long>
Answers
Here´s an example:
I realized that the
getFaceTree()
method gets back aWB_KDTree <WB_Point, Long>
. ( instead of thegetVertexTree()
that returns aWB_KDTree<WB_Coordinate, Long>
) But any query gives a null... What I am doing wrong?For example:
Solved by the author of HE_Mesh in the v 2.0.14. Thanks Frederick Vanhoutte !! ^:)^