Mesh::Exporter Class Referenceabstract

Virtual base class for exporting meshes. More...

#include <Exporter.h>

Public Member Functions

virtual bool addMesh (const char *name, const MeshObject &mesh)=0
 
int addObject (App::DocumentObject *obj, float tol)
 Add object and all subobjects and links etc. Returns the number of stuff added. More...
 
 Exporter ()
 
virtual ~Exporter ()=default
 

Static Protected Member Functions

static std::string xmlEscape (const std::string &input)
 Does some simple escaping of characters for XML-type exports. More...
 

Protected Attributes

std::map< const App::DocumentObject *, MeshObjectmeshCache
 
std::map< const App::DocumentObject *, std::vector< std::string > > subObjectNameCache
 

Detailed Description

Virtual base class for exporting meshes.

Constructors of derived classes are expected to be required, for passing in the name of output file.

If objects are meant to be combined into a single file, then the file should be saved from the derived class' destructor.

Constructor & Destructor Documentation

◆ Exporter()

Exporter::Exporter ( )

◆ ~Exporter()

virtual Mesh::Exporter::~Exporter ( )
virtualdefault

Member Function Documentation

◆ addMesh()

virtual bool Mesh::Exporter::addMesh ( const char *  name,
const MeshObject mesh 
)
pure virtual

◆ addObject()

int Exporter::addObject ( App::DocumentObject obj,
float  tol 
)

Add object and all subobjects and links etc. Returns the number of stuff added.

Parameters
objThe object to export. If this is a group like object, its sub-objects will be added.
tolThe tolerance/accuracy with which to generate the triangle mesh
Returns
The number of objects/subobjects that was exported from the document. See the parameter accuracy of ComplexGeoData::getFaces

References addMesh(), Base::Persistence::getClassTypeId(), meshCache, and subObjectNameCache.

Referenced by ArchBuildingPart.BuildingPart::autogroup(), ArchPanel.NestTaskPanel::getContainer(), and ArchPanel.NestTaskPanel::getShapes().

◆ xmlEscape()

std::string Exporter::xmlEscape ( const std::string &  input)
staticprotected

Does some simple escaping of characters for XML-type exports.

Referenced by Mesh::AmfExporter::addMesh().

Member Data Documentation

◆ meshCache

std::map<const App::DocumentObject *, MeshObject> Mesh::Exporter::meshCache
protected

Referenced by addObject().

◆ subObjectNameCache

std::map<const App::DocumentObject *, std::vector<std::string> > Mesh::Exporter::subObjectNameCache
protected

Referenced by addObject().


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