MeshCore::MeshOutput Class Reference

The MeshOutput class is able to write a mesh object to an ouput stream on various formats. More...

#include <MeshIO.h>

List of all members.

Public Member Functions

 MeshOutput (const MeshKernel &rclM, const Material *m)
 MeshOutput (const MeshKernel &rclM)
bool SaveAny (const char *FileName, MeshIO::Format f=MeshIO::Undefined) const
 Saves the file, decided by extension if not explicitly given.
bool SaveAsciiSTL (std::ostream &rstrOut) const
 Saves the mesh object into an ASCII STL file.
bool SaveBinarySTL (std::ostream &rstrOut) const
 Saves the mesh object into a binary STL file.
bool SaveCadmouldFE (std::ostream &rstrOut) const
 Writes a Cadmould FE file.
bool SaveInventor (std::ostream &rstrOut) const
 Writes an OpenInventor file.
bool SaveMeshNode (std::ostream &rstrIn)
 Saves a node to an OpenInventor file.
bool SaveNastran (std::ostream &rstrOut) const
 Writes a Nastran file.
bool SaveOBJ (std::ostream &rstrOut) const
 Saves the mesh object into an OBJ file.
bool SaveOFF (std::ostream &rstrOut) const
 Saves the mesh object into an OFF file.
bool SavePLY (std::ostream &rstrOut) const
 Saves the mesh object into a PLY file.
bool SavePython (std::ostream &rstrOut) const
 Writes a python module which creates a mesh.
bool SaveVRML (std::ostream &rstrOut, const App::Material &rclMat) const
 Writes a VRML file.
void SaveXML (Base::Writer &writer) const
 Saves the mesh object into an XML file.
void Transform (const Base::Matrix4D &)
virtual ~MeshOutput (void)

Static Public Member Functions

static void SetSTLHeaderData (const std::string &)
 Set custom data to the header of a binary STL.

Protected Attributes

const Material_material
const MeshKernel_rclMesh
 reference to mesh data structure
Base::Matrix4D _transform
bool apply_transform

Static Protected Attributes

static std::string stl_header

Detailed Description

The MeshOutput class is able to write a mesh object to an ouput stream on various formats.

Definition at line 113 of file MeshIO.h.


Constructor & Destructor Documentation

MeshCore::MeshOutput::MeshOutput ( const MeshKernel rclM  )  [inline]

Definition at line 116 of file MeshIO.h.

MeshCore::MeshOutput::MeshOutput ( const MeshKernel rclM,
const Material m 
) [inline]

Definition at line 118 of file MeshIO.h.

virtual MeshCore::MeshOutput::~MeshOutput ( void   )  [inline, virtual]

Definition at line 120 of file MeshIO.h.


Member Function Documentation

bool MeshOutput::SaveAny ( const char *  FileName,
MeshIO::Format  f = MeshIO::Undefined 
) const
bool MeshOutput::SaveAsciiSTL ( std::ostream &  rstrOut  )  const
bool MeshOutput::SaveBinarySTL ( std::ostream &  rstrOut  )  const
bool MeshOutput::SaveCadmouldFE ( std::ostream &  rstrOut  )  const

Writes a Cadmould FE file.

Definition at line 1837 of file MeshIO.cpp.

bool MeshOutput::SaveInventor ( std::ostream &  rstrOut  )  const
bool MeshOutput::SaveMeshNode ( std::ostream &  rstrIn  ) 
bool MeshOutput::SaveNastran ( std::ostream &  rstrOut  )  const
bool MeshOutput::SaveOBJ ( std::ostream &  rstrOut  )  const
bool MeshOutput::SaveOFF ( std::ostream &  out  )  const
bool MeshOutput::SavePLY ( std::ostream &  rstrOut  )  const
bool MeshOutput::SavePython ( std::ostream &  rstrOut  )  const
bool MeshOutput::SaveVRML ( std::ostream &  rstrOut,
const App::Material rclMat 
) const

Writes a VRML file.

Definition at line 1894 of file MeshIO.cpp.

References _rclMesh, and _transform.

Referenced by SaveAny().

void MeshOutput::SaveXML ( Base::Writer writer  )  const
void MeshOutput::SetSTLHeaderData ( const std::string &  header  )  [static]

Set custom data to the header of a binary STL.

If the data exceeds 80 characters the the characters too much are ignored. If the data has less than 80 characters they are automatically filled up with spaces.

Definition at line 1203 of file MeshIO.cpp.

References draftlibs::dxfLibrary::copy, and stl_header.

void MeshOutput::Transform ( const Base::Matrix4D mat  ) 

Definition at line 1217 of file MeshIO.cpp.

References _transform, and apply_transform.

Referenced by Mesh::MeshObject::save(), and SaveAny().


Member Data Documentation

Definition at line 158 of file MeshIO.h.

Referenced by SavePLY().

reference to mesh data structure

Definition at line 157 of file MeshIO.h.

Referenced by SaveAny(), SaveAsciiSTL(), SaveBinarySTL(), SaveInventor(), SaveMeshNode(), SaveNastran(), SaveOBJ(), SaveOFF(), SavePLY(), SavePython(), SaveVRML(), and SaveXML().

Definition at line 160 of file MeshIO.h.

Referenced by SaveMeshNode(), SaveOBJ(), SaveOFF(), SavePLY(), SaveXML(), and Transform().

std::string MeshOutput::stl_header [static, protected]
Initial value:
 "MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-"
                                     "MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH\n"

Definition at line 161 of file MeshIO.h.

Referenced by SaveBinarySTL(), and SetSTLHeaderData().


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

Generated on Wed Nov 23 19:02:25 2011 for FreeCAD by  doxygen 1.6.1