Skip to Content.
Sympa Menu

cgal-discuss - Re: Re: [cgal-discuss] Constraint Triangulation Face Base with info?

Subject: CGAL users discussion list

List archive

Re: Re: [cgal-discuss] Constraint Triangulation Face Base with info?


Chronological Thread 
  • From: <>
  • To:
  • Subject: Re: Re: [cgal-discuss] Constraint Triangulation Face Base with info?
  • Date: Sun, 12 Apr 2009 18:05:01 +0200 (CEST)

Hi, Everyone.

I'm a CGAL's beginner too. I implementing some mesh generating algorithms
(From 2D triangulaion to 3D mesh) recently. This problem confuse me for long
time too. Finally I found some answer in example in
[CGAL\examples\Triangulation_2]constrained.cpp and colored_face.cpp, and I
rewrote some concept for my purpose.
Following is my sample, help this will be helpful.
If there is any better solution, welcome to discuss with me. thanks.



eapping.

-------------------------------------------------------------------------
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Constrained_Delaunay_triangulation_2.h>
#include <CGAL/Triangulation_face_base_with_info_2.h>

enum TRIANGLE_TYPE { TERMINAL, SLEEVE , JUNCTION, CLOSED };

typedef struct _EDGE_INFO
{
int Edge_ID;
std::pair <int,int> Edge_Vertex;
CvPoint Edge_Center;
bool Is_Constrained;

} EDGE_INFO;

typedef struct _CDT_FACE_INFO
{
int Ttiangle_ID;
bool Is_Visited;
TRIANGLE_TYPE Triangle_Type;
CvPoint Triangle_Vertex[3];
CvPoint Triangle_Center;
LPSTR Label_String;
EDGE_INFO Edge_Info[3];
int Num_Constrained_Edge;
int Non_Constrained_Edge[3];

} CDT_FACE_INFO;

typedef CGAL::Triangulation_vertex_base_2<K> Vb;
typedef CGAL::Constrained_triangulation_face_base_2<K> Fb_Base;
typedef CGAL::Triangulation_face_base_with_info_2<CDT_FACE_INFO,K,Fb_Base> Fb;
typedef CGAL::Exact_predicates_tag Itag;
typedef CGAL::Constrained_Delaunay_triangulation_2<K, TDS, Itag> CDT;
-------------------------------------------------------------------------



Archive powered by MHonArc 2.6.16.

Top of Page