I/O Functions for the GOCAD (TS) File Format .
template<typename PointRange , typename PolygonRange , typename CGAL_BGL_NP_TEMPLATE_PARAMETERS >
bool CGAL::IO::read_GOCAD (const std::string &fname, PointRange &points, PolygonRange &polygons, const CGAL_BGL_NP_CLASS &np)
reads the content of the file fname
into points
and polygons
, using the GOCAD (TS) File Format . More...
template<typename PointRange , typename PolygonRange , typename CGAL_BGL_NP_TEMPLATE_PARAMETERS >
bool CGAL::IO::write_GOCAD (std::ostream &os, const PointRange &points, const PolygonRange &polygons, const CGAL_BGL_NP_CLASS &np)
writes the content of points
and polygons
in os
, using the GOCAD (TS) File Format . More...
template<typename PointRange , typename PolygonRange , typename CGAL_BGL_NP_TEMPLATE_PARAMETERS >
bool CGAL::IO::write_GOCAD (const std::string &fname, const PointRange &points, const PolygonRange &polygons, const CGAL_BGL_NP_CLASS &np)
writes the content of points
and polygons
in fname
, using the GOCAD (TS) File Format . More...
◆ read_GOCAD()
template<typename PointRange , typename PolygonRange , typename CGAL_BGL_NP_TEMPLATE_PARAMETERS >
bool CGAL::IO::read_GOCAD
(
const std::string &
fname ,
PointRange &
points ,
PolygonRange &
polygons ,
const CGAL_BGL_NP_CLASS &
np
)
#include <CGAL/IO/GOCAD.h>
reads the content of the file fname
into points
and polygons
, using the GOCAD (TS) File Format .
Attention The polygon soup is not cleared, and the data from the file are appended.
Template Parameters
Parameters
fname the path to the input file
points points of the soup of polygons
polygons a range of polygons. Each element in it describes a polygon using the indices of the points in points
.
np optional Named Parameters described below
Optional Named Parameters
verbose
indicates whether output warnings and error messages should be printed or not.
Type: Boolean
Default: false
Returns true
if the reading was successful, false
otherwise.
◆ write_GOCAD() [1/2]
template<typename PointRange , typename PolygonRange , typename CGAL_BGL_NP_TEMPLATE_PARAMETERS >
bool CGAL::IO::write_GOCAD
(
std::ostream &
os ,
const PointRange &
points ,
const PolygonRange &
polygons ,
const CGAL_BGL_NP_CLASS &
np
)
#include <CGAL/IO/GOCAD.h>
writes the content of points
and polygons
in os
, using the GOCAD (TS) File Format .
Template Parameters
Parameters
os the output stream
points points of the soup of polygons
polygons a range of polygons. Each element in it describes a polygon using the indices of the points in points
.
np optional sequence of Named Parameters among the ones listed below
Optional Named Parameters
stream_precision
a parameter used to set the precision (i.e. how many digits are generated) of the output stream
Type: int
Default: the precision of the stream os
Returns true
if the writing was successful, false
otherwise.
◆ write_GOCAD() [2/2]
template<typename PointRange , typename PolygonRange , typename CGAL_BGL_NP_TEMPLATE_PARAMETERS >
bool CGAL::IO::write_GOCAD
(
const std::string &
fname ,
const PointRange &
points ,
const PolygonRange &
polygons ,
const CGAL_BGL_NP_CLASS &
np
)
#include <CGAL/IO/GOCAD.h>
writes the content of points
and polygons
in fname
, using the GOCAD (TS) File Format .
Template Parameters
Parameters
fname the path to the output file
points points of the soup of polygons
polygons a range of polygons. Each element in it describes a polygon using the indices of the points in points
.
np optional sequence of Named Parameters among the ones listed below
Optional Named Parameters
stream_precision
a parameter used to set the precision (i.e. how many digits are generated) of the output stream
Type: int
Default: 6
Returns true
if the writing was successful, false
otherwise.