Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Alpha Shape 2 - No Edge Detection

Subject: CGAL users discussion list

List archive

[cgal-discuss] Alpha Shape 2 - No Edge Detection


Chronological Thread 
  • From: Michael Jeulin-L <>
  • To:
  • Subject: [cgal-discuss] Alpha Shape 2 - No Edge Detection
  • Date: Mon, 2 Nov 2009 16:01:52 +0100 (CET)

Hi,

Sorry to disturb you, but I have a problem with the package Alpha Shape 2.
The triangulation is working fine, but I don`t succeed to extract the shapes
from Alpha_Shape. The number of shapes stay always at 0 whatever the value of
alpha.

So my soft never go into this loop :

for (Alpha_Shape_Edges_Iterator
edge_alpha_it=_alphaShape.alpha_shape_edges_begin();
edge_alpha_it!=_alphaShape.alpha_shape_edges_end(); edge_alpha_it++)
a++;

Here is the CGAL typedef that i use :

typedef CGAL::Triangulation_euclidean_traits_xy_3<K> Gt;
typedef CGAL::Delaunay_triangulation_2<Gt> Delaunay;

typedef Delaunay::Vertex Vertex;
typedef Delaunay::Face Face;
typedef Delaunay::Face_handle Face_handle;
typedef Delaunay::Point_iterator Point_iterator;
typedef Delaunay::Vertex_circulator Vertex_circulator;
typedef Delaunay::Edge_iterator Edge_iterator;
typedef std::pair<Face_handle,int> Edge;
typedef Delaunay::Face_iterator Face_iterator;


typedef CGAL::Alpha_shape_vertex_base_2<K> Vb;
typedef CGAL::Alpha_shape_face_base_2<K> Fb;
typedef CGAL::Triangulation_data_structure_2<Vb,Fb> Tds;
typedef CGAL::Delaunay_triangulation_2<K,Tds> Triangulation_2;
typedef CGAL::Alpha_shape_2<Triangulation_2> Alpha_Shape;

//Alpha shape and the types
typedef Alpha_Shape::Face Alpha_Face;
typedef Alpha_Shape::Vertex Alpha_Vertex;
typedef Alpha_Shape::Edge Alpha_Edge;
typedef Alpha_Shape::Face_handle Alpha_Face_Handle;
typedef Alpha_Shape::Vertex_handle Alpha_Vertex_Handle;
typedef Alpha_Shape::Face_circulator Alpha_Face_Circulator;
typedef Alpha_Shape::Vertex_circulator Alpha_Vertex_Circulator;
typedef Alpha_Shape::Locate_type Alpha_Locate_Type;
typedef Alpha_Shape::Face_iterator Alpha_Face_Iterator;
typedef Alpha_Shape::Vertex_iterator Alpha_Vertex_Iterator;
typedef Alpha_Shape::Edge_iterator Alpha_Edge_Iterator;
typedef Alpha_Shape::Edge_circulator Alpha_Edge_Circulator;
typedef Alpha_Shape::Alpha_iterator Alpha_Iterator;
typedef Alpha_Shape::Alpha_shape_edges_iterator Alpha_Shape_Edges_Iterator;

And here is my computation :

void XX::calculateShapes(double alpha)
{
_alphaShape.set_alpha(alpha);
_alphaShape.make_alpha_shape(_points2d.begin(), _points2d.end());

//cout << "calculate shape with alpha " << alpha << endl;
//cout << "Number Of alpha " << _alphaShape.number_of_alphas() << endl;
}

I would be very grateful if someone have an idea of the problem and could help
me.

Regards.



Archive powered by MHonArc 2.6.16.

Top of Page