2003-07-10 14:13:02 +06:00
|
|
|
// SMESH DriverMED : driver to read and write 'med' files
|
|
|
|
//
|
|
|
|
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
|
|
|
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
|
|
|
//
|
|
|
|
// This library is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU Lesser General Public
|
|
|
|
// License as published by the Free Software Foundation; either
|
|
|
|
// version 2.1 of the License.
|
|
|
|
//
|
|
|
|
// This library is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
// Lesser General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU Lesser General Public
|
|
|
|
// License along with this library; if not, write to the Free Software
|
|
|
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
//
|
|
|
|
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// File : DriverMED_W_SMESHDS_Mesh.h
|
|
|
|
// Module : SMESH
|
|
|
|
|
2003-03-07 19:55:31 +05:00
|
|
|
#ifndef _INCLUDE_DRIVERMED_W_SMESHDS_MESH
|
|
|
|
#define _INCLUDE_DRIVERMED_W_SMESHDS_MESH
|
|
|
|
|
2004-12-01 15:48:31 +05:00
|
|
|
#include "Driver_SMESHDS_Mesh.h"
|
2005-01-20 11:25:54 +05:00
|
|
|
#include "MED_Factory.hxx"
|
2003-03-07 19:55:31 +05:00
|
|
|
|
|
|
|
#include <string>
|
2004-06-18 14:34:31 +06:00
|
|
|
#include <list>
|
|
|
|
#include <map>
|
2003-03-07 19:55:31 +05:00
|
|
|
|
2004-12-01 15:48:31 +05:00
|
|
|
class SMESHDS_Mesh;
|
|
|
|
class SMESHDS_GroupBase;
|
2004-06-18 14:34:31 +06:00
|
|
|
class SMESHDS_SubMesh;
|
|
|
|
|
2004-12-01 15:48:31 +05:00
|
|
|
class DriverMED_W_SMESHDS_Mesh: public Driver_SMESHDS_Mesh
|
2003-09-04 18:03:27 +06:00
|
|
|
{
|
2004-06-18 14:34:31 +06:00
|
|
|
public:
|
2003-03-07 19:55:31 +05:00
|
|
|
|
2004-06-18 14:34:31 +06:00
|
|
|
DriverMED_W_SMESHDS_Mesh();
|
2003-03-07 19:55:31 +05:00
|
|
|
|
2005-01-20 11:25:54 +05:00
|
|
|
virtual void SetFile(const std::string& theFileName);
|
|
|
|
void SetFile(const std::string& theFileName, MED::EVersion theId);
|
|
|
|
|
2004-06-18 14:34:31 +06:00
|
|
|
/*! sets file name; only for usage with Add(), not Write()
|
|
|
|
*/
|
|
|
|
void AddGroupOfNodes();
|
|
|
|
void AddGroupOfEdges();
|
|
|
|
void AddGroupOfFaces();
|
|
|
|
void AddGroupOfVolumes();
|
2003-03-07 19:55:31 +05:00
|
|
|
|
2004-06-18 14:34:31 +06:00
|
|
|
/*! functions to prepare adding one mesh
|
|
|
|
*/
|
2004-12-01 15:48:31 +05:00
|
|
|
void SetMeshName(const std::string& theMeshName);
|
|
|
|
void AddGroup(SMESHDS_GroupBase * theGroup);
|
2004-06-18 14:34:31 +06:00
|
|
|
void AddAllSubMeshes();
|
|
|
|
void AddSubMesh(SMESHDS_SubMesh* theSubMesh, int theID);
|
2003-03-07 19:55:31 +05:00
|
|
|
|
2004-06-18 14:34:31 +06:00
|
|
|
/*! add one mesh
|
|
|
|
*/
|
2004-12-01 15:48:31 +05:00
|
|
|
virtual Status Perform();
|
2003-03-07 19:55:31 +05:00
|
|
|
|
2004-06-18 14:34:31 +06:00
|
|
|
private:
|
|
|
|
|
2005-01-20 11:25:54 +05:00
|
|
|
MED::PWrapper myMed;
|
2004-12-01 15:48:31 +05:00
|
|
|
std::string myMeshName;
|
|
|
|
std::list<SMESHDS_GroupBase*> myGroups;
|
2004-06-18 14:34:31 +06:00
|
|
|
bool myAllSubMeshes;
|
2004-12-01 15:48:31 +05:00
|
|
|
std::map<int,SMESHDS_SubMesh*> mySubMeshes;
|
2004-06-18 14:34:31 +06:00
|
|
|
bool myDoGroupOfNodes;
|
|
|
|
bool myDoGroupOfEdges;
|
|
|
|
bool myDoGroupOfFaces;
|
|
|
|
bool myDoGroupOfVolumes;
|
2003-03-07 19:55:31 +05:00
|
|
|
};
|
2004-12-01 15:48:31 +05:00
|
|
|
|
|
|
|
|
2003-03-07 19:55:31 +05:00
|
|
|
#endif
|
2004-06-18 14:34:31 +06:00
|
|
|
|