Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Re: Mesh generation question

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Re: Mesh generation question


Chronological Thread 
  • From: "Laurent Rineau (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Re: Mesh generation question
  • Date: Mon, 23 Jan 2012 17:27:32 +0100
  • Organization: GeometryFactory

Le jeudi 19 janvier 2012 09:30:53 Ram a écrit :
> I extracted the output by creating a .vtk file and visualizing it using vtk.
> The iterator lines are:
>
> Function: template < class GT, class TDS > void
> show_triangulation_edges(std::ofstream &gv, const Triangulation_3<GT,TDS>
> &T)
>
> Iterations:
>
> Vertices: for( typename Triangulation_3<GT, TDS>::Finite_vertices_iterator
> vit = T.finite_vertices_begin(); vit != T.finite_vertices_end(); ++vit)
>
> Tetrahedrons:
>
> for( typename Triangulation_3<GT, TDS>::Finite_cells_iterator
> cit = T.finite_cells_begin(); cit != T.finite_cells_end(); ++cit)
>
> The call to function is done here:
>
>
> // Triangulation access
> MyTriangulation T = c3t3.triangulation();
> std::ofstream myfile;
> myfile.open("example.vtk");
> CGAL::show_triangulation_edges(myfile, T);
> myfile.close();
>
> Wired things happen when I visualize the output. One problem is skinny
> triangles. The other problem I've seen is when I mesh a cube, some faces
> have small triangles, but others have very large triangles.
>
> With some mesh criterion, I do see graded meshes all around.

You outputs all the cells of the triangulation. Instead, you should output
only the cells of the c3t3:

for(typename C3t3::Cells_in_complex_iterator
cit = c3t3.cells_in_complex_begin();
cit != cells_in_complex_end(); ++cit)
...


--
Laurent Rineau, PhD
R&D Engineer at GeometryFactory http://www.geometryfactory.com/
Release Manager of the CGAL Project http://www.cgal.org/




Archive powered by MHonArc 2.6.16.

Top of Page