//================================================================================
void SMESHGUI::update( const int flags )
{
- if ( flags & UF_Viewer | flags & UF_Forced )
+ if ( (flags & UF_Viewer) | (flags & UF_Forced) )
SMESH::UpdateView();
else
SalomeApp_Module::update( flags );
if ( myPattern->_is_nil() )
myPattern = SMESH::GetPattern();
- if ( myMesh->_is_nil() && mySubMesh->_is_nil() || myGeomObj->_is_nil() )
+ if ( (myMesh->_is_nil() && mySubMesh->_is_nil()) || myGeomObj->_is_nil() )
return false;
SMESH::SMESH_Mesh_ptr aMesh = mySubMesh->_is_nil() ? myMesh.in() : mySubMesh->GetFather();
//if (myMesh->_is_nil() || MeshCheck->isChecked() && myIDSource->_is_nil() ||
// !myMeshActor || myPathMesh->_is_nil() || myPathShape->_is_nil())
- if ( myMesh->_is_nil() || MeshCheck->isChecked() && myIDSource->_is_nil() ||
+ if ( myMesh->_is_nil() || (MeshCheck->isChecked() && myIDSource->_is_nil()) ||
/*!myMeshActor ||*/ myPath->_is_nil() )
return false;
const SMDS_MeshElement* e = aMesh->FindElement(ind);
if (e) {
// check also type of element
- bool typeMatch = Elements1dRB->isChecked() && e->GetType() == SMDSAbs_Edge ||
- Elements2dRB->isChecked() && e->GetType() == SMDSAbs_Face;
+ bool typeMatch = (Elements1dRB->isChecked() && e->GetType() == SMDSAbs_Edge) ||
+ (Elements2dRB->isChecked() && e->GetType() == SMDSAbs_Face);
if (typeMatch)
newIndices.Add(e->GetID());
}
//=================================================================================
bool SMESHGUI_ExtrusionAlongPathDlg::isValuesValid() {
- if ( MeshCheck->isChecked() && myIDSource->_is_nil() ||
+ if ( (MeshCheck->isChecked() && myIDSource->_is_nil()) ||
myMesh->_is_nil() ||
myPath->_is_nil() )
return false;
if (bOk) {
const SMDS_MeshElement* e = aMesh->FindElement(ind);
if (e) {
- bool typeMatch = Elements1dRB->isChecked() && e->GetType() == SMDSAbs_Edge ||
- Elements2dRB->isChecked() && e->GetType() == SMDSAbs_Face;
+ bool typeMatch = (Elements1dRB->isChecked() && e->GetType() == SMDSAbs_Edge) ||
+ (Elements2dRB->isChecked() && e->GetType() == SMDSAbs_Face);
if (typeMatch)
anElementsId[ j++ ] = ind;
}
QList<int> ids;
if ((isRefine() &&
(myMesh->_is_nil() || !getIds(ids) || getNode(false) < 0 ||
- myType == Type_3d && (getNode(true) < 0 || getNode(false) == getNode(true))))
+ (myType == Type_3d && (getNode(true) < 0 || getNode(false) == getNode(true)))))
||
(!isRefine() &&
(myMesh->_is_nil() || myMeshShape->_is_nil() || myGeomObj[ Object ]->_is_nil() ||
- myGeomObj[ Vertex1 ]->_is_nil() || myType == Type_3d && myGeomObj[ Vertex2 ]->_is_nil())))
+ myGeomObj[ Vertex1 ]->_is_nil() || (myType == Type_3d && myGeomObj[ Vertex2 ]->_is_nil()))))
{
if (theMess)
SUIT_MessageBox::information(this, tr("SMESH_INSUFFICIENT_DATA"),
SMESH::SMESH_Pattern_var aPattern = SMESH::GetPattern();
if (!aPattern->LoadFromFile(theName.toLatin1().data()) ||
- myType == Type_2d && !aPattern->Is2D()) {
+ (myType == Type_2d && !aPattern->Is2D())) {
SMESH::SMESH_Pattern::ErrorCode aCode = aPattern->GetErrorCode();
QString aMess;
if (aCode == SMESH::SMESH_Pattern::ERR_READ_NB_POINTS ) aMess = tr("ERR_READ_NB_POINTS");
for ( ; anIter.More(); anIter.Next()) {
SMESH::SMESH_GroupBase_var aGroup =
SMESH::IObjectToInterface<SMESH::SMESH_GroupBase>(anIter.Value());
- if (!aGroup->_is_nil() && (aGroup->GetType() == SMESH::FACE &&
- entityType() == 0 || aGroup->GetType() == SMESH::VOLUME &&
- entityType() == 1)) {
+ if (!aGroup->_is_nil() && ((aGroup->GetType() == SMESH::FACE && entityType() == 0) ||
+ (aGroup->GetType() == SMESH::VOLUME && entityType() == 1))) {
if (aGroup->GetMesh()->GetId() == myMesh->GetId()) {
SMESH::long_array_var anIds = aGroup->GetListOfID();
for (int i = 0, n = anIds->length(); i < n; i++) {
}
return ( theOtherOp &&
- ( theOtherOp->inherits("SMESHGUI_Operation") &&
- ( !anOps.contains(theOtherOp->metaObject()->className() ) ||
- anOps.contains(metaObject()->className()) ) ) ||
- ( theOtherOp->inherits("LightApp_ShowHideOp") ) );
+ ( ( theOtherOp->inherits("SMESHGUI_Operation") && ( !anOps.contains(theOtherOp->metaObject()->className() ) || anOps.contains(metaObject()->className()) ) ) ||
+ ( theOtherOp->inherits("LightApp_ShowHideOp") ) ) );
return true;
}
}
SMESH::UpdateView();
- if ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() ||
+ if ( (MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked()) ||
actionButton == MAKE_MESH_BUTTON )
mySMESHGUI->updateObjBrowser(true); // new groups may appear
Init(false);
}
SMESH::UpdateView();
- if ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() ||
+ if ( (MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked()) ||
actionButton == MAKE_MESH_BUTTON )
mySMESHGUI->updateObjBrowser(true); // new groups may appear
Init(false);
const SMDS_MeshElement* elem = it->next();
if (elem->GetType() == SMDSAbs_Face &&
emap.find(elem) != emap.end())
+ {
if (theTria1) {
theTria2 = elem;
break;
} else {
theTria1 = elem;
}
+ }
}
return (theTria1 && theTria2);
}
int edgeInd = 2, i;
for (i = 0, it = tria1->nodesIterator(); it->more(); i++) {
a3Nodes[ i ] = static_cast<const SMDS_MeshNode*>(it->next());
- if (i > 0 && ( a3Nodes[ i ] == aNode1 && a3Nodes[ i - 1] == aNode2 ||
- a3Nodes[ i ] == aNode2 && a3Nodes[ i - 1] == aNode1 ) ) {
+ if (i > 0 && ( (a3Nodes[ i ] == aNode1 && a3Nodes[ i - 1] == aNode2) ||
+ (a3Nodes[ i ] == aNode2 && a3Nodes[ i - 1] == aNode1) ) ) {
edgeInd = i - 1;
break;
}
}
SMESH::UpdateView();
- if ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() ||
+ if (( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked()) ||
actionButton == MAKE_MESH_BUTTON )
mySMESHGUI->updateObjBrowser(true); // new groups may appear
Init(false);
}
SMESH::UpdateView();
- if ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() ||
+ if ( (MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked()) ||
actionButton == MAKE_MESH_BUTTON )
mySMESHGUI->updateObjBrowser(true); // new groups may appear
Init(false);
SMESH_subMesh* sm = anIt->first;
SMESH_ComputeErrorPtr& error = sm->GetComputeError();
const SMESH_Algo* algo = myGen.GetAlgo( myLocMesh, sm->GetSubShape());
- if ( algo && !error.get() || error->IsOK() )
+ if ( (algo && !error.get()) || error->IsOK() )
error.reset( new SMESH_ComputeError( COMPERR_ALGO_FAILED,"Failed to evaluate",algo));
}
else
//=============================================================================
/*!
* CORBA: Returns number of elements of type medGeometryElement
- * Not implemented for MED_ALL_ELEMENTS
+ * Not implemented for MEDMEM_ALL_ELEMENTS
* implemented for MED_ALL_ENTITIES
*
* Dans cette implementation, il n est pas prevu de tenir compte du entity
if (_mesh_i == 0)
THROW_SALOME_CORBA_EXCEPTION("No associated Mesh",
SALOME::INTERNAL_ERROR);
- if (geomElement == SALOME_MED::MED_ALL_ELEMENTS)
- THROW_SALOME_CORBA_EXCEPTION("Not implemented for MED_ALL_ELEMENTS",
+ if (geomElement == SALOME_MED::MEDMEM_ALL_ELEMENTS)
+ THROW_SALOME_CORBA_EXCEPTION("Not implemented for MEDMEM_ALL_ELEMENTS",
SALOME::BAD_PARAM);
if (!_compte)
calculeNbElts();
*/
//=============================================================================
void SMESH_MEDMesh_i::addInStudy(SALOMEDS::Study_ptr myStudy,
- SALOME_MED::MESH_ptr myIor) throw(SALOME::SALOME_Exception)
+ SALOME_MED::GMESH_ptr myIor) throw(SALOME::SALOME_Exception)
{
BEGIN_OF("MED_Mesh_i::addInStudy");
if (_meshId != "")
_compte = true;
_mapNbTypes[SALOME_MED::MED_NODE] = 1;
- // On compte les aretes MED_SEG2 ou MED_SEG3
+ // On compte les aretes MEDMEM_SEG2 ou MEDMEM_SEG3
// On range les elements dans les vecteurs correspondants
- _mapIndToSeqElts[SALOME_MED::MED_SEG2] = _indexElts++;
- _mapIndToSeqElts[SALOME_MED::MED_SEG3] = _indexElts++;
+ _mapIndToSeqElts[SALOME_MED::MEDMEM_SEG2] = _indexElts++;
+ _mapIndToSeqElts[SALOME_MED::MEDMEM_SEG3] = _indexElts++;
_mapIndToVectTypes[SALOME_MED::MED_EDGE] = _indexEnts++;
int trouveSeg2 = 0;
{
case 2:
{
- medElement = SALOME_MED::MED_SEG2;
+ medElement = SALOME_MED::MEDMEM_SEG2;
if (trouveSeg2 == 0)
{
trouveSeg2 = 1;
_TypesId[SALOME_MED::MED_EDGE].
- push_back(SALOME_MED::MED_SEG2);
+ push_back(SALOME_MED::MEDMEM_SEG2);
}
break;
}
case 3:
{
- medElement = SALOME_MED::MED_SEG3;
+ medElement = SALOME_MED::MEDMEM_SEG3;
if (trouveSeg3 == 0)
{
trouveSeg3 = 1;
_TypesId[SALOME_MED::MED_EDGE].
- push_back(SALOME_MED::MED_SEG3);
+ push_back(SALOME_MED::MEDMEM_SEG3);
}
break;
}
_mapNbTypes[SALOME_MED::MED_EDGE] = trouveSeg2 + trouveSeg3;
- // On compte les faces MED_TRIA3, MED_HEXA8, MED_TRIA6
+ // On compte les faces MEDMEM_TRIA3, MEDMEM_HEXA8, MEDMEM_TRIA6
// On range les elements dans les vecteurs correspondants
int trouveTria3 = 0;
int trouveTria6 = 0;
int trouveQuad4 = 0;
- _mapIndToSeqElts[SALOME_MED::MED_TRIA3] = _indexElts++;
- _mapIndToSeqElts[SALOME_MED::MED_TRIA6] = _indexElts++;
- _mapIndToSeqElts[SALOME_MED::MED_QUAD4] = _indexElts++;
+ _mapIndToSeqElts[SALOME_MED::MEDMEM_TRIA3] = _indexElts++;
+ _mapIndToSeqElts[SALOME_MED::MEDMEM_TRIA6] = _indexElts++;
+ _mapIndToSeqElts[SALOME_MED::MEDMEM_QUAD4] = _indexElts++;
_mapIndToVectTypes[SALOME_MED::MED_FACE] = _indexEnts++;
SMDS_FaceIteratorPtr itFaces=_meshDS->facesIterator();
{
case 3:
{
- medElement = SALOME_MED::MED_TRIA3;
+ medElement = SALOME_MED::MEDMEM_TRIA3;
if (trouveTria3 == 0)
{
trouveTria3 = 1;
_TypesId[SALOME_MED::MED_FACE].
- push_back(SALOME_MED::MED_TRIA3);
+ push_back(SALOME_MED::MEDMEM_TRIA3);
}
break;
}
case 4:
{
- medElement = SALOME_MED::MED_QUAD4;
+ medElement = SALOME_MED::MEDMEM_QUAD4;
if (trouveQuad4 == 0)
{
trouveQuad4 = 1;
_TypesId[SALOME_MED::MED_FACE].
- push_back(SALOME_MED::MED_QUAD4);
+ push_back(SALOME_MED::MEDMEM_QUAD4);
}
break;
}
case 6:
{
- medElement = SALOME_MED::MED_TRIA6;
+ medElement = SALOME_MED::MEDMEM_TRIA6;
if (trouveTria6 == 0)
{
trouveTria6 = 1;
_TypesId[SALOME_MED::MED_FACE].
- push_back(SALOME_MED::MED_TRIA6);
+ push_back(SALOME_MED::MEDMEM_TRIA6);
}
break;
}
_mapNbTypes[SALOME_MED::MED_FACE] =
trouveTria3 + trouveTria6 + trouveQuad4;
- _mapIndToSeqElts[SALOME_MED::MED_HEXA8] = _indexElts++;
+ _mapIndToSeqElts[SALOME_MED::MEDMEM_HEXA8] = _indexElts++;
_mapIndToVectTypes[SALOME_MED::MED_CELL] = _indexEnts++;
int index = _mapIndToSeqElts[medElement];
const SMDS_MeshVolume * elem = itVolumes->next();
int nb_of_nodes = elem->NbNodes();
- medElement = SALOME_MED::MED_HEXA8;
+ medElement = SALOME_MED::MEDMEM_HEXA8;
ASSERT(nb_of_nodes == 8);
if (trouveHexa8 == 0)
{
trouveHexa8 = 1;
- _TypesId[SALOME_MED::MED_CELL].push_back(SALOME_MED::MED_HEXA8);
+ _TypesId[SALOME_MED::MED_CELL].push_back(SALOME_MED::MEDMEM_HEXA8);
};
// Traitement de la maille
int longueur = _seq_elemId[index]->length();
* Gives informations of the considered mesh.
*/
//=============================================================================
-SALOME_MED::MESH::meshInfos * SMESH_MEDMesh_i::getMeshGlobal()
+SALOME_MED::GMESH::meshInfos * SMESH_MEDMesh_i::getMeshGlobal()
throw (SALOME::SALOME_Exception)
{
MESSAGE("!!!! NOT YET IMPLEMENTED !!!!!");
return NULL;
}
+
+//================================================================================
+/*!
+ * \brief Converts this GMESH into MESH
+ */
+//================================================================================
+
+SALOME_MED::MESH_ptr SMESH_MEDMesh_i::convertInMESH() throw (SALOME::SALOME_Exception)
+{
+ MESSAGE("!!!! NOT YET IMPLEMENTED !!!!!");
+
+ THROW_SALOME_CORBA_EXCEPTION("Unimplemented Method", SALOME::BAD_PARAM);
+
+ return NULL;
+}
+
//=============================================================================
/*!
* Gives informations on coordinates of the considered mesh.
*/
//=============================================================================
-SALOME_MED::MESH::coordinateInfos * SMESH_MEDMesh_i::getCoordGlobal()
+SALOME_MED::GMESH::coordinateInfos * SMESH_MEDMesh_i::getCoordGlobal()
throw (SALOME::SALOME_Exception)
{
MESSAGE("!!!! NOT YET IMPLEMENTED !!!!!");
void setProtocol(SALOME::TypeOfCommunication typ) {}
void release() {}
SALOME::SenderDouble_ptr getSenderForCoordinates(SALOME_MED::medModeSwitch) {return SALOME::SenderDouble::_nil();}
- SALOME::SenderInt_ptr getSenderForConnectivity(SALOME_MED::medModeSwitch,
- SALOME_MED::medConnectivity,
+ SALOME::SenderInt_ptr getSenderForConnectivity(SALOME_MED::medConnectivity,
SALOME_MED::medEntityMesh,
SALOME_MED::medGeometryElement)
{
return SALOME::SenderInt::_nil();
- }
+ }
+ SALOME::SenderInt_ptr getSenderForConnectivityIndex(SALOME_MED::medConnectivity,
+ SALOME_MED::medEntityMesh,
+ SALOME_MED::medGeometryElement)
+ {
+ return SALOME::SenderInt::_nil();
+ }
SALOME::SenderInt_ptr getSenderForPolygonsConnectivity(SALOME_MED::medConnectivity, SALOME_MED::medEntityMesh) {return SALOME::SenderInt::_nil();}
SALOME::SenderInt_ptr getSenderForPolygonsConnectivityIndex(SALOME_MED::medConnectivity, SALOME_MED::medEntityMesh) {return SALOME::SenderInt::_nil();}
SALOME::SenderInt_ptr getSenderForPolyhedronConnectivity(SALOME_MED::medConnectivity) {return SALOME::SenderInt::_nil();}
SALOME_MED::medGeometryElement geomElement)
throw(SALOME::SALOME_Exception);
+ SALOME_TYPES::ListOfLong *
+ getConnectivity(SALOME_MED::medConnectivity mode,
+ SALOME_MED::medEntityMesh entity,
+ SALOME_MED::medGeometryElement geomElement)
+ throw(SALOME::SALOME_Exception);
+
SALOME_TYPES::ListOfLong *
getConnectivityIndex(SALOME_MED::medConnectivity mode,
SALOME_MED::medEntityMesh entity)
// Others
void addInStudy(SALOMEDS::Study_ptr myStudy,
- SALOME_MED::MESH_ptr myIor)
+ SALOME_MED::GMESH_ptr myIor)
throw(SALOME::SALOME_Exception);
CORBA::Long addDriver(SALOME_MED::medDriverTypes driverType,
const char *fileName, const char *meshName)
CORBA::Long getCorbaIndex()
throw(SALOME::SALOME_Exception);
- SALOME_MED::MESH::meshInfos * getMeshGlobal()
+ SALOME_MED::GMESH::meshInfos * getMeshGlobal()
throw (SALOME::SALOME_Exception);
- bool areEquals(SALOME_MED::MESH_ptr other) { return false;};
+ bool areEquals(SALOME_MED::GMESH_ptr other) { return false;};
+
+ SALOME_MED::MESH_ptr convertInMESH() throw (SALOME::SALOME_Exception);
- SALOME_MED::MESH::coordinateInfos * getCoordGlobal()
+ SALOME_MED::GMESH::coordinateInfos * getCoordGlobal()
throw (SALOME::SALOME_Exception);
SALOME_MED::MESH::connectivityInfos *
{
_numberOfGeometricType = 1;
_geometricType = new SALOME_MED::medGeometryElement[1];
- _geometricType[0] = SALOME_MED::MED_NONE;
+ _geometricType[0] = SALOME_MED::MEDMEM_NONE;
}
else
{
*/
//=============================================================================
-SALOME_MED::MESH_ptr SMESH_MEDSupport_i::getMesh()throw(SALOME::
+SALOME_MED::GMESH_ptr SMESH_MEDSupport_i::getMesh()throw(SALOME::
SALOME_Exception)
{
if (_subMeshDS==NULL)
SALOME::INTERNAL_ERROR);
if (_seqNumber == false)
{
- if (_entity != SALOME_MED::MED_NONE)
+ if (_entity != SALOME_MED::MEDMEM_NONE)
{
_seqLength = _subMeshDS->NbNodes();
_seqNumber = true;
SALOME::INTERNAL_ERROR);
// A changer s'il ne s agit plus seulement de famille de noeuds
- if (geomElement != SALOME_MED::MED_NONE)
+ if (geomElement != SALOME_MED::MEDMEM_NONE)
THROW_SALOME_CORBA_EXCEPTION("Not implemented", SALOME::BAD_PARAM);
SALOME_TYPES::ListOfLong_var myseq = new SALOME_TYPES::ListOfLong;
// IDL Methods
char *getName() throw(SALOME::SALOME_Exception);
char *getDescription() throw(SALOME::SALOME_Exception);
- SALOME_MED::MESH_ptr getMesh() throw(SALOME::SALOME_Exception);
+ SALOME_MED::GMESH_ptr getMesh() throw(SALOME::SALOME_Exception);
CORBA::Boolean isOnAllElements() throw(SALOME::SALOME_Exception);
SALOME_MED::medEntityMesh getEntity() throw(SALOME::SALOME_Exception);
CORBA::Long
// No sense in returning ids of elements along with ids of nodes:
// when theElemType == SMESH::ALL, return node ids only if
// there are no elements
- if ( theElemType == SMESH::NODE || theElemType == SMESH::ALL && nbElements == 0 )
+ if ( theElemType == SMESH::NODE || (theElemType == SMESH::ALL && nbElements == 0) )
return GetNodesId();
aResult->length( nbElements );
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
- SALOME_MED::MESH_var MEDMesh = GetFather()->GetMEDMesh();
+ SALOME_MED::GMESH_var MEDMesh = GetFather()->GetMEDMesh();
SALOME_MED::Family_array_var families =
MEDMesh->getFamilies(SALOME_MED::MED_NODE);