The MeshInput class is able to read a mesh object from an input stream in various formats. More...
#include <MeshIO.h>
Public Member Functions | |
const std::vector< std::string > & GetGroupNames () const | |
bool LoadAny (const char *FileName) | |
Loads the file, decided by extension. More... | |
bool LoadAsciiSTL (std::istream &rstrIn) | |
Loads an ASCII STL file. More... | |
bool LoadBinarySTL (std::istream &rstrIn) | |
Loads a binary STL file. More... | |
bool LoadCadmouldFE (std::ifstream &rstrIn) | |
Loads a Cadmould FE file. More... | |
bool LoadFormat (std::istream &str, MeshIO::Format fmt) | |
Loads from a stream and the given format. More... | |
bool LoadInventor (std::istream &rstrIn) | |
Loads an OpenInventor file. More... | |
bool LoadMeshNode (std::istream &rstrIn) | |
Loads a node from an OpenInventor file. More... | |
bool LoadMTL (std::istream &rstrIn) | |
Loads the materials of an OBJ file. More... | |
bool LoadNastran (std::istream &rstrIn) | |
Loads a Nastran file. More... | |
bool LoadOBJ (std::istream &rstrIn) | |
Loads an OBJ Mesh file. More... | |
bool LoadOFF (std::istream &rstrIn) | |
Loads an OFF Mesh file. More... | |
bool LoadPLY (std::istream &rstrIn) | |
Loads a PLY Mesh file. More... | |
bool LoadSMF (std::istream &rstrIn) | |
Loads an SMF Mesh file. More... | |
bool LoadSTL (std::istream &rstrIn) | |
Loads an STL file either in binary or ASCII format. More... | |
void LoadXML (Base::XMLReader &reader) | |
Loads the mesh object from an XML file. More... | |
MeshInput (MeshKernel &rclM) | |
MeshInput (MeshKernel &rclM, Material *m) | |
virtual ~MeshInput (void) | |
Static Public Member Functions | |
static std::vector< std::string > supportedMeshFormats () | |
Detailed Description
The MeshInput class is able to read a mesh object from an input stream in various formats.
Constructor & Destructor Documentation
◆ MeshInput() [1/2]
MeshCore::MeshInput::MeshInput | ( | MeshKernel & | rclM | ) |
◆ MeshInput() [2/2]
MeshCore::MeshInput::MeshInput | ( | MeshKernel & | rclM, |
Material * | m | ||
) |
◆ ~MeshInput()
|
virtual |
Member Function Documentation
◆ GetGroupNames()
const std::vector<std::string>& MeshCore::MeshInput::GetGroupNames | ( | ) | const |
Referenced by Mesh::MeshObject::load().
◆ LoadAny()
bool MeshInput::LoadAny | ( | const char * | FileName | ) |
Loads the file, decided by extension.
References Base::Console(), Base::FileInfo::exists(), Base::FileInfo::hasExtension(), Base::FileInfo::isFile(), Base::FileInfo::isReadable(), LoadInventor(), LoadNastran(), LoadOBJ(), LoadOFF(), LoadPLY(), LoadSMF(), LoadSTL(), and Base::ConsoleSingleton::Warning().
Referenced by Mesh::MeshObject::load().
◆ LoadAsciiSTL()
bool MeshInput::LoadAsciiSTL | ( | std::istream & | rstrIn | ) |
Loads an ASCII STL file.
References MeshCore::MeshFastBuilder::AddFacet(), MeshCore::MeshFastBuilder::Finish(), MeshCore::MeshFastBuilder::Initialize(), and MeshCore::MeshGeomFacet::SetNormal().
Referenced by LoadFormat(), and LoadSTL().
◆ LoadBinarySTL()
bool MeshInput::LoadBinarySTL | ( | std::istream & | rstrIn | ) |
Loads a binary STL file.
References MeshCore::MeshFastBuilder::AddFacet(), MeshCore::MeshFastBuilder::Finish(), and MeshCore::MeshFastBuilder::Initialize().
Referenced by LoadFormat(), and LoadSTL().
◆ LoadCadmouldFE()
bool MeshInput::LoadCadmouldFE | ( | std::ifstream & | rstrIn | ) |
Loads a Cadmould FE file.
◆ LoadFormat()
bool MeshInput::LoadFormat | ( | std::istream & | str, |
MeshIO::Format | fmt | ||
) |
Loads from a stream and the given format.
References MeshCore::MeshIO::APLY, MeshCore::MeshIO::ASTL, MeshCore::MeshIO::BMS, MeshCore::MeshIO::BSTL, MeshCore::MeshIO::IV, LoadAsciiSTL(), LoadBinarySTL(), LoadInventor(), LoadNastran(), LoadOBJ(), LoadOFF(), LoadPLY(), LoadSMF(), MeshCore::MeshIO::NAS, MeshCore::MeshIO::OBJ, MeshCore::MeshIO::OFF, MeshCore::MeshIO::PLY, and MeshCore::MeshIO::SMF.
Referenced by Mesh::MeshObject::load().
◆ LoadInventor()
bool MeshInput::LoadInventor | ( | std::istream & | rstrIn | ) |
Loads an OpenInventor file.
References Base::SequencerLauncher::next(), MeshCore::MeshGeomFacet::SetNormal(), Base::Vector3< _Precision >::x, Base::Vector3< _Precision >::y, and Base::Vector3< _Precision >::z.
Referenced by LoadAny(), and LoadFormat().
◆ LoadMeshNode()
bool MeshInput::LoadMeshNode | ( | std::istream & | rstrIn | ) |
Loads a node from an OpenInventor file.
References MeshCore::MeshCleanup::RemoveInvalids(), and MeshCore::MeshPointFacetAdjacency::SetFacetNeighbourhood().
◆ LoadMTL()
bool MeshInput::LoadMTL | ( | std::istream & | rstrIn | ) |
Loads the materials of an OBJ file.
References Base::Tools::escapedUnicodeToUtf8(), MeshCore::MeshIO::OVERALL, and MeshCore::MeshIO::PER_FACE.
Referenced by Mesh::MeshObject::load().
◆ LoadNastran()
bool MeshInput::LoadNastran | ( | std::istream & | rstrIn | ) |
Loads a Nastran file.
Referenced by LoadAny(), and LoadFormat().
◆ LoadOBJ()
bool MeshInput::LoadOBJ | ( | std::istream & | rstrIn | ) |
Loads an OBJ Mesh file.
Loads an OBJ file.
References Base::Tools::escapedUnicodeToUtf8(), MeshCore::MeshIO::OVERALL, MeshCore::MeshIO::PER_FACE, MeshCore::MeshIO::PER_VERTEX, MeshCore::MeshCleanup::RemoveInvalids(), MeshCore::MeshPointFacetAdjacency::SetFacetNeighbourhood(), MeshCore::MeshCleanup::SetMaterial(), App::Color::setPackedValue(), MeshCore::MeshFacet::SetProperty(), MeshCore::MeshPointArray::SetProperty(), and MeshCore::MeshFacet::SetVertices().
Referenced by LoadAny(), and LoadFormat().
◆ LoadOFF()
bool MeshInput::LoadOFF | ( | std::istream & | rstrIn | ) |
Loads an OFF Mesh file.
Loads an OFF file.
References MeshCore::MeshIO::PER_VERTEX, MeshCore::MeshCleanup::RemoveInvalids(), MeshCore::MeshPointFacetAdjacency::SetFacetNeighbourhood(), MeshCore::MeshCleanup::SetMaterial(), and MeshCore::MeshFacet::SetVertices().
Referenced by LoadAny(), and LoadFormat().
◆ LoadPLY()
bool MeshInput::LoadPLY | ( | std::istream & | rstrIn | ) |
Loads a PLY Mesh file.
str || !str.eof() ||
str || !str.eof() ||
References Base::Stream::BigEndian, MeshCore::Ply::float32, MeshCore::Ply::float64, MeshCore::Ply::int16, MeshCore::Ply::int32, MeshCore::Ply::int8, Base::Stream::LittleEndian, MeshCore::MeshIO::OVERALL, MeshCore::MeshIO::PER_VERTEX, MeshCore::MeshCleanup::RemoveInvalids(), Base::Stream::setByteOrder(), MeshCore::MeshPointFacetAdjacency::SetFacetNeighbourhood(), MeshCore::MeshCleanup::SetMaterial(), MeshCore::Ply::uint8, Base::Vector3< _Precision >::x, Base::Vector3< _Precision >::y, and Base::Vector3< _Precision >::z.
Referenced by LoadAny(), and LoadFormat().
◆ LoadSMF()
bool MeshInput::LoadSMF | ( | std::istream & | rstrIn | ) |
Loads an SMF Mesh file.
Loads an SMF file.
References MeshCore::MeshCleanup::RemoveInvalids(), MeshCore::MeshPointFacetAdjacency::SetFacetNeighbourhood(), MeshCore::MeshFacet::SetProperty(), and MeshCore::MeshFacet::SetVertices().
Referenced by LoadAny(), and LoadFormat().
◆ LoadSTL()
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.
References LoadAsciiSTL(), and LoadBinarySTL().
Referenced by LoadAny().
◆ LoadXML()
void MeshInput::LoadXML | ( | Base::XMLReader & | reader | ) |
Loads the mesh object from an XML file.
References Base::XMLReader::getAttributeAsFloat(), Base::XMLReader::getAttributeAsInteger(), Base::XMLReader::readElement(), and Base::XMLReader::readEndElement().
Referenced by Mesh::PropertyMeshKernel::Restore().
◆ supportedMeshFormats()
|
static |
The documentation for this class was generated from the following files:
- src/Mod/Mesh/App/Core/MeshIO.h
- src/Mod/Mesh/App/Core/MeshIO.cpp