Subject: CGAL users discussion list
List archive
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] Regular Triangulation : infinite faces
- Date: Mon, 01 Oct 2012 08:57:08 +0200
- Organization: GeometryFactory
You can use the is_infinite triangulation member function to check is a cell is infinite.
The range [t.finite_cells_begin(),t.finite_cells_end ()] contains finite cells.
You can get all infinite cells using:
t.incident_cells ( t.infinite_vertex(), cell_output_iterator);
All these functions are documented on that page:
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Triangulation_3_ref/Class_Triangulation_3.html
Sebastien.
On 09/30/2012 05:16 PM, David Arken wrote:
With the following typedefs:
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Regular_triangulation_euclidean_traits_3<K> Traits;
typedef Traits::RT rWeight;
typedef Traits::Bare_point rPoint;
typedef Traits::Weighted_point rWeighted_point;
typedef CGAL::Regular_triangulation_3<Traits> Rt;
When I create a regular triangulation by insertion of points
(.insert( point_list.begin(), point_list.end()) and then output the
triangulation using "<<" to a std::ofstream, I see a extra vertex
index in the cells. The points seem to be the input points. So if I
filter all the tetrahedrons with this extra index, I was hoping to get
the finite cells, but that does not seem to work.
.number_of_finite_cells = 130949
.number_of_cells = 140303
I read the output of "<<" and I get 140303 tetrahedrons (as expected).
Now I remove all tetrahedrons where there is this extra vertex and I
only get 140281 tetrahedrons. Why this anomaly? What am I missing?
A shorter version of my question: What is exactly the definition of
infinite cells for a regular triangulation? Given all cells, how can i
tell a cell is inifinite?
Also: How do i enumerate the finite cells:
(the following code gives compilation errors)
for( Finite_cells_iterator cit = rt.finite_cells_begin();
cit != rt.finite_cells_end();
++cit)
{
for (int i=0; i<4; i++)
oFileT<< cit->vertex(i)<< " ";
// This does not work either: --> oFileT<< *cit;
oFileT<< std::endl;
}
Thanks,
--Ram
- Re: [cgal-discuss] Regular Triangulation : infinite faces, Sebastien Loriot (GeometryFactory), 10/01/2012
Archive powered by MHonArc 2.6.18.