Subject: CGAL users discussion list
List archive
Re: [cgal-discuss] Marking the outer vertices of a triangulation with alpha shape
Chronological Thread
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] Marking the outer vertices of a triangulation with alpha shape
- Date: Mon, 27 Jul 2015 07:28:48 +0200
- Organization: GeometryFactory
What about adding an info in the vertex type?
See this example:
http://doc.cgal.org/latest/Triangulation_2/index.html#title40
using this class:
http://doc.cgal.org/latest/Triangulation_2/classCGAL_1_1Triangulation__vertex__base__with__info__2.html
Sebastien.
On 07/24/2015 05:40 PM, Daniel Duque wrote:
Hello everyone.
I have been using alpha shapes to identify the outer vertices of
triangulations
for some time, and I am very happy with the method. However, the
underlying triangulation
is destroyed in the process. This often OK, but can be inconvenient if
one just wants to "mark"
the nodes as outer, but keeping the triangulation. Right now I am doing
this crude treatment
which, as you see, copies the triangulation, destroys it, then marks the
vertices on the original
triangulation as outer if the coincide with the nodes of the alpha shape.
The crudest part, as you can see, is that this coincidence is
implemented by "locate", since
I have lost any other connection with the original triangulation. I
guess I could hack the
copy procedure in order to include a pointer or handle to the original
one...
Any ideas will be welcome.
Best,
Daniel Duque
UPM
// T is a global Delaunay triangulation
void surf_detect(void) {
Triangulation T2(T);
FT hh= 1.2 * simu.h();
FT alpha=hh*hh;
Alpha_shape_2 al( T2, alpha );
for (Alpha_shape_vertices_iterator asv=al.alpha_shape_vertices_begin();
asv!=al.alpha_shape_vertices_end();
++asv) {
Point p=(*asv)->point();
// mark vertices in the alpha shape as boundary vertices
// implemented by locate (not very efficient, I guess)
int i;
Triangulation::Locate_type lt;
Face_handle fc=T.locate(p, lt , i );
fc->vertex(i)->boundary.set( true );
}
return;
}
- [cgal-discuss] Marking the outer vertices of a triangulation with alpha shape, Daniel Duque, 07/24/2015
- Re: [cgal-discuss] Marking the outer vertices of a triangulation with alpha shape, Sebastien Loriot (GeometryFactory), 07/27/2015
- Re: [cgal-discuss] Marking the outer vertices of a triangulation with alpha shape, Daniel Duque, 07/27/2015
- Re: [cgal-discuss] Marking the outer vertices of a triangulation with alpha shape, Sebastien Loriot (GeometryFactory), 07/27/2015
- Re: [cgal-discuss] Marking the outer vertices of a triangulation with alpha shape, Daniel Duque, 07/28/2015
- Re: [cgal-discuss] Marking the outer vertices of a triangulation with alpha shape, Sebastien Loriot (GeometryFactory), 07/27/2015
- Re: [cgal-discuss] Marking the outer vertices of a triangulation with alpha shape, Daniel Duque, 07/27/2015
- Re: [cgal-discuss] Marking the outer vertices of a triangulation with alpha shape, Sebastien Loriot (GeometryFactory), 07/27/2015
Archive powered by MHonArc 2.6.18.