Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] 3D Mesh: Medit files become critically large...

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] 3D Mesh: Medit files become critically large...


Chronological Thread 
  • From: Benjamin Kehlet <>
  • To: cgal-discuss <>
  • Subject: Re: [cgal-discuss] 3D Mesh: Medit files become critically large...
  • Date: Thu, 24 Aug 2017 12:08:34 +0200
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:HYbnCBDPJFMJbCIESGBgUyQJP3N1i/DPJgcQr6AfoPdwSP75rsbcNUDSrc9gkEXOFd2Crakb26yL6+jJYi8p39WoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6i760DgJBx+qNRZpPv+nXcnJnsGv3qaz/YfSakNGnn2mcLZqJVK3qwvW8cIZiI8nJqcqwQbSuSh0fLFdympsYF6ShB3h/dz4qJVs+iAVt/M6/NNbSo37eb45RPpWFmJ1HXoy4ZjBuB/BRA6O4DM/X2USnwYAVwLI6hPzW5bymjD7s/d50W+cOpulHvgPRT2+4vIzG1fTgyAdOmth/Q==

Michael, take a look at CGAL/IO/Complex_3_in_triangulation_3_to_vtk.h
If VTK's file format is not a good solution for you, this code is very easy to follow (and very short), so maybe you can adapt it to your needs.

Best regards

Benjamin Kehlet

On 24 August 2017 at 11:41, Michael Bieri <> wrote:
Thanks Laurent for your answer.

Writing the file seems to work, but first of all, the file is even larger than the ASCII medit format. Second, I have no idea about the file format. As far as I see it just writes the internal binary representation into a file? I guess that's not easy to process with a program outside of the CGAL world?

Best regards,
Michael

On Wed, Aug 23, 2017 at 4:49 PM, Laurent Rineau (CGAL/GeometryFactory) <> wrote:
Le Wednesday, August 23, 2017 4:12:48 PM CEST Michael Bieri a écrit :
> Hi all,
>
> I'm generating meshes with up to several million nodes and save them
> with output_to_medit(medit_file) of
> CGAL::Mesh_complex_3_in_triangulation_3<Tr>.
>
> Since data transfer and reading the files is becoming a bit annoying, I
> wonder how I could save the mesh in a data format more suitable for large
> data, probably a binary format. I briefly browsed through the code and
> documentation, but I didn't find anything to write to binary or to write it
> quickly by myself.
>
> Is there an option, or do I need to write that from scratch?

There are undocumented functions in <CGAL/IO/File_binary_mesh_3.h>. I use
them a lot, and should be reliable. Know issue: once you have loaded a c3t3
from a file, all query to `c3t3.is_in_complex(Edge)` will return `false`,
because that piece of information is not saved in the file.

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


--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss







Archive powered by MHonArc 2.6.18.

Top of Page