Subject: CGAL users discussion list
List archive
- From: Laurent Rineau <>
- To:
- Subject: Re: [cgal-discuss] Grey_level_image triangulation to STL file
- Date: Sun, 23 Sep 2007 13:12:11 +0200
- Organization: Inria, Sophia Antipolis, FRANCE
On Sunday 23 September 2007 12:30:29
wrote:
> Hi,
>
> I'm trying to do a grey_level_image triangulation (like described in the
> on-line manual Chapter X) and output the result into a STL file.
[...]
> Here is how I tried to extract the surface triangles:
>
> for ( CGAL::Surface_mesh_default_triangulation_3::Finite_facets_iterator i
> = tr.finite_facets_begin(); i != tr.finite_facets_end(); ++i)
Dead Tobi,
You should read the documentation of the class template
CGAL::Complex_2_in_trianglation_3.
Your loop above could be:
typedef CGAL::Surface_mesh_default_triangulation_3 Tr;
typedef CGAL::Complexe_2_in_triangulation_3<Tr> C2t3;
for (C2t3::Facets_iterator it = c2t3.facets_begin();
it!=c2t3.facets_end(); ++it)
and then "it" will iterate over all facets of the surface. The examples of
the
user manual of Surface_mesher do not show that. It is our fault. We will try
to improve the manual in next releases. The only explanation o the user
manual, about c2t3 is here:
"The template parameter SurfaceMeshC2T3 stands for a data structure type
that is used to store the surface mesh."
It should make you read the reference pages.
> The 3d image triangulation seems to work fine but I just don't get it how
> to extract the mesh faces (with their correct normal vector) to create the
> STL output. I do get something similar to what I expect but a lot of faces
> have inverted normal-vectors. Some faces are completely deteriorated.
Tobi, can you even have a look at an undocumented file, that I personally use
in my applications: <CGAL/IO/Complex_2_in_triangulation_3_file_writer.h>, and
especially the function named "output_surface_facets_to_off", when the macro
CGAL_C2T3_USE_POLYHEDRON is defined. I have not yet documented that
function, because it is not generic enough to be officially part of the CGAL
library, but it outputs a set of *oriented* facets.
Can you please give use feedback, when you reach other problems about
Surface_mesher, or even if it works for your needs? I am writing my Ph.D
dissertation, and I would enjoy positive feedback about that package, that is
part of my thesis. For what sort of software do you need Surface_mesher? Do
you have "attractive" pictures of your application, that I could use in my
thesis? And so on. Thanks in advance.
--
Laurent Rineau (co-author of Surface_mesher, with Mariette Yvinec)
INRIA - Sophia Antipolis
BP 93, 2004 Route des Lucioles
06902 Sophia Antipolis Cedex FRANCE
Tel: +33 4 92 38 78 62 (Fax: +33.4.97.15.53.95)
- Grey_level_image triangulation to STL file, topro, 09/23/2007
- Re: [cgal-discuss] Grey_level_image triangulation to STL file, Laurent Rineau, 09/23/2007
- Re: [cgal-discuss] Grey_level_image triangulation to STL file, Tobias Prousa, 09/23/2007
- Re: [cgal-discuss] Grey_level_image triangulation to STL file, Laurent Rineau, 09/23/2007
- Re: [cgal-discuss] Grey_level_image triangulation to STL file, topro, 09/23/2007
- Re: [cgal-discuss] Grey_level_image triangulation to STL file, Laurent Rineau, 09/23/2007
- Re: [cgal-discuss] Grey_level_image triangulation to STL file, Tobias Prousa, 09/23/2007
- Re: [cgal-discuss] Grey_level_image triangulation to STL file, Laurent Rineau, 09/23/2007
Archive powered by MHonArc 2.6.16.