SFCGAL  2.2.0
Namespaces | Functions
Input/output tools

Namespaces

 SFCGAL::io
 Main Input/output namespace.
 
 SFCGAL::io::OBJ
 OBJ file format tools.
 
 SFCGAL::io::VKT
 VKT file format tools.
 

Functions

auto SFCGAL::io::STL::save (const Geometry &geom, std::ostream &out) -> void
 Saves a geometry to an STL format stream. More...
 
auto SFCGAL::io::STL::save (const Geometry &geom, const std::string &filename) -> void
 Saves a geometry to an STL file. More...
 
auto SFCGAL::io::STL::saveToString (const Geometry &geom) -> std::string
 Saves a geometry to an STL format string. More...
 
auto SFCGAL::io::STL::saveToBuffer (const Geometry &geom, char *buffer, size_t *size) -> void
 Saves a geometry to an STL format buffer (C API). More...
 

Detailed Description

Function Documentation

SFCGAL_API auto SFCGAL::io::STL::save ( const Geometry &  geom,
std::ostream &  out 
) -> void

Saves a geometry to an STL format stream.

Parameters
[in]geomThe geometry to save
[out]outThe output stream
Exceptions
std::runtime_errorIf the geometry is invalid or unsupported
SFCGAL_API auto SFCGAL::io::STL::save ( const Geometry &  geom,
const std::string &  filename 
) -> void

Saves a geometry to an STL file.

Parameters
[in]geomThe geometry to save
[in]filenameThe name of the file to save to
Exceptions
std::runtime_errorIf the file cannot be opened or the geometry is invalid
SFCGAL_API auto SFCGAL::io::STL::saveToBuffer ( const Geometry &  geom,
char *  buffer,
size_t *  size 
) -> void

Saves a geometry to an STL format buffer (C API).

Parameters
[in]geomThe geometry to save
[out]bufferThe buffer to write to
[in,out]sizeOn input, the size of the buffer. On output, the number of bytes written (or required if buffer is null)
Exceptions
std::runtime_errorIf the geometry is invalid or unsupported
SFCGAL_API auto SFCGAL::io::STL::saveToString ( const Geometry &  geom) -> std::string

Saves a geometry to an STL format string.

Parameters
[in]geomThe geometry to save
Returns
The STL format string
Exceptions
std::runtime_errorIf the geometry is invalid or unsupported