Update to match the new implementation of SMDS

This commit is contained in:
jrt 2003-09-04 10:41:22 +00:00
parent fb91f8b907
commit dd138f193f
8 changed files with 1479 additions and 1573 deletions

View File

@ -571,7 +571,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save(SALOMEDS::SComponent_ptr theComponent,
int meshId = myMesh->GetId(); int meshId = myMesh->GetId();
SMESH_Mesh_i* meshServant = myStudyContext->mapMesh_i[meshId]; SMESH_Mesh_i* meshServant = myStudyContext->mapMesh_i[meshId];
::SMESH_Mesh& myLocMesh = meshServant->GetImpl(); ::SMESH_Mesh& myLocMesh = meshServant->GetImpl();
Handle(SMESHDS_Mesh) mySMESHDSMesh = myLocMesh.GetMeshDS(); SMESHDS_Mesh* mySMESHDSMesh = myLocMesh.GetMeshDS();
SCRUTE(mySMESHDSMesh->NbNodes()); SCRUTE(mySMESHDSMesh->NbNodes());
if (mySMESHDSMesh->NbNodes()>0) {//checks if the mesh is not empty if (mySMESHDSMesh->NbNodes()>0) {//checks if the mesh is not empty
@ -1136,7 +1136,7 @@ bool SMESH_Gen_i::Load(SALOMEDS::SComponent_ptr theComponent,
int meshId = myNewMesh->GetId(); int meshId = myNewMesh->GetId();
SMESH_Mesh_i* meshServant = myStudyContext->mapMesh_i[meshId]; SMESH_Mesh_i* meshServant = myStudyContext->mapMesh_i[meshId];
::SMESH_Mesh& myLocMesh = meshServant->GetImpl(); ::SMESH_Mesh& myLocMesh = meshServant->GetImpl();
Handle(SMESHDS_Mesh) mySMESHDSMesh = myLocMesh.GetMeshDS(); SMESHDS_Mesh* mySMESHDSMesh = myLocMesh.GetMeshDS();
DriverMED_R_SMESHDS_Mesh* myReader = new DriverMED_R_SMESHDS_Mesh; DriverMED_R_SMESHDS_Mesh* myReader = new DriverMED_R_SMESHDS_Mesh;

File diff suppressed because it is too large Load Diff

View File

@ -37,29 +37,19 @@
#include "SMDS_MeshElement.hxx" #include "SMDS_MeshElement.hxx"
#include "SMDS_MeshNode.hxx" #include "SMDS_MeshNode.hxx"
#include "SMDS_MeshFacesIterator.hxx"
#include "SMDS_MeshEdgesIterator.hxx"
#include "SMDS_MeshNodesIterator.hxx"
#include "SMDS_MeshVolumesIterator.hxx"
#define MED_NBR_GEOMETRIE_MAILLE 15 #define MED_NBR_GEOMETRIE_MAILLE 15
#define MED_NBR_TYPE 5 #define MED_NBR_TYPE 5
class SMESH_Mesh_i; class SMESH_Mesh_i;
class SMESH_MEDMesh_i: class SMESH_MEDMesh_i:
public POA_SALOME_MED::MESH, public POA_SALOME_MED::MESH, public PortableServer::RefCountServantBase
public PortableServer::RefCountServantBase
{ {
public : public: private: protected:
private :
protected:
// C++ object containing values // C++ object containing values
::SMESH_Mesh_i* _mesh_i; ::SMESH_Mesh_i * _mesh_i;
Handle (SMESHDS_Mesh) _meshDS; SMESHDS_Mesh *_meshDS;
string _meshId; string _meshId;
bool _compte; bool _compte;
@ -68,116 +58,110 @@ protected:
int _indexEnts; int _indexEnts;
int _famIdent; int _famIdent;
map <SALOME_MED::medGeometryElement,int> _mapIndToSeqElts; map < SALOME_MED::medGeometryElement, int >_mapIndToSeqElts;
Engines::long_array_var _seq_elemId[MED_NBR_GEOMETRIE_MAILLE]; Engines::long_array_var _seq_elemId[MED_NBR_GEOMETRIE_MAILLE];
map <SALOME_MED::medEntityMesh,int> _mapNbTypes; map < SALOME_MED::medEntityMesh, int >_mapNbTypes;
map <SALOME_MED::medEntityMesh,int> _mapIndToVectTypes; map < SALOME_MED::medEntityMesh, int >_mapIndToVectTypes;
vector<SALOME_MED::medGeometryElement> _TypesId[MED_NBR_GEOMETRIE_MAILLE]; vector < SALOME_MED::medGeometryElement >
_TypesId[MED_NBR_GEOMETRIE_MAILLE];
vector<SALOME_MED::FAMILY_ptr> _families; vector < SALOME_MED::FAMILY_ptr > _families;
public: public:
// Constructors and associated internal methods // Constructors and associated internal methods
SMESH_MEDMesh_i(); SMESH_MEDMesh_i();
SMESH_MEDMesh_i(SMESH_Mesh_i* m); SMESH_MEDMesh_i(SMESH_Mesh_i * m);
~SMESH_MEDMesh_i(); ~SMESH_MEDMesh_i();
// IDL Methods // IDL Methods
char * getName() throw (SALOME::SALOME_Exception); char *getName() throw(SALOME::SALOME_Exception);
CORBA::Long getSpaceDimension() throw (SALOME::SALOME_Exception); CORBA::Long getSpaceDimension() throw(SALOME::SALOME_Exception);
CORBA::Long getMeshDimension() throw (SALOME::SALOME_Exception); CORBA::Long getMeshDimension() throw(SALOME::SALOME_Exception);
char * getCoordinateSystem() char *getCoordinateSystem() throw(SALOME::SALOME_Exception);
throw (SALOME::SALOME_Exception); Engines::double_array * getCoordinates(SALOME_MED::medModeSwitch typeSwitch)
Engines::double_array* getCoordinates(SALOME_MED::medModeSwitch typeSwitch) throw(SALOME::SALOME_Exception);
throw (SALOME::SALOME_Exception); Engines::string_array * getCoordinatesNames()
Engines::string_array* getCoordinatesNames() throw(SALOME::SALOME_Exception);
throw (SALOME::SALOME_Exception); Engines::string_array * getCoordinatesUnits()
Engines::string_array* getCoordinatesUnits() throw(SALOME::SALOME_Exception);
throw (SALOME::SALOME_Exception); CORBA::Long getNumberOfNodes() throw(SALOME::SALOME_Exception);
CORBA::Long getNumberOfNodes()
throw (SALOME::SALOME_Exception);
CORBA::Long getNumberOfTypes (SALOME_MED::medEntityMesh entity) CORBA::Long getNumberOfTypes(SALOME_MED::medEntityMesh entity)
throw (SALOME::SALOME_Exception); throw(SALOME::SALOME_Exception);
SALOME_MED::medGeometryElement_array* getTypes(SALOME_MED::medEntityMesh entity) SALOME_MED::medGeometryElement_array *
throw (SALOME::SALOME_Exception); getTypes(SALOME_MED::medEntityMesh entity) throw(SALOME::
SALOME_Exception);
CORBA::Long getNumberOfElements (SALOME_MED::medEntityMesh entity, CORBA::Long getNumberOfElements(SALOME_MED::medEntityMesh entity,
SALOME_MED::medGeometryElement geomElement) SALOME_MED::medGeometryElement geomElement)
throw (SALOME::SALOME_Exception); throw(SALOME::SALOME_Exception);
Engines::long_array* getConnectivity (SALOME_MED::medModeSwitch typeSwitch, Engines::long_array * getConnectivity(SALOME_MED::medModeSwitch typeSwitch,
SALOME_MED::medConnectivity mode, SALOME_MED::medConnectivity mode,
SALOME_MED::medEntityMesh entity, SALOME_MED::medEntityMesh entity,
SALOME_MED::medGeometryElement geomElement) SALOME_MED::medGeometryElement geomElement)
throw (SALOME::SALOME_Exception); throw(SALOME::SALOME_Exception);
Engines::long_array* getConnectivityIndex(SALOME_MED::medConnectivity mode, Engines::long_array * getConnectivityIndex(SALOME_MED::medConnectivity mode,
SALOME_MED::medEntityMesh entity) SALOME_MED::medEntityMesh entity) throw(SALOME::SALOME_Exception);
throw (SALOME::SALOME_Exception);
CORBA::Long getElementNumber(SALOME_MED::medConnectivity mode, CORBA::Long getElementNumber(SALOME_MED::medConnectivity mode,
SALOME_MED::medEntityMesh entity, SALOME_MED::medEntityMesh entity,
SALOME_MED::medGeometryElement type, SALOME_MED::medGeometryElement type,
const Engines::long_array & connectivity) const Engines::long_array & connectivity)
throw (SALOME::SALOME_Exception); throw(SALOME::SALOME_Exception);
Engines::long_array* getReverseConnectivity(SALOME_MED::medConnectivity mode) Engines::long_array *
getReverseConnectivity(SALOME_MED::medConnectivity mode) throw(SALOME::
throw (SALOME::SALOME_Exception); SALOME_Exception);
Engines::long_array* getReverseConnectivityIndex(SALOME_MED::medConnectivity mode) Engines::long_array *
throw (SALOME::SALOME_Exception); getReverseConnectivityIndex(SALOME_MED::
medConnectivity mode) throw(SALOME::SALOME_Exception);
// Family and Group // Family and Group
CORBA::Long getNumberOfFamilies (SALOME_MED::medEntityMesh entity) CORBA::Long getNumberOfFamilies(SALOME_MED::medEntityMesh entity)
throw (SALOME::SALOME_Exception); throw(SALOME::SALOME_Exception);
CORBA::Long getNumberOfGroups (SALOME_MED::medEntityMesh entity) CORBA::Long getNumberOfGroups(SALOME_MED::medEntityMesh entity)
throw (SALOME::SALOME_Exception); throw(SALOME::SALOME_Exception);
SALOME_MED::Family_array* getFamilies (SALOME_MED::medEntityMesh entity) SALOME_MED::Family_array * getFamilies(SALOME_MED::medEntityMesh entity)
throw (SALOME::SALOME_Exception); throw(SALOME::SALOME_Exception);
SALOME_MED::FAMILY_ptr getFamily (SALOME_MED::medEntityMesh entity, SALOME_MED::FAMILY_ptr getFamily(SALOME_MED::medEntityMesh entity,
CORBA::Long i) CORBA::Long i) throw(SALOME::SALOME_Exception);
throw (SALOME::SALOME_Exception); SALOME_MED::Group_array * getGroups(SALOME_MED::medEntityMesh entity)
SALOME_MED::Group_array* getGroups (SALOME_MED::medEntityMesh entity) throw(SALOME::SALOME_Exception);
throw (SALOME::SALOME_Exception); SALOME_MED::GROUP_ptr getGroup(SALOME_MED::medEntityMesh entity,
SALOME_MED::GROUP_ptr getGroup (SALOME_MED::medEntityMesh entity, CORBA::Long i) throw(SALOME::SALOME_Exception);
CORBA::Long i)
throw (SALOME::SALOME_Exception);
// //
SALOME_MED::FIELD_ptr getVolume (SALOME_MED::SUPPORT_ptr mySupport) SALOME_MED::FIELD_ptr getVolume(SALOME_MED::SUPPORT_ptr mySupport)
throw (SALOME::SALOME_Exception); throw(SALOME::SALOME_Exception);
SALOME_MED::FIELD_ptr getArea (SALOME_MED::SUPPORT_ptr mySupport) SALOME_MED::FIELD_ptr getArea(SALOME_MED::SUPPORT_ptr mySupport)
throw (SALOME::SALOME_Exception); throw(SALOME::SALOME_Exception);
SALOME_MED::FIELD_ptr getLength (SALOME_MED::SUPPORT_ptr mySupport) SALOME_MED::FIELD_ptr getLength(SALOME_MED::SUPPORT_ptr mySupport)
throw (SALOME::SALOME_Exception); throw(SALOME::SALOME_Exception);
SALOME_MED::FIELD_ptr getNormal (SALOME_MED::SUPPORT_ptr mySupport) SALOME_MED::FIELD_ptr getNormal(SALOME_MED::SUPPORT_ptr mySupport)
throw (SALOME::SALOME_Exception); throw(SALOME::SALOME_Exception);
SALOME_MED::FIELD_ptr getBarycenter (SALOME_MED::SUPPORT_ptr mySupport) SALOME_MED::FIELD_ptr getBarycenter(SALOME_MED::SUPPORT_ptr mySupport)
throw (SALOME::SALOME_Exception); throw(SALOME::SALOME_Exception);
SALOME_MED::FIELD_ptr getNeighbourhood (SALOME_MED::SUPPORT_ptr mySupport) SALOME_MED::FIELD_ptr getNeighbourhood(SALOME_MED::SUPPORT_ptr mySupport)
throw (SALOME::SALOME_Exception); throw(SALOME::SALOME_Exception);
// Others // Others
void addInStudy (SALOMEDS::Study_ptr myStudy, void addInStudy(SALOMEDS::Study_ptr myStudy,
SALOME_MED::MESH_ptr myIor) SALOME_MED::MESH_ptr myIor) throw(SALOME::SALOME_Exception);
throw (SALOME::SALOME_Exception); CORBA::Long addDriver(SALOME_MED::medDriverTypes driverType,
CORBA::Long addDriver (SALOME_MED::medDriverTypes driverType, const char *fileName, const char *meshName)
const char* fileName, const char* meshName) throw(SALOME::SALOME_Exception);
throw (SALOME::SALOME_Exception); void rmDriver(CORBA::Long i) throw(SALOME::SALOME_Exception);
void rmDriver (CORBA::Long i) void read(CORBA::Long i) throw(SALOME::SALOME_Exception);
throw (SALOME::SALOME_Exception); void write(CORBA::Long i, const char *driverMeshName)
void read (CORBA::Long i) throw(SALOME::SALOME_Exception);
throw (SALOME::SALOME_Exception);
void write (CORBA::Long i, const char* driverMeshName)
throw (SALOME::SALOME_Exception);
// Cuisine interne // Cuisine interne
CORBA::Long getCorbaIndex() throw (SALOME::SALOME_Exception); CORBA::Long getCorbaIndex() throw(SALOME::SALOME_Exception);
// //
void calculeNbElts() throw (SALOME::SALOME_Exception); void calculeNbElts() throw(SALOME::SALOME_Exception);
void createFamilies() throw (SALOME::SALOME_Exception); void createFamilies() throw(SALOME::SALOME_Exception);
}; };
#endif /* _MED_MESH_I_HXX_ */ #endif /* _MED_MESH_I_HXX_ */

View File

@ -31,7 +31,6 @@ using namespace std;
#include <TopoDS_Iterator.hxx> #include <TopoDS_Iterator.hxx>
#include "SMESHDS_Mesh.hxx" #include "SMESHDS_Mesh.hxx"
#include "SMDS_MapIteratorOfExtendedMap.hxx"
#include "SMESH_subMesh.hxx" #include "SMESH_subMesh.hxx"
#include "SMESH_Mesh_i.hxx" #include "SMESH_Mesh_i.hxx"
@ -53,16 +52,10 @@ SMESH_MEDSupport_i::SMESH_MEDSupport_i()
* Constructor * Constructor
*/ */
//============================================================================= //=============================================================================
SMESH_MEDSupport_i::SMESH_MEDSupport_i(SMESH_subMesh_i* sm, SMESH_MEDSupport_i::SMESH_MEDSupport_i(SMESH_subMesh_i * sm, string name,
string name, string description, SALOME_MED::medEntityMesh entity)
string description, :_subMesh_i(sm), _name(name), _description(description), _entity(entity),
SALOME_MED::medEntityMesh entity) : _seqNumber(false), _seqLength(0)
_subMesh_i(sm),
_name(name),
_description(description),
_entity(entity),
_seqNumber(false),
_seqLength(0)
{ {
BEGIN_OF("Constructor SMESH_MEDSupport_i"); BEGIN_OF("Constructor SMESH_MEDSupport_i");
@ -70,53 +63,57 @@ SMESH_MEDSupport_i::SMESH_MEDSupport_i(SMESH_subMesh_i* sm,
int subMeshId = _subMesh_i->GetId(); int subMeshId = _subMesh_i->GetId();
MESSAGE ( " subMeshId " << subMeshId ) MESSAGE(" subMeshId " << subMeshId)
if (_subMesh_i->_mesh_i->_mapSubMesh.find(subMeshId) != _subMesh_i->_mesh_i->_mapSubMesh.end()) {
::SMESH_subMesh* subMesh = _subMesh_i->_mesh_i->_mapSubMesh[subMeshId];
if (_subMesh_i->_mesh_i->_mapSubMesh.find(subMeshId) !=
_subMesh_i->_mesh_i->_mapSubMesh.end())
{
::SMESH_subMesh * subMesh = _subMesh_i->_mesh_i->_mapSubMesh[subMeshId];
_subMeshDS = subMesh->GetSubMeshDS(); _subMeshDS = subMesh->GetSubMeshDS();
} }
if ( _entity == SALOME_MED::MED_NODE) if (_entity == SALOME_MED::MED_NODE)
{ {
_numberOfGeometricType = 1 ; _numberOfGeometricType = 1;
_geometricType = new SALOME_MED::medGeometryElement[1] ; _geometricType = new SALOME_MED::medGeometryElement[1];
_geometricType[0] = SALOME_MED::MED_NONE ; _geometricType[0] = SALOME_MED::MED_NONE;
} }
else else
{ {
MESSAGE("Pas implemente dans cette version"); MESSAGE("Pas implemente dans cette version");
THROW_SALOME_CORBA_EXCEPTION("Seules les familles de noeuds sont implementees ", \ THROW_SALOME_CORBA_EXCEPTION
("Seules les familles de noeuds sont implementees ",
SALOME::BAD_PARAM); SALOME::BAD_PARAM);
} }
END_OF("Constructor SMESH_MEDSupport_i"); END_OF("Constructor SMESH_MEDSupport_i");
} }
//============================================================================= //=============================================================================
/*! /*!
* Constructor * Constructor
*/ */
//============================================================================= //=============================================================================
SMESH_MEDSupport_i::SMESH_MEDSupport_i(const SMESH_MEDSupport_i &s) : SMESH_MEDSupport_i::
_subMesh_i(s._subMesh_i), SMESH_MEDSupport_i(const SMESH_MEDSupport_i & s):_subMesh_i(s._subMesh_i),
_name(s._name), _name(s._name), _description(s._description), _entity(s._entity),
_description(s._description), _seqNumber(false), _seqLength(0)
_entity(s._entity),
_seqNumber(false),
_seqLength(0)
{ {
BEGIN_OF("Constructor SMESH_MEDSupport_i"); BEGIN_OF("Constructor SMESH_MEDSupport_i");
_meshDS = _subMesh_i->_mesh_i->GetImpl().GetMeshDS(); _meshDS = _subMesh_i->_mesh_i->GetImpl().GetMeshDS();
int subMeshId = _subMesh_i->GetId(); int subMeshId = _subMesh_i->GetId();
if (_subMesh_i->_mesh_i->_mapSubMesh.find(subMeshId) != _subMesh_i->_mesh_i->_mapSubMesh.end()) { if (_subMesh_i->_mesh_i->_mapSubMesh.find(subMeshId) !=
::SMESH_subMesh* subMesh = _subMesh_i->_mesh_i->_mapSubMesh[subMeshId]; _subMesh_i->_mesh_i->_mapSubMesh.end())
{
::SMESH_subMesh * subMesh = _subMesh_i->_mesh_i->_mapSubMesh[subMeshId];
_subMeshDS = subMesh->GetSubMeshDS(); _subMeshDS = subMesh->GetSubMeshDS();
} }
END_OF("Constructor SMESH_MEDSupport_i"); END_OF("Constructor SMESH_MEDSupport_i");
} }
//============================================================================= //=============================================================================
/*! /*!
* Destructor * Destructor
@ -126,21 +123,20 @@ SMESH_MEDSupport_i::SMESH_MEDSupport_i(const SMESH_MEDSupport_i &s) :
SMESH_MEDSupport_i::~SMESH_MEDSupport_i() SMESH_MEDSupport_i::~SMESH_MEDSupport_i()
{ {
} }
//============================================================================= //=============================================================================
/*! /*!
* CORBA: Accessor for Corba Index * CORBA: Accessor for Corba Index
*/ */
//============================================================================= //=============================================================================
CORBA::Long SMESH_MEDSupport_i::getCorbaIndex() CORBA::Long SMESH_MEDSupport_i::getCorbaIndex()throw(SALOME::SALOME_Exception)
throw (SALOME::SALOME_Exception)
{ {
if (_subMeshDS==NULL) if (_subMeshDS == NULL)
THROW_SALOME_CORBA_EXCEPTION("No associated Support", \ THROW_SALOME_CORBA_EXCEPTION("No associated Support",
SALOME::INTERNAL_ERROR); SALOME::INTERNAL_ERROR);
MESSAGE("Not implemented for SMESH_i"); MESSAGE("Not implemented for SMESH_i");
THROW_SALOME_CORBA_EXCEPTION("Not Implemented ", \ THROW_SALOME_CORBA_EXCEPTION("Not Implemented ", SALOME::BAD_PARAM);
SALOME::BAD_PARAM);
} }
@ -150,11 +146,10 @@ CORBA::Long SMESH_MEDSupport_i::getCorbaIndex()
*/ */
//============================================================================= //=============================================================================
char * SMESH_MEDSupport_i::getName() char *SMESH_MEDSupport_i::getName() throw(SALOME::SALOME_Exception)
throw (SALOME::SALOME_Exception)
{ {
if (_subMeshDS.IsNull()) if (_subMeshDS==NULL)
THROW_SALOME_CORBA_EXCEPTION("No associated Support", \ THROW_SALOME_CORBA_EXCEPTION("No associated Support",
SALOME::INTERNAL_ERROR); SALOME::INTERNAL_ERROR);
return CORBA::string_dup(_name.c_str()); return CORBA::string_dup(_name.c_str());
@ -166,11 +161,10 @@ char * SMESH_MEDSupport_i::getName()
*/ */
//============================================================================= //=============================================================================
char* SMESH_MEDSupport_i::getDescription() char *SMESH_MEDSupport_i::getDescription() throw(SALOME::SALOME_Exception)
throw (SALOME::SALOME_Exception)
{ {
if (_subMeshDS.IsNull()) if (_subMeshDS==NULL)
THROW_SALOME_CORBA_EXCEPTION("No associated Support", \ THROW_SALOME_CORBA_EXCEPTION("No associated Support",
SALOME::INTERNAL_ERROR); SALOME::INTERNAL_ERROR);
return CORBA::string_dup(_description.c_str()); return CORBA::string_dup(_description.c_str());
} }
@ -181,11 +175,11 @@ char* SMESH_MEDSupport_i::getDescription()
*/ */
//============================================================================= //=============================================================================
SALOME_MED::MESH_ptr SMESH_MEDSupport_i::getMesh() SALOME_MED::MESH_ptr SMESH_MEDSupport_i::getMesh()throw(SALOME::
throw (SALOME::SALOME_Exception) SALOME_Exception)
{ {
if (_subMeshDS.IsNull()) if (_subMeshDS==NULL)
THROW_SALOME_CORBA_EXCEPTION("No associated Support", \ THROW_SALOME_CORBA_EXCEPTION("No associated Support",
SALOME::INTERNAL_ERROR); SALOME::INTERNAL_ERROR);
return _subMesh_i->_mesh_i->GetMEDMesh(); return _subMesh_i->_mesh_i->GetMEDMesh();
@ -197,45 +191,34 @@ SALOME_MED::MESH_ptr SMESH_MEDSupport_i::getMesh()
*/ */
//============================================================================= //=============================================================================
CORBA::Boolean SMESH_MEDSupport_i::isOnAllElements() CORBA::Boolean SMESH_MEDSupport_i::isOnAllElements()throw(SALOME::
throw (SALOME::SALOME_Exception) SALOME_Exception)
{ {
if (_subMeshDS.IsNull()) if (_subMeshDS==NULL)
THROW_SALOME_CORBA_EXCEPTION("No associated Support", \ THROW_SALOME_CORBA_EXCEPTION("No associated Support",
SALOME::INTERNAL_ERROR); SALOME::INTERNAL_ERROR);
if (_seqNumber == false) if (_seqNumber == false)
{ {
if (_entity != SALOME_MED::MED_NONE) if (_entity != SALOME_MED::MED_NONE)
{ {
int i = 0; _seqLength = _subMeshDS->NbNodes();
const SMDS_MapOfMeshElement& myNodesMap = _subMeshDS->GetNodes(); _seqNumber = true;
for (SMDS_MapIteratorOfExtendedMap it(myNodesMap); it.More(); it.Next())
{
const Handle(SMDS_MeshElement)& elem = myNodesMap.FindID(it.Key()->GetID());
const Handle(SMDS_MeshNode)& node = _meshDS->GetNode(1,elem);
i ++;
}
_seqLength=i;
_seqNumber=true;
} }
else else
{ {
MESSAGE("Only Node Families are implemented "); MESSAGE("Only Node Families are implemented ");
THROW_SALOME_CORBA_EXCEPTION("Not implemented Yet ", \ THROW_SALOME_CORBA_EXCEPTION("Not implemented Yet ",
SALOME::BAD_PARAM); SALOME::BAD_PARAM);
} }
} }
try try
{ {
if (_seqLength == _meshDS->NbNodes()) _isOnAllElements = (_seqLength == _meshDS->NbNodes());
_isOnAllElements=true;
else
_isOnAllElements=false;
} }
catch(...) catch(...)
{ {
MESSAGE("unable to acces related Mesh"); MESSAGE("unable to acces related Mesh");
THROW_SALOME_CORBA_EXCEPTION("No associated Mesh", \ THROW_SALOME_CORBA_EXCEPTION("No associated Mesh",
SALOME::INTERNAL_ERROR); SALOME::INTERNAL_ERROR);
}; };
return _isOnAllElements; return _isOnAllElements;
@ -247,11 +230,11 @@ CORBA::Boolean SMESH_MEDSupport_i::isOnAllElements()
*/ */
//============================================================================= //=============================================================================
SALOME_MED::medEntityMesh SMESH_MEDSupport_i::getEntity() SALOME_MED::medEntityMesh SMESH_MEDSupport_i::getEntity()throw(SALOME::
throw (SALOME::SALOME_Exception) SALOME_Exception)
{ {
if (_subMeshDS.IsNull()) if (_subMeshDS==NULL)
THROW_SALOME_CORBA_EXCEPTION("No associated Support", \ THROW_SALOME_CORBA_EXCEPTION("No associated Support",
SALOME::INTERNAL_ERROR); SALOME::INTERNAL_ERROR);
return _entity; return _entity;
} }
@ -262,26 +245,27 @@ SALOME_MED::medEntityMesh SMESH_MEDSupport_i::getEntity()
*/ */
//============================================================================= //=============================================================================
SALOME_MED::medGeometryElement_array * SMESH_MEDSupport_i::getTypes() SALOME_MED::medGeometryElement_array *
throw (SALOME::SALOME_Exception) SMESH_MEDSupport_i::getTypes()throw(SALOME::SALOME_Exception)
{ {
if (_subMeshDS.IsNull()) if (_subMeshDS==NULL)
THROW_SALOME_CORBA_EXCEPTION("No associated Support", \ THROW_SALOME_CORBA_EXCEPTION("No associated Support",
SALOME::INTERNAL_ERROR); SALOME::INTERNAL_ERROR);
SALOME_MED::medGeometryElement_array_var myseq = new SALOME_MED::medGeometryElement_array; SALOME_MED::medGeometryElement_array_var myseq =
new SALOME_MED::medGeometryElement_array;
try try
{ {
int mySeqLength = _numberOfGeometricType; int mySeqLength = _numberOfGeometricType;
myseq->length(mySeqLength); myseq->length(mySeqLength);
for (int i=0;i<mySeqLength;i++) for (int i = 0; i < mySeqLength; i++)
{ {
myseq[i]=_geometricType[i]; myseq[i] = _geometricType[i];
} }
} }
catch(...) catch(...)
{ {
MESSAGE("Exception lors de la recherche des differents types"); MESSAGE("Exception lors de la recherche des differents types");
THROW_SALOME_CORBA_EXCEPTION("Unable to acces Support Types", \ THROW_SALOME_CORBA_EXCEPTION("Unable to acces Support Types",
SALOME::INTERNAL_ERROR); SALOME::INTERNAL_ERROR);
} }
return myseq._retn(); return myseq._retn();
@ -293,11 +277,11 @@ SALOME_MED::medGeometryElement_array * SMESH_MEDSupport_i::getTypes()
* existing in the support * existing in the support
*/ */
//============================================================================= //=============================================================================
CORBA::Long SMESH_MEDSupport_i::getNumberOfElements(SALOME_MED::medGeometryElement geomElement) CORBA::Long SMESH_MEDSupport_i::getNumberOfElements(SALOME_MED::
throw (SALOME::SALOME_Exception) medGeometryElement geomElement) throw(SALOME::SALOME_Exception)
{ {
if (_subMeshDS.IsNull()) if (_subMeshDS==NULL)
THROW_SALOME_CORBA_EXCEPTION("No associated Support", \ THROW_SALOME_CORBA_EXCEPTION("No associated Support",
SALOME::INTERNAL_ERROR); SALOME::INTERNAL_ERROR);
return _numberOfGeometricType; return _numberOfGeometricType;
@ -309,39 +293,38 @@ CORBA::Long SMESH_MEDSupport_i::getNumberOfElements(SALOME_MED::medGeometryEleme
*/ */
//============================================================================= //=============================================================================
Engines::long_array * SMESH_MEDSupport_i::getNumber(SALOME_MED::medGeometryElement geomElement) Engines::long_array * SMESH_MEDSupport_i::getNumber(
throw (SALOME::SALOME_Exception) SALOME_MED::medGeometryElement geomElement) throw(SALOME::SALOME_Exception)
{ {
if (_subMeshDS.IsNull()) if (_subMeshDS==NULL)
THROW_SALOME_CORBA_EXCEPTION("No associated Support", \ THROW_SALOME_CORBA_EXCEPTION("No associated Support",
SALOME::INTERNAL_ERROR); SALOME::INTERNAL_ERROR);
// A changer s'il ne s agit plus seulement de famille de noeuds // A changer s'il ne s agit plus seulement de famille de noeuds
if (geomElement != SALOME_MED::MED_NONE) if (geomElement != SALOME_MED::MED_NONE)
THROW_SALOME_CORBA_EXCEPTION("Not implemented", \ THROW_SALOME_CORBA_EXCEPTION("Not implemented", SALOME::BAD_PARAM);
SALOME::BAD_PARAM);
Engines::long_array_var myseq= new Engines::long_array; Engines::long_array_var myseq = new Engines::long_array;
int i =0; int i = 0;
const SMDS_MapOfMeshElement& myNodesMap = _subMeshDS->GetNodes(); myseq->length(_subMeshDS->NbNodes());
for (SMDS_MapIteratorOfExtendedMap it(myNodesMap); it.More(); it.Next()) const set<const SMDS_MeshNode*> & myNodesMap = _subMeshDS->GetNodes();
set<const SMDS_MeshNode*>::const_iterator it=myNodesMap.begin();
for (; it!=myNodesMap.end(); it++)
{ {
const Handle(SMDS_MeshElement)& elem = myNodesMap.FindID(it.Key()->GetID()); myseq[i] = (*it)->GetID();
const Handle(SMDS_MeshNode)& node = _meshDS->GetNode(1,elem); SCRUTE((*it)->GetID());
myseq->length(i+1); SCRUTE(myseq[i]);
myseq[i]=node->GetID();
SCRUTE(node->GetID());
SCRUTE(myseq[i]);
i++; i++;
}; };
SCRUTE(myseq->length()); SCRUTE(myseq->length());
MESSAGE("yyyyy"); MESSAGE("End of SMESH_MEDSupport_i::getNumber");
return myseq._retn(); return myseq._retn();
} }
//============================================================================= //=============================================================================
/*! /*!
* CORBA: Global Nodes Index (optionnaly designed by the user) * CORBA: Global Nodes Index (optionnaly designed by the user)
@ -349,12 +332,11 @@ MESSAGE("yyyyy");
*/ */
//============================================================================= //=============================================================================
Engines::long_array * SMESH_MEDSupport_i::getNumberIndex() Engines::long_array *
throw (SALOME::SALOME_Exception) SMESH_MEDSupport_i::getNumberIndex()throw(SALOME::SALOME_Exception)
{ {
MESSAGE("Not implemented for SMESH_i"); MESSAGE("Not implemented for SMESH_i");
THROW_SALOME_CORBA_EXCEPTION("Not Implemented", \ THROW_SALOME_CORBA_EXCEPTION("Not Implemented", SALOME::BAD_PARAM);
SALOME::BAD_PARAM);
return 0; return 0;
} }
@ -364,10 +346,9 @@ Engines::long_array * SMESH_MEDSupport_i::getNumberIndex()
*/ */
//============================================================================= //=============================================================================
CORBA::Long SMESH_MEDSupport_i::getNumberOfGaussPoints(SALOME_MED::medGeometryElement geomElement) CORBA::Long SMESH_MEDSupport_i::getNumberOfGaussPoints(SALOME_MED::
throw (SALOME::SALOME_Exception) medGeometryElement geomElement) throw(SALOME::SALOME_Exception)
{ {
MESSAGE("Not implemented for SMESH_i"); MESSAGE("Not implemented for SMESH_i");
return 0; return 0;
} }

View File

@ -41,21 +41,38 @@
class SMESH_subMesh_i; class SMESH_subMesh_i;
class SMESH_MEDSupport_i: class SMESH_MEDSupport_i:
public POA_SALOME_MED::SUPPORT, public POA_SALOME_MED::SUPPORT, public PortableServer::RefCountServantBase
public PortableServer::RefCountServantBase
{ {
public:
protected : // Constructors and associated internal methods
SMESH_MEDSupport_i(); SMESH_MEDSupport_i(SMESH_subMesh_i * sm,
~SMESH_MEDSupport_i(); string name, string description, SALOME_MED::medEntityMesh entity);
SMESH_MEDSupport_i(const SMESH_MEDSupport_i & s);
// IDL Methods
char *getName() throw(SALOME::SALOME_Exception);
char *getDescription() throw(SALOME::SALOME_Exception);
SALOME_MED::MESH_ptr getMesh() throw(SALOME::SALOME_Exception);
CORBA::Boolean isOnAllElements() throw(SALOME::SALOME_Exception);
SALOME_MED::medEntityMesh getEntity() throw(SALOME::SALOME_Exception);
CORBA::Long getNumberOfElements(SALOME_MED::medGeometryElement geomElement)
throw(SALOME::SALOME_Exception);
Engines::long_array * getNumber(SALOME_MED::medGeometryElement geomElement)
throw(SALOME::SALOME_Exception);
Engines::long_array * getNumberIndex() throw(SALOME::SALOME_Exception);
CORBA::Long getNumberOfGaussPoints(SALOME_MED::
medGeometryElement geomElement) throw(SALOME::SALOME_Exception);
SALOME_MED::medGeometryElement_array *
getTypes() throw(SALOME::SALOME_Exception);
CORBA::Long getCorbaIndex() throw(SALOME::SALOME_Exception);
void createSeq() throw(SALOME::SALOME_Exception);
public : public: //public field
const SMESHDS_SubMesh * _subMeshDS;
::SMESH_subMesh_i * _subMesh_i;
Handle_SMESHDS_SubMesh _subMeshDS; SMESHDS_Mesh * _meshDS;
::SMESH_subMesh_i* _subMesh_i;
Handle_SMESHDS_Mesh _meshDS;
string _name; string _name;
string _description; string _description;
bool _isOnAllElements; bool _isOnAllElements;
@ -66,36 +83,9 @@ public :
SALOME_MED::medGeometryElement * _geometricType; SALOME_MED::medGeometryElement * _geometricType;
int _numberOfGeometricType; int _numberOfGeometricType;
protected:
public: SMESH_MEDSupport_i();
~SMESH_MEDSupport_i();
// Constructors and associated internal methods
SMESH_MEDSupport_i(SMESH_subMesh_i* sm,
string name,
string description,
SALOME_MED::medEntityMesh entity);
SMESH_MEDSupport_i(const SMESH_MEDSupport_i & s);
// IDL Methods
char * getName() throw (SALOME::SALOME_Exception);
char * getDescription() throw (SALOME::SALOME_Exception);
SALOME_MED::MESH_ptr getMesh() throw (SALOME::SALOME_Exception);
CORBA::Boolean isOnAllElements() throw (SALOME::SALOME_Exception);
SALOME_MED::medEntityMesh getEntity() throw (SALOME::SALOME_Exception);
CORBA::Long getNumberOfElements(SALOME_MED::medGeometryElement geomElement)
throw (SALOME::SALOME_Exception);
Engines::long_array* getNumber(SALOME_MED::medGeometryElement geomElement)
throw (SALOME::SALOME_Exception);
Engines::long_array* getNumberIndex()
throw (SALOME::SALOME_Exception);
CORBA::Long getNumberOfGaussPoints(SALOME_MED::medGeometryElement geomElement)
throw (SALOME::SALOME_Exception);
SALOME_MED::medGeometryElement_array* getTypes()
throw (SALOME::SALOME_Exception);
CORBA::Long getCorbaIndex() throw (SALOME::SALOME_Exception);
void createSeq() throw (SALOME::SALOME_Exception);
}; };
#endif /* _MED_MEDSUPPORT_I_HXX_ */ #endif /* _MED_MEDSUPPORT_I_HXX_ */

View File

@ -29,9 +29,6 @@
using namespace std; using namespace std;
#include "SMESH_MeshEditor_i.hxx" #include "SMESH_MeshEditor_i.hxx"
#include "SMDS_MeshEdgesIterator.hxx"
#include "SMDS_MeshFacesIterator.hxx"
#include "SMDS_MeshVolumesIterator.hxx"
#include "SMDS_MeshEdge.hxx" #include "SMDS_MeshEdge.hxx"
#include "SMDS_MeshFace.hxx" #include "SMDS_MeshFace.hxx"
#include "SMDS_MeshVolume.hxx" #include "SMDS_MeshVolume.hxx"
@ -41,15 +38,14 @@ using namespace std;
#include <TColStd_MapOfInteger.hxx> #include <TColStd_MapOfInteger.hxx>
#include <TColStd_MapIteratorOfMapOfInteger.hxx> #include <TColStd_MapIteratorOfMapOfInteger.hxx>
//============================================================================= //=============================================================================
/*! /*!
* *
*/ */
//============================================================================= //=============================================================================
SMESH_MeshEditor_i::SMESH_MeshEditor_i(const Handle(SMESHDS_Mesh)& theMesh) { SMESH_MeshEditor_i::SMESH_MeshEditor_i(SMESHDS_Mesh* theMesh)
{
_myMeshDS = theMesh; _myMeshDS = theMesh;
}; };
@ -59,11 +55,14 @@ SMESH_MeshEditor_i::SMESH_MeshEditor_i(const Handle(SMESHDS_Mesh)& theMesh) {
*/ */
//============================================================================= //=============================================================================
CORBA::Boolean SMESH_MeshEditor_i::RemoveElements(const SMESH::long_array& IDsOfElements) { CORBA::Boolean SMESH_MeshEditor_i::RemoveElements(const SMESH::
for (int i = 0 ; i< IDsOfElements.length(); i++) { long_array & IDsOfElements)
{
for (int i = 0; i < IDsOfElements.length(); i++)
{
CORBA::Long index = IDsOfElements[i]; CORBA::Long index = IDsOfElements[i];
_myMeshDS->RemoveElement(index); _myMeshDS->RemoveElement(index);
MESSAGE ( "Element "<< index << " was removed" ) MESSAGE("Element " << index << " was removed")
} }
return true; return true;
}; };
@ -74,64 +73,21 @@ CORBA::Boolean SMESH_MeshEditor_i::RemoveElements(const SMESH::long_array& IDsOf
*/ */
//============================================================================= //=============================================================================
CORBA::Boolean SMESH_MeshEditor_i::RemoveNodes(const SMESH::long_array& IDsOfNodes) { CORBA::Boolean SMESH_MeshEditor_i::RemoveNodes(const SMESH::
long_array & IDsOfNodes)
// Here we try to collect all 1D, 2D and 3D elements which contain at least one {
// of <IDsOfNodes> in order to remove such elements.
// This seems correct since e.g a triangle without 1 vertex looks nonsense.
TColStd_MapOfInteger elemsToRemove;
for (int i = 0 ; i< IDsOfNodes.length(); i++) {
CORBA::Long ID = IDsOfNodes[i];
SMDS_MeshEdgesIterator edgeIt(_myMeshDS);
for (; edgeIt.More(); edgeIt.Next()) {
Handle(SMDS_MeshEdge) anEdge = Handle(SMDS_MeshEdge)::DownCast(edgeIt.Value());
for (Standard_Integer i = 0; i < anEdge->NbNodes(); i++) {
if (anEdge->GetConnection(i) == ID) {
Standard_Integer elemID = anEdge->GetID();
if (!elemsToRemove.Contains(elemID)) elemsToRemove.Add(elemID);
}
}
}
SMDS_MeshFacesIterator faceIt(_myMeshDS);
for (; faceIt.More(); faceIt.Next()) {
Handle(SMDS_MeshFace) aFace = Handle(SMDS_MeshFace)::DownCast(faceIt.Value());
for (Standard_Integer i = 0; i < aFace->NbNodes(); i++) {
if (aFace->GetConnection(i) == ID) {
Standard_Integer elemID = aFace->GetID();
if (!elemsToRemove.Contains(elemID)) elemsToRemove.Add(elemID);
}
}
}
SMDS_MeshVolumesIterator volIt(_myMeshDS);
for (; volIt.More(); volIt.Next()) {
Handle(SMDS_MeshVolume) aVol = Handle(SMDS_MeshVolume)::DownCast(volIt.Value());
for (Standard_Integer i = 0; i < aVol->NbNodes(); i++) {
if (aVol->GetConnection(i) == ID) {
Standard_Integer elemID = aVol->GetID();
if (!elemsToRemove.Contains(elemID)) elemsToRemove.Add(elemID);
}
}
}
}
// Now remove them!
TColStd_MapIteratorOfMapOfInteger it(elemsToRemove);
for (; it.More(); it.Next()) {
Standard_Integer elemID = it.Key();
_myMeshDS->RemoveElement(elemID);
MESSAGE("RemoveNodes(): element removed: " << elemID)
}
// It's nodes' turn to die // It's nodes' turn to die
for (int i = 0 ; i< IDsOfNodes.length(); i++) { for (int i = 0; i < IDsOfNodes.length(); i++)
CORBA::Long index = IDsOfNodes[i]; {
_myMeshDS->RemoveNode(index); const SMDS_MeshNode * node=_myMeshDS->FindNode(IDsOfNodes[i]);
MESSAGE ( "Node "<< index << " was removed" ) if(node==NULL)
{
MESSAGE("SMESH_MeshEditor_i::RemoveNodes: Node "<<IDsOfNodes[i]
<<" not found");
continue;
}
_myMeshDS->RemoveNode(IDsOfNodes[i]);
MESSAGE("Node " << index << " was removed")
} }
return true; return true;
}; };
@ -142,12 +98,14 @@ CORBA::Boolean SMESH_MeshEditor_i::RemoveNodes(const SMESH::long_array& IDsOfNod
*/ */
//============================================================================= //=============================================================================
CORBA::Boolean SMESH_MeshEditor_i::AddEdge(const SMESH::long_array& IDsOfNodes) { CORBA::Boolean SMESH_MeshEditor_i::AddEdge(const SMESH::long_array & IDsOfNodes)
{
int NbNodes = IDsOfNodes.length(); int NbNodes = IDsOfNodes.length();
if ( NbNodes == 2 ) { if (NbNodes == 2)
{
CORBA::Long index1 = IDsOfNodes[0]; CORBA::Long index1 = IDsOfNodes[0];
CORBA::Long index2 = IDsOfNodes[1]; CORBA::Long index2 = IDsOfNodes[1];
int idTri = _myMeshDS->AddEdge(index1,index2); _myMeshDS->AddEdge(index1, index2);
} }
return true; return true;
} }
@ -159,12 +117,11 @@ CORBA::Boolean SMESH_MeshEditor_i::AddEdge(const SMESH::long_array& IDsOfNodes)
//============================================================================= //=============================================================================
CORBA::Boolean SMESH_MeshEditor_i::AddNode(CORBA::Double x, CORBA::Boolean SMESH_MeshEditor_i::AddNode(CORBA::Double x,
CORBA::Double y, CORBA::Double y, CORBA::Double z)
CORBA::Double z) { {
MESSAGE( " AddNode " << x << " , " << y << " , " << z ) MESSAGE(" AddNode " << x << " , " << y << " , " << z)
int idNode = _myMeshDS->AddNode(x,y,z); int idNode = _myMeshDS->AddNode(x, y, z)->GetID();
MESSAGE( " idNode " << idNode ) MESSAGE(" idNode " << idNode) return true;
return true;
} }
//============================================================================= //=============================================================================
@ -173,19 +130,23 @@ CORBA::Boolean SMESH_MeshEditor_i::AddNode(CORBA::Double x,
*/ */
//============================================================================= //=============================================================================
CORBA::Boolean SMESH_MeshEditor_i::AddFace(const SMESH::long_array& IDsOfNodes) { CORBA::Boolean SMESH_MeshEditor_i::AddFace(const SMESH::long_array & IDsOfNodes)
{
int NbNodes = IDsOfNodes.length(); int NbNodes = IDsOfNodes.length();
if ( NbNodes == 3 ) { if (NbNodes == 3)
{
CORBA::Long index1 = IDsOfNodes[0]; CORBA::Long index1 = IDsOfNodes[0];
CORBA::Long index2 = IDsOfNodes[1]; CORBA::Long index2 = IDsOfNodes[1];
CORBA::Long index3 = IDsOfNodes[2]; CORBA::Long index3 = IDsOfNodes[2];
int idTri = _myMeshDS->AddFace(index1,index2,index3); _myMeshDS->AddFace(index1, index2, index3);
} else if ( NbNodes == 4 ) { }
else if (NbNodes == 4)
{
CORBA::Long index1 = IDsOfNodes[0]; CORBA::Long index1 = IDsOfNodes[0];
CORBA::Long index2 = IDsOfNodes[1]; CORBA::Long index2 = IDsOfNodes[1];
CORBA::Long index3 = IDsOfNodes[2]; CORBA::Long index3 = IDsOfNodes[2];
CORBA::Long index4 = IDsOfNodes[3]; CORBA::Long index4 = IDsOfNodes[3];
int idTri = _myMeshDS->AddFace(index1,index2,index3,index4); _myMeshDS->AddFace(index1, index2, index3, index4);
} }
return true; return true;
}; };
@ -196,30 +157,39 @@ CORBA::Boolean SMESH_MeshEditor_i::AddFace(const SMESH::long_array& IDsOfNodes)
*/ */
//============================================================================= //=============================================================================
CORBA::Boolean SMESH_MeshEditor_i::AddVolume(const SMESH::long_array& IDsOfNodes) { CORBA::Boolean SMESH_MeshEditor_i::AddVolume(const SMESH::
long_array & IDsOfNodes)
{
int NbNodes = IDsOfNodes.length(); int NbNodes = IDsOfNodes.length();
if ( NbNodes == 4 ) { if (NbNodes == 4)
{
CORBA::Long index1 = IDsOfNodes[0]; CORBA::Long index1 = IDsOfNodes[0];
CORBA::Long index2 = IDsOfNodes[1]; CORBA::Long index2 = IDsOfNodes[1];
CORBA::Long index3 = IDsOfNodes[2]; CORBA::Long index3 = IDsOfNodes[2];
CORBA::Long index4 = IDsOfNodes[3]; CORBA::Long index4 = IDsOfNodes[3];
int idTetra = _myMeshDS->AddVolume(index1,index2,index3,index4); _myMeshDS->AddVolume(index1, index2, index3, index4);
} else if ( NbNodes == 5 ) { }
else if (NbNodes == 5)
{
CORBA::Long index1 = IDsOfNodes[0]; CORBA::Long index1 = IDsOfNodes[0];
CORBA::Long index2 = IDsOfNodes[1]; CORBA::Long index2 = IDsOfNodes[1];
CORBA::Long index3 = IDsOfNodes[2]; CORBA::Long index3 = IDsOfNodes[2];
CORBA::Long index4 = IDsOfNodes[3]; CORBA::Long index4 = IDsOfNodes[3];
CORBA::Long index5 = IDsOfNodes[4]; CORBA::Long index5 = IDsOfNodes[4];
int idPyramid = _myMeshDS->AddVolume(index1,index2,index3,index4,index5); _myMeshDS->AddVolume(index1, index2, index3, index4, index5);
} else if ( NbNodes == 6 ) { }
else if (NbNodes == 6)
{
CORBA::Long index1 = IDsOfNodes[0]; CORBA::Long index1 = IDsOfNodes[0];
CORBA::Long index2 = IDsOfNodes[1]; CORBA::Long index2 = IDsOfNodes[1];
CORBA::Long index3 = IDsOfNodes[2]; CORBA::Long index3 = IDsOfNodes[2];
CORBA::Long index4 = IDsOfNodes[3]; CORBA::Long index4 = IDsOfNodes[3];
CORBA::Long index5 = IDsOfNodes[4]; CORBA::Long index5 = IDsOfNodes[4];
CORBA::Long index6 = IDsOfNodes[5]; CORBA::Long index6 = IDsOfNodes[5];
int idPrism = _myMeshDS->AddVolume(index1,index2,index3,index4,index5,index6); _myMeshDS->AddVolume(index1, index2, index3, index4, index5, index6);
} else if ( NbNodes == 8 ) { }
else if (NbNodes == 8)
{
CORBA::Long index1 = IDsOfNodes[0]; CORBA::Long index1 = IDsOfNodes[0];
CORBA::Long index2 = IDsOfNodes[1]; CORBA::Long index2 = IDsOfNodes[1];
CORBA::Long index3 = IDsOfNodes[2]; CORBA::Long index3 = IDsOfNodes[2];
@ -228,7 +198,8 @@ CORBA::Boolean SMESH_MeshEditor_i::AddVolume(const SMESH::long_array& IDsOfNodes
CORBA::Long index6 = IDsOfNodes[5]; CORBA::Long index6 = IDsOfNodes[5];
CORBA::Long index7 = IDsOfNodes[6]; CORBA::Long index7 = IDsOfNodes[6];
CORBA::Long index8 = IDsOfNodes[7]; CORBA::Long index8 = IDsOfNodes[7];
int idHexa = _myMeshDS->AddVolume(index1,index2,index3,index4,index5,index6,index7,index8); _myMeshDS->AddVolume(index1, index2, index3, index4, index5, index6,
index7, index8);
} }
return true; return true;
}; };

View File

@ -34,30 +34,27 @@
#include "SMESHDS_Mesh.hxx" #include "SMESHDS_Mesh.hxx"
class SMESH_MeshEditor_i: public POA_SMESH::SMESH_MeshEditor
class SMESH_MeshEditor_i:
public POA_SMESH::SMESH_MeshEditor
{ {
public: public:
SMESH_MeshEditor_i(const Handle(SMESHDS_Mesh)& theMesh); SMESH_MeshEditor_i(SMESHDS_Mesh * theMesh);
virtual ~SMESH_MeshEditor_i() {}; virtual ~ SMESH_MeshEditor_i()
{
};
// --- CORBA // --- CORBA
CORBA::Boolean RemoveElements(const SMESH::long_array& IDsOfElements); CORBA::Boolean RemoveElements(const SMESH::long_array & IDsOfElements);
CORBA::Boolean RemoveNodes(const SMESH::long_array& IDsOfNodes); CORBA::Boolean RemoveNodes(const SMESH::long_array & IDsOfNodes);
CORBA::Boolean AddNode(CORBA::Double x, CORBA::Boolean AddNode(CORBA::Double x, CORBA::Double y, CORBA::Double z);
CORBA::Double y, CORBA::Boolean AddEdge(const SMESH::long_array & IDsOfNodes);
CORBA::Double z); CORBA::Boolean AddFace(const SMESH::long_array & IDsOfNodes);
CORBA::Boolean AddEdge(const SMESH::long_array& IDsOfNodes); CORBA::Boolean AddVolume(const SMESH::long_array & IDsOfNodes);
CORBA::Boolean AddFace(const SMESH::long_array& IDsOfNodes);
CORBA::Boolean AddVolume(const SMESH::long_array& IDsOfNodes);
private: private:
SMESH::SMESH_subMesh_var _myMesh; SMESH::SMESH_subMesh_var _myMesh;
Handle (SMESHDS_Mesh) _myMeshDS; SMESHDS_Mesh *_myMeshDS;
}; };
#endif #endif

View File

@ -26,7 +26,6 @@
// Module : SMESH // Module : SMESH
// $Header$ // $Header$
using namespace std;
using namespace std; using namespace std;
#include "SMESH_Mesh_i.hxx" #include "SMESH_Mesh_i.hxx"
#include "SMESH_subMesh_i.hxx" #include "SMESH_subMesh_i.hxx"
@ -40,22 +39,12 @@ using namespace std;
#include "OpUtil.hxx" #include "OpUtil.hxx"
#include "TCollection_AsciiString.hxx" #include "TCollection_AsciiString.hxx"
// #include "SMESHDS_ListOfAsciiString.hxx"
// #include "SMESHDS_ListIteratorOfListOfAsciiString.hxx"
#include "TColStd_ListOfInteger.hxx"
#include "TColStd_ListOfReal.hxx"
#include "TColStd_ListIteratorOfListOfInteger.hxx"
#include "TColStd_ListIteratorOfListOfReal.hxx"
#include "SMESHDS_Command.hxx" #include "SMESHDS_Command.hxx"
#include "SMESHDS_CommandType.hxx" #include "SMESHDS_CommandType.hxx"
#include "SMESHDS_ListOfCommand.hxx"
#include "SMESHDS_ListIteratorOfListOfCommand.hxx"
#include "Handle_SMESHDS_Command.hxx"
#include "SMESH_MeshEditor_i.hxx" #include "SMESH_MeshEditor_i.hxx"
#include <string> #include <string>
#include <iostream> #include <iostream>
//#include <sstream>
//**** SMESHDS en champ //**** SMESHDS en champ
@ -77,10 +66,8 @@ SMESH_Mesh_i::SMESH_Mesh_i()
*/ */
//============================================================================= //=============================================================================
SMESH_Mesh_i::SMESH_Mesh_i(SMESH_Gen_i* gen_i, SMESH_Mesh_i::SMESH_Mesh_i(SMESH_Gen_i * gen_i,
GEOM::GEOM_Gen_ptr geomEngine, GEOM::GEOM_Gen_ptr geomEngine, CORBA::Long studyId, int localId)
CORBA::Long studyId,
int localId)
{ {
MESSAGE("SMESH_Mesh_i"); MESSAGE("SMESH_Mesh_i");
_gen_i = gen_i; _gen_i = gen_i;
@ -101,7 +88,6 @@ SMESH_Mesh_i::~SMESH_Mesh_i()
// **** // ****
}; };
//============================================================================= //=============================================================================
/*! /*!
* *
@ -109,33 +95,31 @@ SMESH_Mesh_i::~SMESH_Mesh_i()
//============================================================================= //=============================================================================
CORBA::Boolean SMESH_Mesh_i::AddHypothesis(GEOM::GEOM_Shape_ptr aSubShape, CORBA::Boolean SMESH_Mesh_i::AddHypothesis(GEOM::GEOM_Shape_ptr aSubShape,
SMESH::SMESH_Hypothesis_ptr anHyp) SMESH::SMESH_Hypothesis_ptr anHyp) throw(SALOME::SALOME_Exception)
throw (SALOME::SALOME_Exception)
{ {
MESSAGE("AddHypothesis"); MESSAGE("AddHypothesis");
// **** proposer liste de subShape (selection multiple) // **** proposer liste de subShape (selection multiple)
GEOM::GEOM_Shape_var mySubShape = GEOM::GEOM_Shape::_narrow(aSubShape); GEOM::GEOM_Shape_var mySubShape = GEOM::GEOM_Shape::_narrow(aSubShape);
if (CORBA::is_nil(mySubShape)) if (CORBA::is_nil(mySubShape))
THROW_SALOME_CORBA_EXCEPTION("bad subShape reference", \ THROW_SALOME_CORBA_EXCEPTION("bad subShape reference",
SALOME::BAD_PARAM); SALOME::BAD_PARAM);
SMESH::SMESH_Hypothesis_var myHyp = SMESH::SMESH_Hypothesis::_narrow(anHyp); SMESH::SMESH_Hypothesis_var myHyp = SMESH::SMESH_Hypothesis::_narrow(anHyp);
if (CORBA::is_nil(myHyp)) if (CORBA::is_nil(myHyp))
THROW_SALOME_CORBA_EXCEPTION("bad hypothesis reference", \ THROW_SALOME_CORBA_EXCEPTION("bad hypothesis reference",
SALOME::BAD_PARAM); SALOME::BAD_PARAM);
bool ret = false; bool ret = false;
try try
{ {
TopoDS_Shape myLocSubShape= TopoDS_Shape myLocSubShape =
_gen_i->_ShapeReader->GetShape(_geom,mySubShape); _gen_i->_ShapeReader->GetShape(_geom, mySubShape);
int hypId = myHyp->GetId(); int hypId = myHyp->GetId();
ret = _impl->AddHypothesis(myLocSubShape, hypId); ret = _impl->AddHypothesis(myLocSubShape, hypId);
} }
catch (SALOME_Exception& S_ex) catch(SALOME_Exception & S_ex)
{ {
THROW_SALOME_CORBA_EXCEPTION(S_ex.what(), \ THROW_SALOME_CORBA_EXCEPTION(S_ex.what(), SALOME::BAD_PARAM);
SALOME::BAD_PARAM);
} }
return ret; return ret;
}; };
@ -147,35 +131,33 @@ CORBA::Boolean SMESH_Mesh_i::AddHypothesis(GEOM::GEOM_Shape_ptr aSubShape,
//============================================================================= //=============================================================================
CORBA::Boolean CORBA::Boolean
SMESH_Mesh_i::RemoveHypothesis(GEOM::GEOM_Shape_ptr aSubShape, SMESH_Mesh_i::RemoveHypothesis(GEOM::GEOM_Shape_ptr aSubShape,
SMESH::SMESH_Hypothesis_ptr anHyp) SMESH::SMESH_Hypothesis_ptr anHyp) throw(SALOME::SALOME_Exception)
throw (SALOME::SALOME_Exception)
{ {
MESSAGE("RemoveHypothesis"); MESSAGE("RemoveHypothesis");
// **** proposer liste de subShape (selection multiple) // **** proposer liste de subShape (selection multiple)
GEOM::GEOM_Shape_var mySubShape = GEOM::GEOM_Shape::_narrow(aSubShape); GEOM::GEOM_Shape_var mySubShape = GEOM::GEOM_Shape::_narrow(aSubShape);
if (CORBA::is_nil(mySubShape)) if (CORBA::is_nil(mySubShape))
THROW_SALOME_CORBA_EXCEPTION("bad subShape reference", \ THROW_SALOME_CORBA_EXCEPTION("bad subShape reference",
SALOME::BAD_PARAM); SALOME::BAD_PARAM);
SMESH::SMESH_Hypothesis_var myHyp = SMESH::SMESH_Hypothesis::_narrow(anHyp); SMESH::SMESH_Hypothesis_var myHyp = SMESH::SMESH_Hypothesis::_narrow(anHyp);
if (CORBA::is_nil(myHyp)) if (CORBA::is_nil(myHyp))
THROW_SALOME_CORBA_EXCEPTION("bad hypothesis reference", \ THROW_SALOME_CORBA_EXCEPTION("bad hypothesis reference",
SALOME::BAD_PARAM); SALOME::BAD_PARAM);
bool ret = false; bool ret = false;
try try
{ {
TopoDS_Shape myLocSubShape= TopoDS_Shape myLocSubShape =
_gen_i->_ShapeReader->GetShape(_geom,mySubShape); _gen_i->_ShapeReader->GetShape(_geom, mySubShape);
int hypId = myHyp->GetId(); int hypId = myHyp->GetId();
ret = _impl->RemoveHypothesis(myLocSubShape, hypId); ret = _impl->RemoveHypothesis(myLocSubShape, hypId);
} }
catch (SALOME_Exception& S_ex) catch(SALOME_Exception & S_ex)
{ {
THROW_SALOME_CORBA_EXCEPTION(S_ex.what(), \ THROW_SALOME_CORBA_EXCEPTION(S_ex.what(), SALOME::BAD_PARAM);
SALOME::BAD_PARAM);
} }
return ret; return ret;
}; };
@ -186,9 +168,9 @@ SMESH_Mesh_i::RemoveHypothesis(GEOM::GEOM_Shape_ptr aSubShape,
*/ */
//============================================================================= //=============================================================================
SMESH::ListOfHypothesis* SMESH::ListOfHypothesis *
SMESH_Mesh_i::GetHypothesisList(GEOM::GEOM_Shape_ptr aSubShape) SMESH_Mesh_i::GetHypothesisList(GEOM::GEOM_Shape_ptr aSubShape)
throw (SALOME::SALOME_Exception) throw(SALOME::SALOME_Exception)
{ {
MESSAGE("GetHypothesisList"); MESSAGE("GetHypothesisList");
// **** // ****
@ -199,26 +181,25 @@ SMESH_Mesh_i::GetHypothesisList(GEOM::GEOM_Shape_ptr aSubShape)
* *
*/ */
//============================================================================= //=============================================================================
SMESH::SMESH_subMesh_ptr SMESH_Mesh_i::GetElementsOnShape(GEOM::GEOM_Shape_ptr aSubShape) SMESH::SMESH_subMesh_ptr SMESH_Mesh_i::GetElementsOnShape(GEOM::
throw (SALOME::SALOME_Exception) GEOM_Shape_ptr aSubShape) throw(SALOME::SALOME_Exception)
{ {
MESSAGE("SMESH_Mesh_i::GetElementsOnShape"); MESSAGE("SMESH_Mesh_i::GetElementsOnShape");
GEOM::GEOM_Shape_var mySubShape = GEOM::GEOM_Shape::_narrow(aSubShape); GEOM::GEOM_Shape_var mySubShape = GEOM::GEOM_Shape::_narrow(aSubShape);
if (CORBA::is_nil(mySubShape)) if (CORBA::is_nil(mySubShape))
THROW_SALOME_CORBA_EXCEPTION("bad subShape reference", \ THROW_SALOME_CORBA_EXCEPTION("bad subShape reference",
SALOME::BAD_PARAM); SALOME::BAD_PARAM);
int subMeshId = 0; int subMeshId = 0;
try try
{ {
SMESH_subMesh_i* subMeshServant; SMESH_subMesh_i *subMeshServant;
TopoDS_Shape myLocSubShape TopoDS_Shape myLocSubShape
= _gen_i->_ShapeReader->GetShape(_geom,mySubShape); = _gen_i->_ShapeReader->GetShape(_geom, mySubShape);
//Get or Create the SMESH_subMesh object implementation //Get or Create the SMESH_subMesh object implementation
::SMESH_subMesh * mySubMesh ::SMESH_subMesh * mySubMesh = _impl->GetSubMesh(myLocSubShape);
= _impl->GetSubMesh(myLocSubShape);
subMeshId = mySubMesh->GetId(); subMeshId = mySubMesh->GetId();
// create a new subMesh object servant if there is none for the shape // create a new subMesh object servant if there is none for the shape
@ -240,7 +221,7 @@ SMESH::SMESH_subMesh_ptr SMESH_Mesh_i::GetElementsOnShape(GEOM::GEOM_Shape_ptr a
= SMESH::SMESH_subMesh::_duplicate(subMesh); = SMESH::SMESH_subMesh::_duplicate(subMesh);
} }
} }
catch (SALOME_Exception& S_ex) catch(SALOME_Exception & S_ex)
{ {
THROW_SALOME_CORBA_EXCEPTION(S_ex.what(), SALOME::BAD_PARAM); THROW_SALOME_CORBA_EXCEPTION(S_ex.what(), SALOME::BAD_PARAM);
} }
@ -255,58 +236,59 @@ SMESH::SMESH_subMesh_ptr SMESH_Mesh_i::GetElementsOnShape(GEOM::GEOM_Shape_ptr a
*/ */
//============================================================================= //=============================================================================
SMESH::log_array* SMESH_Mesh_i::GetLog(CORBA::Boolean clearAfterGet) SMESH::log_array * SMESH_Mesh_i::GetLog(CORBA::Boolean clearAfterGet)
throw (SALOME::SALOME_Exception) throw(SALOME::SALOME_Exception)
{ {
MESSAGE("SMESH_Mesh_i::GetLog"); MESSAGE("SMESH_Mesh_i::GetLog");
SMESH::log_array_var aLog; SMESH::log_array_var aLog;
try try
{ {
const SMESHDS_ListOfCommand& logDS =_impl->GetLog(); list < SMESHDS_Command * >logDS = _impl->GetLog();
aLog = new SMESH::log_array; aLog = new SMESH::log_array;
int indexLog = 0; int indexLog = 0;
int lg = logDS.Extent(); int lg = logDS.size();
SCRUTE(lg); SCRUTE(lg);
aLog->length(lg); aLog->length(lg);
SMESHDS_ListIteratorOfListOfCommand its(logDS); list < SMESHDS_Command * >::iterator its = logDS.begin();
while(its.More()) while (its != logDS.end())
{ {
Handle(SMESHDS_Command) com = its.Value(); SMESHDS_Command *com = *its;
int comType = com->GetType(); int comType = com->GetType();
//SCRUTE(comType); //SCRUTE(comType);
int lgcom = com->GetNumber(); int lgcom = com->GetNumber();
//SCRUTE(lgcom); //SCRUTE(lgcom);
const TColStd_ListOfInteger& intList = com->GetIndexes(); const list < int >&intList = com->GetIndexes();
int inum = intList.Extent(); int inum = intList.size();
//SCRUTE(inum); //SCRUTE(inum);
TColStd_ListIteratorOfListOfInteger ii(intList); list < int >::const_iterator ii = intList.begin();
const TColStd_ListOfReal& coordList = com->GetCoords(); const list < double >&coordList = com->GetCoords();
int rnum = coordList.Extent(); int rnum = coordList.size();
//SCRUTE(rnum); //SCRUTE(rnum);
TColStd_ListIteratorOfListOfReal ir(coordList); list < double >::const_iterator ir = coordList.begin();
aLog[indexLog].commandType = comType; aLog[indexLog].commandType = comType;
aLog[indexLog].number = lgcom; aLog[indexLog].number = lgcom;
aLog[indexLog].coords.length(rnum); aLog[indexLog].coords.length(rnum);
aLog[indexLog].indexes.length(inum); aLog[indexLog].indexes.length(inum);
for (int i=0; i<rnum; i++) for (int i = 0; i < rnum; i++)
{ {
aLog[indexLog].coords[i] = ir.Value(); aLog[indexLog].coords[i] = *ir;
//MESSAGE(" "<<i<<" "<<ir.Value()); //MESSAGE(" "<<i<<" "<<ir.Value());
ir.Next(); ir++;
} }
for (int i=0; i<inum; i++) for (int i = 0; i < inum; i++)
{ {
aLog[indexLog].indexes[i] = ii.Value(); aLog[indexLog].indexes[i] = *ii;
//MESSAGE(" "<<i<<" "<<ii.Value()); //MESSAGE(" "<<i<<" "<<ii.Value());
ii.Next(); ii++;
} }
indexLog++; indexLog++;
its.Next(); its++;
} }
if (clearAfterGet) _impl->ClearLog(); if (clearAfterGet)
_impl->ClearLog();
} }
catch (SALOME_Exception& S_ex) catch(SALOME_Exception & S_ex)
{ {
THROW_SALOME_CORBA_EXCEPTION(S_ex.what(), SALOME::BAD_PARAM); THROW_SALOME_CORBA_EXCEPTION(S_ex.what(), SALOME::BAD_PARAM);
} }
@ -437,8 +419,7 @@ SMESH::log_array* SMESH_Mesh_i::GetLog(CORBA::Boolean clearAfterGet)
*/ */
//============================================================================= //=============================================================================
void SMESH_Mesh_i::ClearLog() void SMESH_Mesh_i::ClearLog() throw(SALOME::SALOME_Exception)
throw (SALOME::SALOME_Exception)
{ {
MESSAGE("SMESH_Mesh_i::ClearLog"); MESSAGE("SMESH_Mesh_i::ClearLog");
// **** // ****
@ -450,8 +431,7 @@ void SMESH_Mesh_i::ClearLog()
*/ */
//============================================================================= //=============================================================================
CORBA::Long SMESH_Mesh_i::GetId() CORBA::Long SMESH_Mesh_i::GetId()throw(SALOME::SALOME_Exception)
throw (SALOME::SALOME_Exception)
{ {
MESSAGE("SMESH_Mesh_i::GetId"); MESSAGE("SMESH_Mesh_i::GetId");
return _id; return _id;
@ -463,18 +443,18 @@ CORBA::Long SMESH_Mesh_i::GetId()
*/ */
//============================================================================= //=============================================================================
CORBA::Long SMESH_Mesh_i::GetStudyId() CORBA::Long SMESH_Mesh_i::GetStudyId()throw(SALOME::SALOME_Exception)
throw (SALOME::SALOME_Exception)
{ {
return _studyId; return _studyId;
} }
//============================================================================= //=============================================================================
/*! /*!
* *
*/ */
//============================================================================= //=============================================================================
void SMESH_Mesh_i::SetImpl(::SMESH_Mesh* impl) void SMESH_Mesh_i::SetImpl(::SMESH_Mesh * impl)
{ {
MESSAGE("SMESH_Mesh_i::SetImpl"); MESSAGE("SMESH_Mesh_i::SetImpl");
_impl = impl; _impl = impl;
@ -486,7 +466,7 @@ void SMESH_Mesh_i::SetImpl(::SMESH_Mesh* impl)
*/ */
//============================================================================= //=============================================================================
::SMESH_Mesh& SMESH_Mesh_i::GetImpl() ::SMESH_Mesh & SMESH_Mesh_i::GetImpl()
{ {
MESSAGE("SMESH_Mesh_i::GetImpl()"); MESSAGE("SMESH_Mesh_i::GetImpl()");
return *_impl; return *_impl;
@ -514,7 +494,7 @@ void SMESH_Mesh_i::SetIor(SMESH::SMESH_Mesh_ptr myIor)
{ {
MESSAGE("SMESH_Mesh_i::SetIor"); MESSAGE("SMESH_Mesh_i::SetIor");
_myIor = SMESH::SMESH_Mesh::_duplicate(myIor); _myIor = SMESH::SMESH_Mesh::_duplicate(myIor);
ASSERT(! CORBA::is_nil(_myIor)); ASSERT(!CORBA::is_nil(_myIor));
} }
//============================================================================= //=============================================================================
@ -526,9 +506,10 @@ void SMESH_Mesh_i::SetIor(SMESH::SMESH_Mesh_ptr myIor)
SMESH::SMESH_Mesh_ptr SMESH_Mesh_i::GetIor() SMESH::SMESH_Mesh_ptr SMESH_Mesh_i::GetIor()
{ {
MESSAGE("SMESH_Mesh_i::GetIor"); MESSAGE("SMESH_Mesh_i::GetIor");
ASSERT(! CORBA::is_nil(_myIor)); ASSERT(!CORBA::is_nil(_myIor));
return SMESH::SMESH_Mesh::_duplicate(_myIor); return SMESH::SMESH_Mesh::_duplicate(_myIor);
} }
//============================================================================= //=============================================================================
/*! /*!
* *
@ -537,7 +518,8 @@ SMESH::SMESH_Mesh_ptr SMESH_Mesh_i::GetIor()
SMESH::SMESH_MeshEditor_ptr SMESH_Mesh_i::GetMeshEditor() SMESH::SMESH_MeshEditor_ptr SMESH_Mesh_i::GetMeshEditor()
{ {
SMESH_MeshEditor_i* aMeshEditor = new SMESH_MeshEditor_i(_impl->GetMeshDS()); SMESH_MeshEditor_i *aMeshEditor =
new SMESH_MeshEditor_i(_impl->GetMeshDS());
SMESH::SMESH_MeshEditor_var aMesh = aMeshEditor->_this(); SMESH::SMESH_MeshEditor_var aMesh = aMeshEditor->_this();
return aMesh._retn(); return aMesh._retn();
} }
@ -548,33 +530,28 @@ SMESH::SMESH_MeshEditor_ptr SMESH_Mesh_i::GetMeshEditor()
*/ */
//============================================================================= //=============================================================================
void SMESH_Mesh_i::ExportMED( const char* file ) void SMESH_Mesh_i::ExportMED(const char *file) throw(SALOME::SALOME_Exception)
throw (SALOME::SALOME_Exception)
{ {
_impl->ExportMED( file ); _impl->ExportMED(file);
} }
void SMESH_Mesh_i::ExportDAT( const char* file ) void SMESH_Mesh_i::ExportDAT(const char *file) throw(SALOME::SALOME_Exception)
throw (SALOME::SALOME_Exception)
{ {
_impl->ExportDAT( file ); _impl->ExportDAT(file);
} }
void SMESH_Mesh_i::ExportUNV( const char* file ) void SMESH_Mesh_i::ExportUNV(const char *file) throw(SALOME::SALOME_Exception)
throw (SALOME::SALOME_Exception)
{ {
_impl->ExportUNV( file ); _impl->ExportUNV(file);
} }
//============================================================================= //=============================================================================
/*! /*!
* *
*/ */
//============================================================================= //=============================================================================
SALOME_MED::MESH_ptr SMESH_Mesh_i::GetMEDMesh() SALOME_MED::MESH_ptr SMESH_Mesh_i::GetMEDMesh()throw(SALOME::SALOME_Exception)
throw (SALOME::SALOME_Exception)
{ {
SMESH_MEDMesh_i* aMedMesh = new SMESH_MEDMesh_i( this ); SMESH_MEDMesh_i *aMedMesh = new SMESH_MEDMesh_i(this);
SALOME_MED::MESH_var aMesh = aMedMesh->_this(); SALOME_MED::MESH_var aMesh = aMedMesh->_this();
return aMesh._retn(); return aMesh._retn();
} }
@ -584,8 +561,7 @@ SALOME_MED::MESH_ptr SMESH_Mesh_i::GetMEDMesh()
* *
*/ */
//============================================================================= //=============================================================================
CORBA::Long SMESH_Mesh_i::NbNodes() CORBA::Long SMESH_Mesh_i::NbNodes()throw(SALOME::SALOME_Exception)
throw (SALOME::SALOME_Exception)
{ {
return _impl->NbNodes(); return _impl->NbNodes();
} }
@ -595,8 +571,7 @@ CORBA::Long SMESH_Mesh_i::NbNodes()
* *
*/ */
//============================================================================= //=============================================================================
CORBA::Long SMESH_Mesh_i::NbEdges() CORBA::Long SMESH_Mesh_i::NbEdges()throw(SALOME::SALOME_Exception)
throw (SALOME::SALOME_Exception)
{ {
return _impl->NbEdges(); return _impl->NbEdges();
} }
@ -606,18 +581,17 @@ CORBA::Long SMESH_Mesh_i::NbEdges()
* *
*/ */
//============================================================================= //=============================================================================
CORBA::Long SMESH_Mesh_i::NbFaces() CORBA::Long SMESH_Mesh_i::NbFaces()throw(SALOME::SALOME_Exception)
throw (SALOME::SALOME_Exception)
{ {
return _impl->NbFaces(); return _impl->NbFaces();
} }
CORBA::Long SMESH_Mesh_i::NbTriangles()
throw (SALOME::SALOME_Exception) CORBA::Long SMESH_Mesh_i::NbTriangles()throw(SALOME::SALOME_Exception)
{ {
return _impl->NbTriangles(); return _impl->NbTriangles();
} }
CORBA::Long SMESH_Mesh_i::NbQuadrangles()
throw (SALOME::SALOME_Exception) CORBA::Long SMESH_Mesh_i::NbQuadrangles()throw(SALOME::SALOME_Exception)
{ {
return _impl->NbQuadrangles(); return _impl->NbQuadrangles();
} }
@ -627,18 +601,17 @@ CORBA::Long SMESH_Mesh_i::NbQuadrangles()
* *
*/ */
//============================================================================= //=============================================================================
CORBA::Long SMESH_Mesh_i::NbVolumes() CORBA::Long SMESH_Mesh_i::NbVolumes()throw(SALOME::SALOME_Exception)
throw (SALOME::SALOME_Exception)
{ {
return _impl->NbVolumes(); return _impl->NbVolumes();
} }
CORBA::Long SMESH_Mesh_i::NbTetras()
throw (SALOME::SALOME_Exception) CORBA::Long SMESH_Mesh_i::NbTetras()throw(SALOME::SALOME_Exception)
{ {
return _impl->NbTetras(); return _impl->NbTetras();
} }
CORBA::Long SMESH_Mesh_i::NbHexas()
throw (SALOME::SALOME_Exception) CORBA::Long SMESH_Mesh_i::NbHexas()throw(SALOME::SALOME_Exception)
{ {
return _impl->NbHexas(); return _impl->NbHexas();
} }
@ -648,8 +621,7 @@ CORBA::Long SMESH_Mesh_i::NbHexas()
* *
*/ */
//============================================================================= //=============================================================================
CORBA::Long SMESH_Mesh_i::NbSubMesh() CORBA::Long SMESH_Mesh_i::NbSubMesh()throw(SALOME::SALOME_Exception)
throw (SALOME::SALOME_Exception)
{ {
return _impl->NbSubMesh(); return _impl->NbSubMesh();
} }