CGAL 6.0.1 - CGAL and the Boost Graph Library
Loading...
Searching...
No Matches

I/O Functions for the GOCAD (TS) File Format.

Functions

template<typename Graph , typename NamedParameters = CGAL::parameters::Default_named_parameters>
bool CGAL::IO::read_GOCAD (std::istream &is, std::pair< std::string, std::string > &name_and_color, Graph &g, const NamedParameters &np=parameters::default_values())
 reads the graph g from the input stream, using the GOCAD (TS) File Format.
 
template<typename Graph , typename NamedParameters = CGAL::parameters::Default_named_parameters>
bool CGAL::IO::read_GOCAD (const std::string &fname, std::pair< std::string, std::string > &name_and_color, Graph &g, const NamedParameters &np=parameters::default_values())
 reads the graph g from the file fname, using the GOCAD (TS) File Format.
 
template<typename Graph , typename NamedParameters = CGAL::parameters::Default_named_parameters>
bool CGAL::IO::write_GOCAD (std::ostream &os, const char *name, const Graph &g, const NamedParameters &np=parameters::default_values())
 writes the graph g into the output stream os, using the GOCAD (TS) File Format.
 
template<typename Graph , typename NamedParameters = CGAL::parameters::Default_named_parameters>
bool CGAL::IO::write_GOCAD (std::ostream &os, const Graph &g, const NamedParameters &np=parameters::default_values())
 writes the graph g in the GOCAD (TS) File Format into os.
 
template<typename Graph , typename NamedParameters = CGAL::parameters::Default_named_parameters>
bool CGAL::IO::write_GOCAD (const std::string &fname, const Graph &g, const NamedParameters &np=parameters::default_values())
 writes the graph g into a file named fname, using the GOCAD (TS) File Format.
 

Function Documentation

◆ read_GOCAD() [1/2]

template<typename Graph , typename NamedParameters = CGAL::parameters::Default_named_parameters>
bool CGAL::IO::read_GOCAD ( const std::string &  fname,
std::pair< std::string, std::string > &  name_and_color,
Graph &  g,
const NamedParameters &  np = parameters::default_values() 
)

#include <CGAL/boost/graph/IO/GOCAD.h>

reads the graph g from the file fname, using the GOCAD (TS) File Format.

The data is expected to represent a 2-manifold (possibly with borders).

Attention
The graph g is not cleared, and the data from the file are appended.
Template Parameters
Grapha model of MutableFaceGraph
NamedParametersa sequence of Named Parameters
Parameters
fnamethe name of the input file
name_and_colorname and color of the mesh
gthe graph to be built from the input data
npoptional Named Parameters described below
Optional Named Parameters
  • a property map associating points to the vertices of g
  • Type: a class model of WritablePropertyMap with boost::graph_traits<Graph>::vertex_descriptor as key type and Point_3 as value type
  • Default: boost::get(CGAL::vertex_point, g)
  • Extra: If this parameter is omitted, an internal property map for CGAL::vertex_point_t must be available in Graph.

  • whether extra information is printed when an incident occurs during reading
  • Type: Boolean
  • Default: false
See also
Overloads of this function for specific models of the concept FaceGraph.
Returns
true if reading was successful and the resulting mesh is valid, false otherwise.

◆ read_GOCAD() [2/2]

template<typename Graph , typename NamedParameters = CGAL::parameters::Default_named_parameters>
bool CGAL::IO::read_GOCAD ( std::istream &  is,
std::pair< std::string, std::string > &  name_and_color,
Graph &  g,
const NamedParameters &  np = parameters::default_values() 
)

#include <CGAL/boost/graph/IO/GOCAD.h>

reads the graph g from the input stream, using the GOCAD (TS) File Format.

The data is expected to represent a 2-manifold (possibly with borders).

