Subject: CGAL users discussion list
List archive
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] Re: Infinite vertex in Triangulations
- Date: Tue, 30 Aug 2011 08:33:52 +0200
I don't know how you get these numbers but they are incorrect.
The program joint indicates 8 finite vertices, 34 facets (16 are
finite) and 17 cells (5 are finite).
Sebastien.
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Triangulation_3.h>
#include <iostream>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Triangulation_3<K> T3;
int main(){
T3 t;
t.insert(K::Point_3(0,0,0));
t.insert(K::Point_3(1,0,0));
t.insert(K::Point_3(0,1,0));
t.insert(K::Point_3(0,0,1));
t.insert(K::Point_3(2,0,0));
t.insert(K::Point_3(3,0,0));
t.insert(K::Point_3(2,1,0));
t.insert(K::Point_3(2,0,1));
std::cout << "V" << t.number_of_vertices() << std::endl;
std::cout << "F" << t.number_of_facets() << std::endl;
std::cout << "C" << t.number_of_cells() << std::endl;
std::list<T3::Cell_handle> icells;
t.incident_cells(t.infinite_vertex(),std::back_inserter(icells));
std::cout << "IIV" << icells.size() << std::endl;
}
On 08/10/2011 06:49 PM, henrikz wrote:
Hello,
I have also come across a peculiarity regarding the infinite_vertex, which I
am hoping you might be able to clear up for me.
Similar to the other posts, in my case it seems that not all connected
components of a Tetmesh are connected with the infinite vertex.
I create my Tetmesh using the incremental builder (for details see below),
as a simple example I created 2 Tets which are simply translates of
eachother:
Vertices
8
0 0 0 0
1 0 0 0
0 1 0 0
0 0 1 0
2 0 0 0
3 0 0 0
2 1 0 0
2 0 1 0
Tetrahedra
2
1 2 3 4
5 6 7 8
now the outputting the number of elements yield the following:
#vertices: 8
#edges : 20
#faces : 20
#cells : 10
while the number of vertices seems ok, the rest seems odd!?
Furthermore, outputting the number of /incident_cells/ to the
/infinite_vertex/ yields:
#cells incident to inf vertex = 4
The "problem" occurred to me when trying to visualize the outer surface
mesh(es) (of a multi-component tetmesh) using incidence with the infinite
vertex...
Can someone please tell me if this is the wanted functionality and/or if I
am simply using the Triangulation/Builder wrong?
Many thanks,
Henrik
The used data structure:
/typedef CGAL::Exact_predicates_inexact_constructions_kernel TM_K;
typedef TVB_with_index<TM_K> TM_VB;
typedef TCB_with_index<TM_K> TM_CB;
typedef CGAL::Triangulation_data_structure_3< TM_VB, TM_CB> TM_TDS;
typedef CGAL::Triangulation_3<TM_K, TM_TDS>
TetMeshT3;
typedef Triangulation_3_with_indices<TetMeshT3> TetMeshCGAL;
typedef CGAL::Triangulation_incremental_builder_3<TetMeshCGAL>
TetMeshCGALIncrementalBuilder;/
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Infinite-vertex-in-Triangulations-tp1015702p3733540.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] Re: Infinite vertex in Triangulations, henrikz, 08/10/2011
- Re: [cgal-discuss] Re: Infinite vertex in Triangulations, Olivier Devillers, 08/11/2011
- [cgal-discuss] Re: Infinite vertex in Triangulations, henrikz, 08/15/2011
- Re: [cgal-discuss] Re: Infinite vertex in Triangulations, Monique Teillaud, 08/16/2011
- Re: [cgal-discuss] Re: Infinite vertex in Triangulations, Olivier Devillers, 08/20/2011
- [cgal-discuss] Re: Infinite vertex in Triangulations, henrikz, 08/15/2011
- Re: [cgal-discuss] Re: Infinite vertex in Triangulations, Sebastien Loriot (GeometryFactory), 08/30/2011
- Re: [cgal-discuss] Re: Infinite vertex in Triangulations, Olivier Devillers, 08/11/2011
Archive powered by MHonArc 2.6.16.