SFCGAL  2.3.0
Functions
SFCGAL::io::STL Namespace Reference

Functions

auto normalizeZeroString (const std::string &str) -> std::string
 
template<typename T >
auto normalizeKernelValue (const T &value) -> std::string
 
auto save (const Geometry &geom, std::ostream &out) -> void
 Saves a geometry to an STL format stream. More...
 
auto save (const Geometry &geom, const std::string &filename) -> void
 Saves a geometry to an STL file. More...
 
auto saveToString (const Geometry &geom) -> std::string
 Saves a geometry to an STL format string. More...
 
auto saveToBuffer (const Geometry &geom, char *buffer, size_t *size) -> void
 Saves a geometry to an STL format buffer (C API). More...
 

Function Documentation

template<typename T >
auto SFCGAL::io::STL::normalizeKernelValue ( const T &  value) -> std::string
auto SFCGAL::io::STL::normalizeZeroString ( const std::string &  str) -> std::string
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