Mesh: [skip ci] Add static method to get list of supported input/output mesh formats
This commit is contained in:
@@ -139,6 +139,18 @@ struct Color_Less : public std::binary_function<const App::Color&,
|
||||
|
||||
// --------------------------------------------------------------
|
||||
|
||||
std::vector<std::string> MeshInput::supportedMeshFormats()
|
||||
{
|
||||
std::vector<std::string> fmt;
|
||||
fmt.emplace_back("bms");
|
||||
fmt.emplace_back("ply");
|
||||
fmt.emplace_back("stl");
|
||||
fmt.emplace_back("obj");
|
||||
fmt.emplace_back("off");
|
||||
fmt.emplace_back("smf");
|
||||
return fmt;
|
||||
}
|
||||
|
||||
bool MeshInput::LoadAny(const char* FileName)
|
||||
{
|
||||
// ask for read permission
|
||||
@@ -1747,6 +1759,22 @@ void MeshOutput::Transform(const Base::Matrix4D& mat)
|
||||
apply_transform = true;
|
||||
}
|
||||
|
||||
std::vector<std::string> MeshOutput::supportedMeshFormats()
|
||||
{
|
||||
std::vector<std::string> fmt;
|
||||
fmt.emplace_back("bms");
|
||||
fmt.emplace_back("ply");
|
||||
fmt.emplace_back("stl");
|
||||
fmt.emplace_back("obj");
|
||||
fmt.emplace_back("off");
|
||||
fmt.emplace_back("smf");
|
||||
fmt.emplace_back("x3d");
|
||||
fmt.emplace_back("wrl");
|
||||
fmt.emplace_back("wrz");
|
||||
fmt.emplace_back("amf");
|
||||
return fmt;
|
||||
}
|
||||
|
||||
MeshIO::Format MeshOutput::GetFormat(const char* FileName)
|
||||
{
|
||||
Base::FileInfo file(FileName);
|
||||
|
||||
@@ -129,6 +129,8 @@ public:
|
||||
/** Loads a Cadmould FE file. */
|
||||
bool LoadCadmouldFE (std::ifstream &rstrIn);
|
||||
|
||||
static std::vector<std::string> supportedMeshFormats();
|
||||
|
||||
protected:
|
||||
MeshKernel &_rclMesh; /**< reference to mesh data structure */
|
||||
Material* _material;
|
||||
@@ -205,6 +207,8 @@ public:
|
||||
/** Writes a python module which creates a mesh */
|
||||
bool SavePython (std::ostream &rstrOut) const;
|
||||
|
||||
static std::vector<std::string> supportedMeshFormats();
|
||||
|
||||
protected:
|
||||
const MeshKernel &_rclMesh; /**< reference to mesh data structure */
|
||||
const Material* _material;
|
||||
|
||||
Reference in New Issue
Block a user