Document cmap read/write; and lcc read/write vtk

This commit is contained in:
Guillaume Damiand 2025-10-10 09:55:12 +02:00
parent ce1c890cb0
commit e1ec2fd1d2
5 changed files with 29 additions and 5 deletions

View File

@ -1068,8 +1068,18 @@ If \link GenericMap::are_attributes_automatically_managed `are_attributes_automa
template <unsigned int i>
size_type remove_cell(Dart_descriptor d);
/*!
\ingroup PkgCombinatorialMapsRefIO
Writes `amap` in `os`, using our own internal file format in XML. Writes both the topology of the combinatorial map and its enabled attributes.
*/
friend std::ostream& operator<< (std::ostream& os, const GenericMap& amap);
/*!
\ingroup PkgCombinatorialMapsRefIO
Reads `amap` from `is`, using our own internal file format in XML. Reads both the topology of the combinatorial map and its enabled attributes which are present in `is`. Note that if `amap` is not empty before the reading, the new map is added in the previous one.
*/
friend std::ifstream& operator>> (std::ifstream& is, GenericMap& amap);
/// @}
}; /* end GenericMap */

View File

@ -6,6 +6,9 @@
/// \defgroup PkgCombinatorialMapsClasses Classes
/// \ingroup PkgCombinatorialMapsRef
/// \defgroup PkgCombinatorialMapsRefIO IO Functions for CMap
/// \ingroup PkgCombinatorialMapsRef
/*!
\addtogroup PkgCombinatorialMapsRef
\cgalPkgDescriptionBegin{Combinatorial Maps,PkgCombinatorialMaps}
@ -36,5 +39,9 @@
- `CGAL::Cell_attribute_with_id<CMap,Info_,Tag,OnMerge,OnSplit>`
- `CGAL::Generic_map_min_items`
\cgalCRPSubsection{IO Functions for CMap}
- \link PkgCombinatorialMapsRefIO `std::ostream& operator<< (std::ostream& os, const GenericMap& amap)` \endlink
- \link PkgCombinatorialMapsRefIO `std::ifstream& operator>> (std::ifstream& is, GenericMap& amap)` \endlink
*/

View File

@ -291,10 +291,15 @@ Result of the run of the linear_cell_complex_3_insert program. A window shows th
\subsection Linear_cell_complexWriteVTK Write a Linear Cell Complex in a VTK File
\anchor ssecLCCWriteVtK
This example loads a 3D linear cell complex from a `.3map` file using \cgal function `CGAL::load_combinatorial_map()`. It computes for each 3-cell (volume) the number of incident vertices (0-cells), stores these values in a `std::vector<std::size_t>`, and writes the result to a `.vtk` file with `CGAL::IO::write_VTK()`, using the computed values as scalars for each volume.
This example loads a 3D linear cell complex from a `.3map` file (using the `operator>>`). It computes for each 3-cell (volume) the number of incident vertices (0-cells), stores these values in a `std::vector<std::size_t>`, and writes the result to a `.vtk` file with `CGAL::IO::write_VTK()`, using the computed values as scalars for each volume.
\cgalExample{Linear_cell_complex/linear_cell_complex_3_vtk_io.cpp}
\cgalFigureBegin{fig_lcc_export_vtk,lcc-export-vtk.png}
Visualization of the VTK file generated by the linear_cell_complex_3_vtk_io program, using Paraview. Each volume is colored depending on its number of vertices.
\cgalFigureEnd
\section Linear_cell_complexDesign Design and Implementation History
This package was developed by Guillaume Damiand, with the help of Andreas Fabri, S&eacute;bastien Loriot and Laurent Rineau. Monique Teillaud and Bernd G&auml;rtner contributed to the manual.

View File

@ -83,7 +83,9 @@
- \link PkgDrawLinearCellComplex CGAL::add_in_graphics_scene<LCC, BufferType, DrawingFunctor>() \endlink
\cgalCRPSubsection{IO Functions for LCC}
- `CGAL::IO::Read_VTK<LCC>()`
- `CGAL::IO::Write_VTK<LCC>()`
- \link PkgCombinatorialMapsRefIO `std::ostream& operator<< (std::ostream& os, const GenericMap& amap)` \endlink
- \link PkgCombinatorialMapsRefIO `std::ifstream& operator>> (std::ifstream& is, GenericMap& amap)` \endlink
- \link PkgLinearCellComplexRefIOVTK `CGAL::IO::Read_VTK<LCC>()` \endlink
- \link PkgLinearCellComplexRefIOVTK `CGAL::IO::Write_VTK<LCC>()` \endlink
*/

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB