Virtual base class for exporting meshes. More...

#include <Exporter.h>

Public Member Functions

bool addAppGroup (App::DocumentObject *obj, float tol)
 Recursively adds objects from App::Part & App::DocumentObjectGroup. More...
 
virtual bool addMeshFeat (App::DocumentObject *obj)=0
 
bool addObject (App::DocumentObject *obj, float tol)
 
virtual bool addPartFeat (App::DocumentObject *obj, float tol)=0
 
 Exporter ()
 
virtual ~Exporter ()=default
 

Static Public Member Functions

static bool isSupported (App::DocumentObject *obj)
 

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

const Base::Type appPartId
 
const Base::Type groupExtensionId
 
const Base::Type meshFeatId
 

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.

Objects are added using the addMeshFeat(), addPartFeat(), etc.

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

◆ addAppGroup()

bool Exporter::addAppGroup ( App::DocumentObject obj,
float  tol 
)

Recursively adds objects from App::Part & App::DocumentObjectGroup.

Returns
true if all applicable objects within the group were added successfully.

References addMeshFeat(), addPartFeat(), appPartId, groupExtensionId, and meshFeatId.

Referenced by addObject().

◆ addMeshFeat()

virtual bool Mesh::Exporter::addMeshFeat ( App::DocumentObject obj)
pure virtual

Implemented in Mesh::AmfExporter, and Mesh::MergeExporter.

Referenced by addAppGroup(), and addObject().

◆ addObject()

◆ addPartFeat()

virtual bool Mesh::Exporter::addPartFeat ( App::DocumentObject obj,
float  tol 
)
pure virtual

Implemented in Mesh::AmfExporter, and Mesh::MergeExporter.

Referenced by addAppGroup(), and addObject().

◆ isSupported()

bool Exporter::isSupported ( App::DocumentObject obj)
static
Returns
true if is an object that can be exported as mesh.

References appPartId, Base::Type::fromName(), groupExtensionId, and meshFeatId.

◆ xmlEscape()

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

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

Referenced by Mesh::AmfExporter::addMeshFeat(), and Mesh::AmfExporter::addPartFeat().

Member Data Documentation

◆ appPartId

const Base::Type Mesh::Exporter::appPartId
protected

Referenced by addAppGroup(), addObject(), and isSupported().

◆ groupExtensionId

const Base::Type Mesh::Exporter::groupExtensionId
protected

Referenced by addAppGroup(), addObject(), and isSupported().

◆ meshFeatId

const Base::Type Mesh::Exporter::meshFeatId
protected

Referenced by addAppGroup(), addObject(), and isSupported().


The documentation for this class was generated from the following files:
  • src/Mod/Mesh/App/Exporter.h
  • src/Mod/Mesh/App/Exporter.cpp