#ifndef MESHWRITER_H #define MESHWRITER_H #include #include #include #include class MeshWriter { public: MeshWriter(); // Destructor ~MeshWriter(); // Write a VTK mesh to the specified file format based on user choice. // Supported formats: .vtk, .vtp, .stl, .obj, .ply // Returns true if the write operation is successful, false otherwise. bool WriteMesh(const vtkSmartPointer& polydata, const std::string& fileName); // bool WriteGeometry(vtkAlgorithmOutput* outputPort, const std::string& fileName); private: // Private helper functions for writing to specific formats bool WriteVTK(const vtkSmartPointer& polydata, const std::string& fileName); bool WriteVTP(const vtkSmartPointer& polydata, const std::string& fileName); bool WriteSTL(const vtkSmartPointer& polydata, const std::string& fileName); bool WriteOBJ(const vtkSmartPointer& polydata, const std::string& fileName); bool WritePLY(const vtkSmartPointer& polydata, const std::string& fileName); }; /* class MeshReader { public: // Function to read a mesh from the specified input file in various formats (vtk, vtp, stl, obj). // Returns true on success, false on failure. static bool ReadMesh(const std::string& inputFileName, const std::string& format); };*/ #endif // MESHWRITER_H