RobWorkProject  23.9.11-
Public Member Functions | Static Public Member Functions | List of all members
STLFile Class Reference

static methods for reading and writing geometry to and from STL files. More...

#include <STLFile.hpp>

Public Member Functions

std::vector< std::string > getModelFormats ()
 get the list of supported 3D model formats (as extensions) More...
 
bool isSupported (std::string format)
 Check if the loader support a specific format. More...
 

Static Public Member Functions

static void save (const rw::geometry::TriMesh &mesh, const std::string &filename)
 creates a new ASCII STL file with path+name given by filename. The face data is taken from a TriMesh interface. More...
 
static void save (const rw::core::Ptr< rw::geometry::TriMesh > &mesh, const std::string &filename)
 creates a new ASCII STL file with path+name given by filename. The face data is taken from a TriMesh interface. More...
 
static rw::geometry::PlainTriMeshN1F::Ptr load (const std::string &filename)
 reads a STL file with name filename into a plain triangle mesh. More...
 

Detailed Description

static methods for reading and writing geometry to and from STL files.

Member Function Documentation

◆ getModelFormats()

std::vector<std::string> getModelFormats ( )
inline

get the list of supported 3D model formats (as extensions)

Returns

◆ isSupported()

bool isSupported ( std::string  format)

Check if the loader support a specific format.

Parameters
format[in] the extension to check if is supported
Returns
true if format is supported

◆ load()

static rw::geometry::PlainTriMeshN1F::Ptr load ( const std::string &  filename)
static

reads a STL file with name filename into a plain triangle mesh.

Parameters
filename[in] the name of the file
Returns
triangle mesh if successfull, NULL otherwise.

◆ save() [1/2]

static void save ( const rw::core::Ptr< rw::geometry::TriMesh > &  mesh,
const std::string &  filename 
)
static

creates a new ASCII STL file with path+name given by filename. The face data is taken from a TriMesh interface.

Parameters
mesh[in] the mesh that should be written to the STL file.
filename[in] the name of the file for which to write to.

◆ save() [2/2]

static void save ( const rw::geometry::TriMesh mesh,
const std::string &  filename 
)
static

creates a new ASCII STL file with path+name given by filename. The face data is taken from a TriMesh interface.

Parameters
mesh[in] the mesh that should be written to the STL file.
filename[in] the name of the file for which to write to.

The documentation for this class was generated from the following file: