Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] 3D regular triangulation output cell indices from finite facets

Subject: CGAL users discussion list

List archive

[cgal-discuss] 3D regular triangulation output cell indices from finite facets


Chronological Thread 
  • From: zyang <>
  • To:
  • Subject: [cgal-discuss] 3D regular triangulation output cell indices from finite facets
  • Date: Wed, 9 Sep 2015 15:02:59 -0700 (PDT)
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=SoftFail ; spf=None
  • Ironport-phdr: 9a23:3qEe/RGkZR+JGeGZbY1F0J1GYnF86YWxBRYc798ds5kLTJ75o8qwAkXT6L1XgUPTWs2DsrQf27aQ6v2rADRIyK3CmU5BWaQEbwUCh8QSkl5oK+++Imq/EsTXaTcnFt9JTl5v8iLzG0FUHMHjew+a+SXqvnYsExnyfTB4Ov7yUtaLyZ/ni6brptaKO01hv3mUX/BbFF2OtwLft80b08NJC50a7V/3mEZOYPlc3mhyJFiezF7W78a0+4N/oWwL46pyv/hpCvurOv1gBfwDVGxnYCgJ45jguhDHCAeO/XABSX4+kxxSAgGD4gupcI32t37op+N712HOLMTwQqI0Uxyt6q5qTFnjjyJRZG1xy33elsEl1fETmxmmvREqmNaMbQ==

Hi friends,

I am new to CGAL and would really appreciate some help with 3D regular
triangulation -- to get output of cell indices from finite facets.

I have a test problem with five weighted points (with equal weights 1)
5
2 2 0 1
0 0 0 1
1 1 1.41421 1
2 0 0 1
0 2 0 1

I insert them one at a time to the triangulation, like this:
Point p(x,y,z);
Weight w = wt;
P.push_back(Weighted_point(p, w));
Traits::Weighted_point wp= Weighted_point(p, w);
Vertex_handle v = T.insert(wp);
v->info()= i+1;

Now I want to output the indices of the two cells sharing each finite facet.
Here is what I did to get the vertices of each facet. (took from an earlier
post)
int nff = 0, k1;
for(Rt::Finite_facets_iterator fit = T.finite_facets_begin();
fit != T.finite_facets_end(); ++fit) {
nff++;
for(k1=1;k1<=3;k1++) {
std::cout << nff << ' ' << fit->first->vertex(
(fit->second+k1)%4
)->info() << ' ' ;
}
std::cout << std::endl;
}

The problem is how to get the two cell indices from each facet.

Could someone help me with this?
Thanks in advance,
Zhibing







--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/3D-regular-triangulation-output-cell-indices-from-finite-facets-tp4661135.html
Sent from the cgal-discuss mailing list archive at Nabble.com.



Archive powered by MHonArc 2.6.18.

Top of Page