The MeshInput class is able to read a mesh object from a input stream in various formats. More...
#include <MeshIO.h>
Public Member Functions | |
bool | LoadAny (const char *FileName) |
Loads the file, decided by extension. | |
bool | LoadAsciiSTL (std::istream &rstrIn) |
Loads an ASCII STL file. | |
bool | LoadBinarySTL (std::istream &rstrIn) |
Loads a binary STL file. | |
bool | LoadCadmouldFE (std::ifstream &rstrIn) |
Loads a Cadmould FE file. | |
bool | LoadInventor (std::istream &rstrIn) |
Loads an OpenInventor file. | |
bool | LoadMeshNode (std::istream &rstrIn) |
Loads a node from an OpenInventor file. | |
bool | LoadNastran (std::istream &rstrIn) |
Loads a Nastran file. | |
bool | LoadOBJ (std::istream &rstrIn) |
Loads an OBJ Mesh file. | |
bool | LoadPLY (std::istream &rstrIn) |
Loads a PLY Mesh file. | |
bool | LoadSTL (std::istream &rstrIn) |
Loads an STL file either in binary or ASCII format. | |
void | LoadXML (Base::XMLReader &reader) |
Loads the mesh object from an XML file. | |
MeshInput (MeshKernel &rclM) | |
virtual | ~MeshInput (void) |
Protected Attributes | |
MeshKernel & | _rclMesh |
reference to mesh data structure |
The MeshInput class is able to read a mesh object from a input stream in various formats.
Definition at line 74 of file MeshIO.h.
MeshCore::MeshInput::MeshInput | ( | MeshKernel & | rclM | ) | [inline] |
virtual MeshCore::MeshInput::~MeshInput | ( | void | ) | [inline, virtual] |
bool MeshInput::LoadAny | ( | const char * | FileName | ) |
Loads the file, decided by extension.
Definition at line 301 of file MeshIO.cpp.
References _rclMesh, Base::Console(), MeshCore::MeshKernel::CountFacets(), Base::FileInfo::exists(), Base::FileInfo::hasExtension(), Base::FileInfo::isFile(), Base::FileInfo::isReadable(), LoadInventor(), LoadNastran(), LoadOBJ(), LoadPLY(), LoadSTL(), and MeshCore::MeshKernel::Read().
Referenced by Mesh::MeshObject::load().
bool MeshInput::LoadAsciiSTL | ( | std::istream & | rstrIn | ) |
Loads an ASCII STL file.
Definition at line 758 of file MeshIO.cpp.
References MeshCore::MeshGeomFacet::_aclPoints, _rclMesh, MeshCore::MeshBuilder::AddFacet(), Sketcher::end, MeshCore::MeshBuilder::Finish(), importOCA::getline(), MeshCore::MeshBuilder::Initialize(), Base::Vector3< _Precision >::Set(), and MeshCore::MeshGeomFacet::SetNormal().
Referenced by LoadSTL().
bool MeshInput::LoadBinarySTL | ( | std::istream & | rstrIn | ) |
Loads a binary STL file.
Definition at line 829 of file MeshIO.cpp.
References _rclMesh, MeshCore::MeshBuilder::AddFacet(), Sketcher::end, MeshCore::MeshBuilder::Finish(), MeshCore::MeshBuilder::Initialize(), and boost::numeric::bindings::atlas::swap().
Referenced by LoadSTL().
bool MeshInput::LoadCadmouldFE | ( | std::ifstream & | rstrIn | ) |
Loads a Cadmould FE file.
Definition at line 1190 of file MeshIO.cpp.
bool MeshInput::LoadInventor | ( | std::istream & | rstrIn | ) |
Loads an OpenInventor file.
Definition at line 923 of file MeshIO.cpp.
References MeshCore::MeshGeomFacet::_aclPoints, _rclMesh, Sketcher::end, importOCA::getline(), Base::SequencerLauncher::next(), RobotExample::pos, MeshCore::MeshGeomFacet::SetNormal(), Base::Vector3< _Precision >::x, Base::Vector3< _Precision >::y, and Base::Vector3< _Precision >::z.
Referenced by LoadAny().
bool MeshInput::LoadMeshNode | ( | std::istream & | rstrIn | ) |
Loads a node from an OpenInventor file.
Definition at line 703 of file MeshIO.cpp.
References _rclMesh, MeshCore::MeshKernel::Adopt(), MeshCore::MeshKernel::Clear(), importOCA::getline(), and MeshCore::MeshKernel::Merge().
bool MeshInput::LoadNastran | ( | std::istream & | rstrIn | ) |
Loads a Nastran file.
Definition at line 1071 of file MeshIO.cpp.
References MeshCore::MeshFacet::_aulPoints, _rclMesh, importOCA::getline(), ltrim(), MeshCore::MeshKernel::Merge(), and upper().
Referenced by LoadAny().
bool MeshInput::LoadOBJ | ( | std::istream & | rstrIn | ) |
Loads an OBJ Mesh file.
Loads an OBJ file.
Definition at line 407 of file MeshIO.cpp.
References _rclMesh, MeshCore::MeshKernel::Adopt(), MeshCore::MeshKernel::Clear(), Base::Console(), importOCA::getline(), MeshCore::MeshKernel::Merge(), MeshCore::MeshFacet::SetProperty(), and MeshCore::MeshFacet::SetVertices().
Referenced by LoadAny().
bool MeshInput::LoadPLY | ( | std::istream & | rstrIn | ) |
Loads a PLY Mesh file.
Definition at line 515 of file MeshIO.cpp.
References _rclMesh, MeshCore::MeshKernel::Adopt(), FemExample::b, Base::Stream::BigEndian, MeshCore::MeshKernel::Clear(), RobotExampleTrajectoryOutOfShapes::count, format, importOCA::getline(), Base::Stream::LittleEndian, MeshCore::MeshKernel::Merge(), Base::Stream::setByteOrder(), Py::type(), Base::Vector3< _Precision >::x, Base::Vector3< _Precision >::y, and Base::Vector3< _Precision >::z.
Referenced by LoadAny().
bool MeshInput::LoadSTL | ( | std::istream & | rstrIn | ) |
Loads an STL file either in binary or ASCII format.
Therefore the file header gets checked to decide if the file is binary or not.
Definition at line 347 of file MeshIO.cpp.
References _rclMesh, MeshCore::MeshKernel::Clear(), LoadAsciiSTL(), LoadBinarySTL(), and upper().
Referenced by LoadAny().
void MeshInput::LoadXML | ( | Base::XMLReader & | reader | ) |
Loads the mesh object from an XML file.
Definition at line 883 of file MeshIO.cpp.
References _rclMesh, MeshCore::MeshKernel::Adopt(), Base::XMLReader::getAttributeAsFloat(), Base::XMLReader::getAttributeAsInteger(), Base::XMLReader::readElement(), and Base::XMLReader::readEndElement().
Referenced by Mesh::PropertyMeshKernel::Restore().
MeshKernel& MeshCore::MeshInput::_rclMesh [protected] |
reference to mesh data structure
Definition at line 106 of file MeshIO.h.
Referenced by LoadAny(), LoadAsciiSTL(), LoadBinarySTL(), LoadInventor(), LoadMeshNode(), LoadNastran(), LoadOBJ(), LoadPLY(), LoadSTL(), and LoadXML().