Subject: CGAL users discussion list
List archive
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] closest point with AABB_tree
- Date: Mon, 07 Jul 2014 08:06:42 +0200
- Organization: GeometryFactory
On 07/04/2014 06:12 PM, Oliver Gloth wrote:
Hello,
I am fairly new to CGAL and managed to use it in order to project a
point in 3D space onto the closest location on a triangulated surface.
The background of this is the generation of a computational mesh for CFD
(open-source tool enGrid, see http://engits.eu/engrid).
Computing the closest point in terms of an (x, y, z) triple works and
you can find the code here:
https://github.com/enGits/engrid/blob/new_concept/src/libengrid/cgaltricadinterface.h
https://github.com/enGits/engrid/blob/new_concept/src/libengrid/cgaltricadinterface.cpp
What I would also like to have is the index of the triangle on which the
projected point is. With this information we would like to compute
additional properties like, for example, local curvature or the local
normal vector of the surface.
Is this possible? If yes, does somebody have a small piece of example
code which illustrates how to do this?
If you use the function closest_point_and_primitive, you'll be able
to get the iterator of the triangle and convert it to an index.
Sebastien.
Best regards,
Oliver
Dr.-Ing. Oliver Gloth (managing partner)
phone: +49 (0)7671-992-5110, fax: -222-9689, mobile +49 (0)173-317-3698
enGits GmbH, http://engits.eu, Todtnau, AG Freiburg HRB 700491
Geschaeftsfuehrer/managing partner: Dr. Oliver Gloth
- [cgal-discuss] closest point with AABB_tree, Oliver Gloth, 07/04/2014
- Re: [cgal-discuss] closest point with AABB_tree, Sebastien Loriot (GeometryFactory), 07/07/2014
Archive powered by MHonArc 2.6.18.