Attention
The graph g is not cleared, and the data from the stream are appended.
Template Parameters
Grapha model of MutableFaceGraph
NamedParametersa sequence of Named Parameters
Parameters
isthe input stream
name_and_colorname and color of the mesh
gthe graph to be built from the input data
npoptional Named Parameters described below
Optional Named Parameters
  • a property map associating points to the vertices of g
  • Type: a class model of WritablePropertyMap with boost::graph_traits<Graph>::vertex_descriptor as key type and Point_3 as value type
  • Default: boost::get(CGAL::vertex_point, g)
  • Extra: If this parameter is omitted, an internal property map for CGAL::vertex_point_t must be available in Graph.

  • whether extra information is printed when an incident occurs during reading
  • Type: Boolean
  • Default: false
Returns
true if reading was successful and the resulting mesh is valid, false otherwise.

◆ write_GOCAD() [1/3]

template<typename Graph , typename NamedParameters = CGAL::parameters::Default_named_parameters>
bool CGAL::IO::write_GOCAD ( const std::string &  fname,
const Graph &  g,
const NamedParameters &  np = parameters::default_values() 
)

#include <CGAL/boost/graph/IO/GOCAD.h>

writes the graph g into a file named fname, using the GOCAD (TS) File Format.

In this overload, fname is used as the name of the graph within the file.

Template Parameters
Grapha model of FaceListGraph
NamedParametersa sequence of Named Parameters
Parameters
fnamethe name of the output file
gthe graph to be written
npoptional Named Parameters described below
Optional Named Parameters
  • a property map associating points to the vertices of g
  • Type: a class model of ReadablePropertyMap with boost::graph_traits<Graph>::vertex_descriptor as key type and Point_3 as value type
  • Default: boost::get(CGAL::vertex_point, g)
  • Extra: If this parameter is omitted, an internal property map for CGAL::vertex_point_t must be available in Graph.

  • a parameter used to set the precision (i.e. how many digits are generated) of the output stream
  • Type: int
  • Default: 6
See also
Overloads of this function for specific models of the concept FaceGraph.

◆ write_GOCAD() [2/3]

template<typename Graph , typename NamedParameters = CGAL::parameters::Default_named_parameters>
bool CGAL::IO::write_GOCAD ( std::ostream &  os,
const char *  name,
const Graph &  g,
const NamedParameters &  np = parameters::default_values() 
)

#include <CGAL/boost/graph/IO/GOCAD.h>

writes the graph g into the output stream os, using the GOCAD (TS) File Format.

Template Parameters
Grapha model of FaceListGraph
NamedParametersa sequence of Named Parameters
Parameters
osthe output stream
namethe name that will be assigned to g in the output file
gthe graph to be written
npoptional Named Parameters described below
Optional Named Parameters
  • a property map associating points to the vertices of g
  • Type: a class model of ReadablePropertyMap with boost::graph_traits<Graph>::vertex_descriptor as key type and Point_3 as value type
  • Default: boost::get(CGAL::vertex_point, g)
  • Extra: If this parameter is omitted, an internal property map for CGAL::vertex_point_t must be available in Graph.

  • 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 writing was successful, false otherwise.

◆ write_GOCAD() [3/3]

template<typename Graph , typename NamedParameters = CGAL::parameters::Default_named_parameters>
bool CGAL::IO::write_GOCAD ( std::ostream &  os,
const Graph &  g,
const NamedParameters &  np = parameters::default_values() 
)

#include <CGAL/boost/graph/IO/GOCAD.h>

writes the graph g in the GOCAD (TS) File Format into os.

The name assigned to gin the output is anonymous.

Template Parameters
Grapha model of FaceListGraph
NamedParametersa sequence of Named Parameters
Parameters
osthe output stream
gthe graph to be written
npoptional Named Parameters described below
Optional Named Parameters
  • a property map associating points to the vertices of g
  • Type: a class model of ReadablePropertyMap with boost::graph_traits<Graph>::vertex_descriptor as key type and Point_3 as value type
  • Default: boost::get(CGAL::vertex_point, g)
  • Extra: If this parameter is omitted, an internal property map for CGAL::vertex_point_t must be available in Graph.

  • 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 writing was successful, false otherwise.