Subject: CGAL users discussion list
List archive
- From: morrischen2008 <>
- To:
- Subject: [cgal-discuss] Alpha Shape 2D: Input point index
- Date: Wed, 28 May 2014 12:24:07 -0700 (PDT)
Hi everyone,
I am currently using Alpha Shape to construct the surface of a bunch of
points. The process is simple: the input is a bunch of points, and I get a
bunch of points as output. However, when I have indexes for the input
points, like this
input
---------------
index location
1 (1.0, 2.0)
2 (2.1, 2.3)
3 (2.3, 1.8)
. ...
. ...
731 (7.1, 9.3)
. ...
I want to have to get, in the output points, also the indexes, like this
output
------------------
index location
2 (2.1, 2.3)
. ...
. ...
333 (3.5, 7.8)
. ...
However, I do not know how to obtain the indexes in outputs. Anyone here can
help me with this? I will appreciate your kind help. Below is how I obtain
the output points.
First, use the constructor
Alpha_shape_2 A(input.begin(), input.end(), FT(0.0001));
, while "input" is a "list<Point_2>".
The output I can obtain from "A" is a bunch of points, by using the
iterators (I know I can also get a bunch of "Segment_2 as outputs as well"),
like this
for(Alpha_shape_vertices_iterator it = A.alpha_shape_vertices_begin();
it != A.alpha_shape_vertices_end();
++it) {
Vertex_handle vh = *it;
Point_2 p(vh->point().x(), vh->point().y());
output.push_back(p);
}
, while "output" is a "vector<Point_2>".
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Alpha-Shape-2D-Input-point-index-tp4659360.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] Alpha Shape 2D: Input point index, morrischen2008, 05/28/2014
- Re: [cgal-discuss] Alpha Shape 2D: Input point index, Sebastien Loriot (GeometryFactory), 05/29/2014
- Re: [cgal-discuss] Alpha Shape 2D: Input point index, morrischen2008, 05/30/2014
- Re: [cgal-discuss] Alpha Shape 2D: Input point index, Sebastien Loriot (GeometryFactory), 05/29/2014
Archive powered by MHonArc 2.6.18.