mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-11-15 10:08:34 +05:00
Merge from PortingMED3 07Apr11
This commit is contained in:
parent
ffc4f7e618
commit
790c5cfa90
@ -419,7 +419,7 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
PMeshInfo aMeshInfo = myMed->CrMeshInfo(aMeshDimension,aMeshName);
|
PMeshInfo aMeshInfo = myMed->CrMeshInfo(aMeshDimension,aMeshDimension,aMeshName);
|
||||||
MESSAGE("Add - aMeshName : "<<aMeshName<<"; "<<aMeshInfo->GetName());
|
MESSAGE("Add - aMeshName : "<<aMeshName<<"; "<<aMeshInfo->GetName());
|
||||||
myMed->SetMeshInfo(aMeshInfo);
|
myMed->SetMeshInfo(aMeshInfo);
|
||||||
|
|
||||||
|
@ -4662,7 +4662,7 @@ void SMESHGUI::preferencesChanged( const QString& sect, const QString& name )
|
|||||||
//================================================================================
|
//================================================================================
|
||||||
void SMESHGUI::update( const int flags )
|
void SMESHGUI::update( const int flags )
|
||||||
{
|
{
|
||||||
if ( flags & UF_Viewer | flags & UF_Forced )
|
if ( (flags & UF_Viewer) | (flags & UF_Forced) )
|
||||||
SMESH::UpdateView();
|
SMESH::UpdateView();
|
||||||
else
|
else
|
||||||
SalomeApp_Module::update( flags );
|
SalomeApp_Module::update( flags );
|
||||||
|
@ -533,7 +533,7 @@ bool SMESHGUI_CreatePatternDlg::loadFromObject( const bool theMess )
|
|||||||
if ( myPattern->_is_nil() )
|
if ( myPattern->_is_nil() )
|
||||||
myPattern = SMESH::GetPattern();
|
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;
|
return false;
|
||||||
|
|
||||||
SMESH::SMESH_Mesh_ptr aMesh = mySubMesh->_is_nil() ? myMesh.in() : mySubMesh->GetFather();
|
SMESH::SMESH_Mesh_ptr aMesh = mySubMesh->_is_nil() ? myMesh.in() : mySubMesh->GetFather();
|
||||||
|
@ -492,7 +492,7 @@ bool SMESHGUI_ExtrusionAlongPathDlg::ClickOnApply()
|
|||||||
|
|
||||||
//if (myMesh->_is_nil() || MeshCheck->isChecked() && myIDSource->_is_nil() ||
|
//if (myMesh->_is_nil() || MeshCheck->isChecked() && myIDSource->_is_nil() ||
|
||||||
// !myMeshActor || myPathMesh->_is_nil() || myPathShape->_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() )
|
/*!myMeshActor ||*/ myPath->_is_nil() )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@ -755,8 +755,8 @@ void SMESHGUI_ExtrusionAlongPathDlg::onTextChange (const QString& theNewText)
|
|||||||
const SMDS_MeshElement* e = aMesh->FindElement(ind);
|
const SMDS_MeshElement* e = aMesh->FindElement(ind);
|
||||||
if (e) {
|
if (e) {
|
||||||
// check also type of element
|
// check also type of element
|
||||||
bool typeMatch = Elements1dRB->isChecked() && e->GetType() == SMDSAbs_Edge ||
|
bool typeMatch = (Elements1dRB->isChecked() && e->GetType() == SMDSAbs_Edge) ||
|
||||||
Elements2dRB->isChecked() && e->GetType() == SMDSAbs_Face;
|
(Elements2dRB->isChecked() && e->GetType() == SMDSAbs_Face);
|
||||||
if (typeMatch)
|
if (typeMatch)
|
||||||
newIndices.Add(e->GetID());
|
newIndices.Add(e->GetID());
|
||||||
}
|
}
|
||||||
@ -1273,7 +1273,7 @@ void SMESHGUI_ExtrusionAlongPathDlg::updateLinearAngles()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
bool SMESHGUI_ExtrusionAlongPathDlg::isValuesValid() {
|
bool SMESHGUI_ExtrusionAlongPathDlg::isValuesValid() {
|
||||||
|
|
||||||
if ( MeshCheck->isChecked() && myIDSource->_is_nil() ||
|
if ( (MeshCheck->isChecked() && myIDSource->_is_nil()) ||
|
||||||
myMesh->_is_nil() ||
|
myMesh->_is_nil() ||
|
||||||
myPath->_is_nil() )
|
myPath->_is_nil() )
|
||||||
return false;
|
return false;
|
||||||
@ -1392,8 +1392,8 @@ SMESH::long_array_var SMESHGUI_ExtrusionAlongPathDlg::getSelectedElements() {
|
|||||||
if (bOk) {
|
if (bOk) {
|
||||||
const SMDS_MeshElement* e = aMesh->FindElement(ind);
|
const SMDS_MeshElement* e = aMesh->FindElement(ind);
|
||||||
if (e) {
|
if (e) {
|
||||||
bool typeMatch = Elements1dRB->isChecked() && e->GetType() == SMDSAbs_Edge ||
|
bool typeMatch = (Elements1dRB->isChecked() && e->GetType() == SMDSAbs_Edge) ||
|
||||||
Elements2dRB->isChecked() && e->GetType() == SMDSAbs_Face;
|
(Elements2dRB->isChecked() && e->GetType() == SMDSAbs_Face);
|
||||||
if (typeMatch)
|
if (typeMatch)
|
||||||
anElementsId[ j++ ] = ind;
|
anElementsId[ j++ ] = ind;
|
||||||
}
|
}
|
||||||
|
@ -433,11 +433,11 @@ bool SMESHGUI_MeshPatternDlg::isValid (const bool theMess)
|
|||||||
QList<int> ids;
|
QList<int> ids;
|
||||||
if ((isRefine() &&
|
if ((isRefine() &&
|
||||||
(myMesh->_is_nil() || !getIds(ids) || getNode(false) < 0 ||
|
(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() &&
|
(!isRefine() &&
|
||||||
(myMesh->_is_nil() || myMeshShape->_is_nil() || myGeomObj[ Object ]->_is_nil() ||
|
(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)
|
if (theMess)
|
||||||
SUIT_MessageBox::information(this, tr("SMESH_INSUFFICIENT_DATA"),
|
SUIT_MessageBox::information(this, tr("SMESH_INSUFFICIENT_DATA"),
|
||||||
@ -1125,7 +1125,7 @@ bool SMESHGUI_MeshPatternDlg::loadFromFile (const QString& theName)
|
|||||||
SMESH::SMESH_Pattern_var aPattern = SMESH::GetPattern();
|
SMESH::SMESH_Pattern_var aPattern = SMESH::GetPattern();
|
||||||
|
|
||||||
if (!aPattern->LoadFromFile(theName.toLatin1().data()) ||
|
if (!aPattern->LoadFromFile(theName.toLatin1().data()) ||
|
||||||
myType == Type_2d && !aPattern->Is2D()) {
|
(myType == Type_2d && !aPattern->Is2D())) {
|
||||||
SMESH::SMESH_Pattern::ErrorCode aCode = aPattern->GetErrorCode();
|
SMESH::SMESH_Pattern::ErrorCode aCode = aPattern->GetErrorCode();
|
||||||
QString aMess;
|
QString aMess;
|
||||||
if (aCode == SMESH::SMESH_Pattern::ERR_READ_NB_POINTS ) aMess = tr("ERR_READ_NB_POINTS");
|
if (aCode == SMESH::SMESH_Pattern::ERR_READ_NB_POINTS ) aMess = tr("ERR_READ_NB_POINTS");
|
||||||
|
@ -758,9 +758,8 @@ void SMESHGUI_MultiEditDlg::onAddBtn()
|
|||||||
for ( ; anIter.More(); anIter.Next()) {
|
for ( ; anIter.More(); anIter.Next()) {
|
||||||
SMESH::SMESH_GroupBase_var aGroup =
|
SMESH::SMESH_GroupBase_var aGroup =
|
||||||
SMESH::IObjectToInterface<SMESH::SMESH_GroupBase>(anIter.Value());
|
SMESH::IObjectToInterface<SMESH::SMESH_GroupBase>(anIter.Value());
|
||||||
if (!aGroup->_is_nil() && (aGroup->GetType() == SMESH::FACE &&
|
if (!aGroup->_is_nil() && ((aGroup->GetType() == SMESH::FACE && entityType() == 0) ||
|
||||||
entityType() == 0 || aGroup->GetType() == SMESH::VOLUME &&
|
(aGroup->GetType() == SMESH::VOLUME && entityType() == 1))) {
|
||||||
entityType() == 1)) {
|
|
||||||
if (aGroup->GetMesh()->GetId() == myMesh->GetId()) {
|
if (aGroup->GetMesh()->GetId() == myMesh->GetId()) {
|
||||||
SMESH::long_array_var anIds = aGroup->GetListOfID();
|
SMESH::long_array_var anIds = aGroup->GetListOfID();
|
||||||
for (int i = 0, n = anIds->length(); i < n; i++) {
|
for (int i = 0, n = anIds->length(); i < n; i++) {
|
||||||
|
@ -281,10 +281,8 @@ bool SMESHGUI_Operation::isValid( SUIT_Operation* theOtherOp ) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
return ( theOtherOp &&
|
return ( theOtherOp &&
|
||||||
( theOtherOp->inherits("SMESHGUI_Operation") &&
|
( ( theOtherOp->inherits("SMESHGUI_Operation") && ( !anOps.contains(theOtherOp->metaObject()->className() ) || anOps.contains(metaObject()->className()) ) ) ||
|
||||||
( !anOps.contains(theOtherOp->metaObject()->className() ) ||
|
( theOtherOp->inherits("LightApp_ShowHideOp") ) ) );
|
||||||
anOps.contains(metaObject()->className()) ) ) ||
|
|
||||||
( theOtherOp->inherits("LightApp_ShowHideOp") ) );
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -486,7 +486,7 @@ bool SMESHGUI_RotationDlg::ClickOnApply()
|
|||||||
}
|
}
|
||||||
|
|
||||||
SMESH::UpdateView();
|
SMESH::UpdateView();
|
||||||
if ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() ||
|
if ( ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() ) ||
|
||||||
actionButton == MAKE_MESH_BUTTON ) {
|
actionButton == MAKE_MESH_BUTTON ) {
|
||||||
mySMESHGUI->updateObjBrowser(true); // new groups may appear
|
mySMESHGUI->updateObjBrowser(true); // new groups may appear
|
||||||
if( LightApp_Application* anApp =
|
if( LightApp_Application* anApp =
|
||||||
|
@ -522,7 +522,7 @@ bool SMESHGUI_ScaleDlg::ClickOnApply()
|
|||||||
}
|
}
|
||||||
|
|
||||||
SMESH::UpdateView();
|
SMESH::UpdateView();
|
||||||
if ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() ||
|
if ( ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() ) ||
|
||||||
actionButton == MAKE_MESH_BUTTON ) {
|
actionButton == MAKE_MESH_BUTTON ) {
|
||||||
mySMESHGUI->updateObjBrowser(true); // new groups may appear
|
mySMESHGUI->updateObjBrowser(true); // new groups may appear
|
||||||
if( LightApp_Application* anApp =
|
if( LightApp_Application* anApp =
|
||||||
|
@ -313,12 +313,14 @@ static bool findTriangles (const SMDS_MeshNode * theNode1,
|
|||||||
const SMDS_MeshElement* elem = it->next();
|
const SMDS_MeshElement* elem = it->next();
|
||||||
if (elem->GetType() == SMDSAbs_Face &&
|
if (elem->GetType() == SMDSAbs_Face &&
|
||||||
emap.find(elem) != emap.end())
|
emap.find(elem) != emap.end())
|
||||||
|
{
|
||||||
if (theTria1) {
|
if (theTria1) {
|
||||||
theTria2 = elem;
|
theTria2 = elem;
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
theTria1 = elem;
|
theTria1 = elem;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return (theTria1 && theTria2);
|
return (theTria1 && theTria2);
|
||||||
}
|
}
|
||||||
@ -370,8 +372,8 @@ void SMESHGUI_SingleEditDlg::onTextChange (const QString& theNewText)
|
|||||||
int edgeInd = 2, i;
|
int edgeInd = 2, i;
|
||||||
for (i = 0, it = tria1->nodesIterator(); it->more(); i++) {
|
for (i = 0, it = tria1->nodesIterator(); it->more(); i++) {
|
||||||
a3Nodes[ i ] = static_cast<const SMDS_MeshNode*>(it->next());
|
a3Nodes[ i ] = static_cast<const SMDS_MeshNode*>(it->next());
|
||||||
if (i > 0 && ( a3Nodes[ i ] == aNode1 && a3Nodes[ i - 1] == aNode2 ||
|
if (i > 0 && ( (a3Nodes[ i ] == aNode1 && a3Nodes[ i - 1] == aNode2) ||
|
||||||
a3Nodes[ i ] == aNode2 && a3Nodes[ i - 1] == aNode1 ) ) {
|
(a3Nodes[ i ] == aNode2 && a3Nodes[ i - 1] == aNode1) ) ) {
|
||||||
edgeInd = i - 1;
|
edgeInd = i - 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -554,7 +554,7 @@ bool SMESHGUI_SymmetryDlg::ClickOnApply()
|
|||||||
}
|
}
|
||||||
|
|
||||||
SMESH::UpdateView();
|
SMESH::UpdateView();
|
||||||
if ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() ||
|
if ( ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() ) ||
|
||||||
actionButton == MAKE_MESH_BUTTON ) {
|
actionButton == MAKE_MESH_BUTTON ) {
|
||||||
mySMESHGUI->updateObjBrowser(true); // new groups may appear
|
mySMESHGUI->updateObjBrowser(true); // new groups may appear
|
||||||
if( LightApp_Application* anApp =
|
if( LightApp_Application* anApp =
|
||||||
|
@ -558,7 +558,7 @@ bool SMESHGUI_TranslationDlg::ClickOnApply()
|
|||||||
}
|
}
|
||||||
|
|
||||||
SMESH::UpdateView();
|
SMESH::UpdateView();
|
||||||
if ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() ||
|
if ( ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() ) ||
|
||||||
actionButton == MAKE_MESH_BUTTON ) {
|
actionButton == MAKE_MESH_BUTTON ) {
|
||||||
mySMESHGUI->updateObjBrowser(true); // new groups may appear
|
mySMESHGUI->updateObjBrowser(true); // new groups may appear
|
||||||
if( LightApp_Application* anApp =
|
if( LightApp_Application* anApp =
|
||||||
|
@ -1726,7 +1726,7 @@ SMESH::long_array* SMESH_Gen_i::Evaluate(SMESH::SMESH_Mesh_ptr theMesh,
|
|||||||
SMESH_subMesh* sm = anIt->first;
|
SMESH_subMesh* sm = anIt->first;
|
||||||
SMESH_ComputeErrorPtr& error = sm->GetComputeError();
|
SMESH_ComputeErrorPtr& error = sm->GetComputeError();
|
||||||
const SMESH_Algo* algo = myGen.GetAlgo( myLocMesh, sm->GetSubShape());
|
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));
|
error.reset( new SMESH_ComputeError( COMPERR_ALGO_FAILED,"Failed to evaluate",algo));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -465,7 +465,7 @@ SMESH_MEDMesh_i::getTypes(SALOME_MED::medEntityMesh entity) throw(SALOME::
|
|||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
* CORBA: Returns number of elements of type medGeometryElement
|
* 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
|
* implemented for MED_ALL_ENTITIES
|
||||||
*
|
*
|
||||||
* Dans cette implementation, il n est pas prevu de tenir compte du entity
|
* Dans cette implementation, il n est pas prevu de tenir compte du entity
|
||||||
@ -479,8 +479,8 @@ CORBA::Long SMESH_MEDMesh_i::getNumberOfElements(SALOME_MED::
|
|||||||
if (_mesh_i == 0)
|
if (_mesh_i == 0)
|
||||||
THROW_SALOME_CORBA_EXCEPTION("No associated Mesh",
|
THROW_SALOME_CORBA_EXCEPTION("No associated Mesh",
|
||||||
SALOME::INTERNAL_ERROR);
|
SALOME::INTERNAL_ERROR);
|
||||||
if (geomElement == SALOME_MED::MED_ALL_ELEMENTS)
|
if (geomElement == SALOME_MED::MEDMEM_ALL_ELEMENTS)
|
||||||
THROW_SALOME_CORBA_EXCEPTION("Not implemented for MED_ALL_ELEMENTS",
|
THROW_SALOME_CORBA_EXCEPTION("Not implemented for MEDMEM_ALL_ELEMENTS",
|
||||||
SALOME::BAD_PARAM);
|
SALOME::BAD_PARAM);
|
||||||
if (!_compte)
|
if (!_compte)
|
||||||
calculeNbElts();
|
calculeNbElts();
|
||||||
@ -510,8 +510,7 @@ CORBA::Long SMESH_MEDMesh_i::getNumberOfElements(SALOME_MED::
|
|||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
SALOME_TYPES::ListOfLong *
|
SALOME_TYPES::ListOfLong *
|
||||||
SMESH_MEDMesh_i::getConnectivity(SALOME_MED::medModeSwitch typeSwitch,
|
SMESH_MEDMesh_i::getConnectivity(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)
|
||||||
@ -521,8 +520,8 @@ SMESH_MEDMesh_i::getConnectivity(SALOME_MED::medModeSwitch typeSwitch,
|
|||||||
SALOME::INTERNAL_ERROR);
|
SALOME::INTERNAL_ERROR);
|
||||||
if (mode != SALOME_MED::MED_NODAL)
|
if (mode != SALOME_MED::MED_NODAL)
|
||||||
THROW_SALOME_CORBA_EXCEPTION("Not Implemented", SALOME::BAD_PARAM);
|
THROW_SALOME_CORBA_EXCEPTION("Not Implemented", SALOME::BAD_PARAM);
|
||||||
if (typeSwitch == SALOME_MED::MED_NO_INTERLACE)
|
/*if (typeSwitch == SALOME_MED::MED_NO_INTERLACE)
|
||||||
THROW_SALOME_CORBA_EXCEPTION("Not Yet Implemented", SALOME::BAD_PARAM);
|
THROW_SALOME_CORBA_EXCEPTION("Not Yet Implemented", SALOME::BAD_PARAM);*/
|
||||||
if (!_compte)
|
if (!_compte)
|
||||||
calculeNbElts();
|
calculeNbElts();
|
||||||
|
|
||||||
@ -851,7 +850,7 @@ SALOME_MED::FIELD_ptr SMESH_MEDMesh_i::getNeighbourhood(SALOME_MED::
|
|||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
void SMESH_MEDMesh_i::addInStudy(SALOMEDS::Study_ptr myStudy,
|
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");
|
BEGIN_OF("MED_Mesh_i::addInStudy");
|
||||||
if (_meshId != "")
|
if (_meshId != "")
|
||||||
@ -963,11 +962,11 @@ void SMESH_MEDMesh_i::calculeNbElts() throw(SALOME::SALOME_Exception)
|
|||||||
_compte = true;
|
_compte = true;
|
||||||
|
|
||||||
_mapNbTypes[SALOME_MED::MED_NODE] = 1;
|
_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
|
// On range les elements dans les vecteurs correspondants
|
||||||
|
|
||||||
_mapIndToSeqElts[SALOME_MED::MED_SEG2] = _indexElts++;
|
_mapIndToSeqElts[SALOME_MED::MEDMEM_SEG2] = _indexElts++;
|
||||||
_mapIndToSeqElts[SALOME_MED::MED_SEG3] = _indexElts++;
|
_mapIndToSeqElts[SALOME_MED::MEDMEM_SEG3] = _indexElts++;
|
||||||
_mapIndToVectTypes[SALOME_MED::MED_EDGE] = _indexEnts++;
|
_mapIndToVectTypes[SALOME_MED::MED_EDGE] = _indexEnts++;
|
||||||
|
|
||||||
int trouveSeg2 = 0;
|
int trouveSeg2 = 0;
|
||||||
@ -984,23 +983,23 @@ void SMESH_MEDMesh_i::calculeNbElts() throw(SALOME::SALOME_Exception)
|
|||||||
{
|
{
|
||||||
case 2:
|
case 2:
|
||||||
{
|
{
|
||||||
medElement = SALOME_MED::MED_SEG2;
|
medElement = SALOME_MED::MEDMEM_SEG2;
|
||||||
if (trouveSeg2 == 0)
|
if (trouveSeg2 == 0)
|
||||||
{
|
{
|
||||||
trouveSeg2 = 1;
|
trouveSeg2 = 1;
|
||||||
_TypesId[SALOME_MED::MED_EDGE].
|
_TypesId[SALOME_MED::MED_EDGE].
|
||||||
push_back(SALOME_MED::MED_SEG2);
|
push_back(SALOME_MED::MEDMEM_SEG2);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 3:
|
case 3:
|
||||||
{
|
{
|
||||||
medElement = SALOME_MED::MED_SEG3;
|
medElement = SALOME_MED::MEDMEM_SEG3;
|
||||||
if (trouveSeg3 == 0)
|
if (trouveSeg3 == 0)
|
||||||
{
|
{
|
||||||
trouveSeg3 = 1;
|
trouveSeg3 = 1;
|
||||||
_TypesId[SALOME_MED::MED_EDGE].
|
_TypesId[SALOME_MED::MED_EDGE].
|
||||||
push_back(SALOME_MED::MED_SEG3);
|
push_back(SALOME_MED::MEDMEM_SEG3);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1020,15 +1019,15 @@ void SMESH_MEDMesh_i::calculeNbElts() throw(SALOME::SALOME_Exception)
|
|||||||
|
|
||||||
_mapNbTypes[SALOME_MED::MED_EDGE] = trouveSeg2 + trouveSeg3;
|
_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
|
// On range les elements dans les vecteurs correspondants
|
||||||
int trouveTria3 = 0;
|
int trouveTria3 = 0;
|
||||||
int trouveTria6 = 0;
|
int trouveTria6 = 0;
|
||||||
int trouveQuad4 = 0;
|
int trouveQuad4 = 0;
|
||||||
|
|
||||||
_mapIndToSeqElts[SALOME_MED::MED_TRIA3] = _indexElts++;
|
_mapIndToSeqElts[SALOME_MED::MEDMEM_TRIA3] = _indexElts++;
|
||||||
_mapIndToSeqElts[SALOME_MED::MED_TRIA6] = _indexElts++;
|
_mapIndToSeqElts[SALOME_MED::MEDMEM_TRIA6] = _indexElts++;
|
||||||
_mapIndToSeqElts[SALOME_MED::MED_QUAD4] = _indexElts++;
|
_mapIndToSeqElts[SALOME_MED::MEDMEM_QUAD4] = _indexElts++;
|
||||||
_mapIndToVectTypes[SALOME_MED::MED_FACE] = _indexEnts++;
|
_mapIndToVectTypes[SALOME_MED::MED_FACE] = _indexEnts++;
|
||||||
|
|
||||||
SMDS_FaceIteratorPtr itFaces=_meshDS->facesIterator();
|
SMDS_FaceIteratorPtr itFaces=_meshDS->facesIterator();
|
||||||
@ -1041,34 +1040,34 @@ void SMESH_MEDMesh_i::calculeNbElts() throw(SALOME::SALOME_Exception)
|
|||||||
{
|
{
|
||||||
case 3:
|
case 3:
|
||||||
{
|
{
|
||||||
medElement = SALOME_MED::MED_TRIA3;
|
medElement = SALOME_MED::MEDMEM_TRIA3;
|
||||||
if (trouveTria3 == 0)
|
if (trouveTria3 == 0)
|
||||||
{
|
{
|
||||||
trouveTria3 = 1;
|
trouveTria3 = 1;
|
||||||
_TypesId[SALOME_MED::MED_FACE].
|
_TypesId[SALOME_MED::MED_FACE].
|
||||||
push_back(SALOME_MED::MED_TRIA3);
|
push_back(SALOME_MED::MEDMEM_TRIA3);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 4:
|
case 4:
|
||||||
{
|
{
|
||||||
medElement = SALOME_MED::MED_QUAD4;
|
medElement = SALOME_MED::MEDMEM_QUAD4;
|
||||||
if (trouveQuad4 == 0)
|
if (trouveQuad4 == 0)
|
||||||
{
|
{
|
||||||
trouveQuad4 = 1;
|
trouveQuad4 = 1;
|
||||||
_TypesId[SALOME_MED::MED_FACE].
|
_TypesId[SALOME_MED::MED_FACE].
|
||||||
push_back(SALOME_MED::MED_QUAD4);
|
push_back(SALOME_MED::MEDMEM_QUAD4);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 6:
|
case 6:
|
||||||
{
|
{
|
||||||
medElement = SALOME_MED::MED_TRIA6;
|
medElement = SALOME_MED::MEDMEM_TRIA6;
|
||||||
if (trouveTria6 == 0)
|
if (trouveTria6 == 0)
|
||||||
{
|
{
|
||||||
trouveTria6 = 1;
|
trouveTria6 = 1;
|
||||||
_TypesId[SALOME_MED::MED_FACE].
|
_TypesId[SALOME_MED::MED_FACE].
|
||||||
push_back(SALOME_MED::MED_TRIA6);
|
push_back(SALOME_MED::MEDMEM_TRIA6);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1091,7 +1090,7 @@ void SMESH_MEDMesh_i::calculeNbElts() throw(SALOME::SALOME_Exception)
|
|||||||
_mapNbTypes[SALOME_MED::MED_FACE] =
|
_mapNbTypes[SALOME_MED::MED_FACE] =
|
||||||
trouveTria3 + trouveTria6 + trouveQuad4;
|
trouveTria3 + trouveTria6 + trouveQuad4;
|
||||||
|
|
||||||
_mapIndToSeqElts[SALOME_MED::MED_HEXA8] = _indexElts++;
|
_mapIndToSeqElts[SALOME_MED::MEDMEM_HEXA8] = _indexElts++;
|
||||||
_mapIndToVectTypes[SALOME_MED::MED_CELL] = _indexEnts++;
|
_mapIndToVectTypes[SALOME_MED::MED_CELL] = _indexEnts++;
|
||||||
int index = _mapIndToSeqElts[medElement];
|
int index = _mapIndToSeqElts[medElement];
|
||||||
|
|
||||||
@ -1103,13 +1102,13 @@ void SMESH_MEDMesh_i::calculeNbElts() throw(SALOME::SALOME_Exception)
|
|||||||
const SMDS_MeshVolume * elem = itVolumes->next();
|
const SMDS_MeshVolume * elem = itVolumes->next();
|
||||||
|
|
||||||
int nb_of_nodes = elem->NbNodes();
|
int nb_of_nodes = elem->NbNodes();
|
||||||
medElement = SALOME_MED::MED_HEXA8;
|
medElement = SALOME_MED::MEDMEM_HEXA8;
|
||||||
ASSERT(nb_of_nodes == 8);
|
ASSERT(nb_of_nodes == 8);
|
||||||
|
|
||||||
if (trouveHexa8 == 0)
|
if (trouveHexa8 == 0)
|
||||||
{
|
{
|
||||||
trouveHexa8 = 1;
|
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
|
// Traitement de la maille
|
||||||
int longueur = _seq_elemId[index]->length();
|
int longueur = _seq_elemId[index]->length();
|
||||||
@ -1178,7 +1177,7 @@ void SMESH_MEDMesh_i::createFamilies() throw(SALOME::SALOME_Exception)
|
|||||||
* Gives informations of the considered mesh.
|
* 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)
|
throw (SALOME::SALOME_Exception)
|
||||||
{
|
{
|
||||||
MESSAGE("!!!! NOT YET IMPLEMENTED !!!!!");
|
MESSAGE("!!!! NOT YET IMPLEMENTED !!!!!");
|
||||||
@ -1187,12 +1186,28 @@ SALOME_MED::MESH::meshInfos * SMESH_MEDMesh_i::getMeshGlobal()
|
|||||||
|
|
||||||
return NULL;
|
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.
|
* 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)
|
throw (SALOME::SALOME_Exception)
|
||||||
{
|
{
|
||||||
MESSAGE("!!!! NOT YET IMPLEMENTED !!!!!");
|
MESSAGE("!!!! NOT YET IMPLEMENTED !!!!!");
|
||||||
|
@ -82,13 +82,18 @@ public:
|
|||||||
void setProtocol(SALOME::TypeOfCommunication typ) {}
|
void setProtocol(SALOME::TypeOfCommunication typ) {}
|
||||||
void release() {}
|
void release() {}
|
||||||
SALOME::SenderDouble_ptr getSenderForCoordinates(SALOME_MED::medModeSwitch) {return SALOME::SenderDouble::_nil();}
|
SALOME::SenderDouble_ptr getSenderForCoordinates(SALOME_MED::medModeSwitch) {return SALOME::SenderDouble::_nil();}
|
||||||
SALOME::SenderInt_ptr getSenderForConnectivity(SALOME_MED::medModeSwitch,
|
SALOME::SenderInt_ptr getSenderForConnectivity(SALOME_MED::medConnectivity,
|
||||||
SALOME_MED::medConnectivity,
|
|
||||||
SALOME_MED::medEntityMesh,
|
SALOME_MED::medEntityMesh,
|
||||||
SALOME_MED::medGeometryElement)
|
SALOME_MED::medGeometryElement)
|
||||||
{
|
{
|
||||||
return SALOME::SenderInt::_nil();
|
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 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 getSenderForPolygonsConnectivityIndex(SALOME_MED::medConnectivity, SALOME_MED::medEntityMesh) {return SALOME::SenderInt::_nil();}
|
||||||
SALOME::SenderInt_ptr getSenderForPolyhedronConnectivity(SALOME_MED::medConnectivity) {return SALOME::SenderInt::_nil();}
|
SALOME::SenderInt_ptr getSenderForPolyhedronConnectivity(SALOME_MED::medConnectivity) {return SALOME::SenderInt::_nil();}
|
||||||
@ -140,8 +145,7 @@ public:
|
|||||||
throw(SALOME::SALOME_Exception);
|
throw(SALOME::SALOME_Exception);
|
||||||
|
|
||||||
SALOME_TYPES::ListOfLong *
|
SALOME_TYPES::ListOfLong *
|
||||||
getConnectivity(SALOME_MED::medModeSwitch typeSwitch,
|
getConnectivity(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);
|
||||||
@ -222,7 +226,7 @@ public:
|
|||||||
|
|
||||||
// Others
|
// Others
|
||||||
void addInStudy(SALOMEDS::Study_ptr myStudy,
|
void addInStudy(SALOMEDS::Study_ptr myStudy,
|
||||||
SALOME_MED::MESH_ptr myIor)
|
SALOME_MED::GMESH_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)
|
||||||
@ -236,12 +240,14 @@ public:
|
|||||||
CORBA::Long getCorbaIndex()
|
CORBA::Long getCorbaIndex()
|
||||||
throw(SALOME::SALOME_Exception);
|
throw(SALOME::SALOME_Exception);
|
||||||
|
|
||||||
SALOME_MED::MESH::meshInfos * getMeshGlobal()
|
SALOME_MED::GMESH::meshInfos * getMeshGlobal()
|
||||||
throw (SALOME::SALOME_Exception);
|
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::coordinateInfos * getCoordGlobal()
|
SALOME_MED::MESH_ptr convertInMESH() throw (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
|
SALOME_MED::GMESH::coordinateInfos * getCoordGlobal()
|
||||||
throw (SALOME::SALOME_Exception);
|
throw (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
SALOME_MED::MESH::connectivityInfos *
|
SALOME_MED::MESH::connectivityInfos *
|
||||||
|
@ -79,7 +79,7 @@ SMESH_MEDSupport_i::SMESH_MEDSupport_i(SMESH_subMesh_i * sm, string name,
|
|||||||
{
|
{
|
||||||
_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::MEDMEM_NONE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -178,7 +178,7 @@ char *SMESH_MEDSupport_i::getDescription() throw(SALOME::SALOME_Exception)
|
|||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
||||||
SALOME_MED::MESH_ptr SMESH_MEDSupport_i::getMesh()throw(SALOME::
|
SALOME_MED::GMESH_ptr SMESH_MEDSupport_i::getMesh()throw(SALOME::
|
||||||
SALOME_Exception)
|
SALOME_Exception)
|
||||||
{
|
{
|
||||||
if (_subMeshDS==NULL)
|
if (_subMeshDS==NULL)
|
||||||
@ -202,7 +202,7 @@ CORBA::Boolean SMESH_MEDSupport_i::isOnAllElements()throw(SALOME::
|
|||||||
SALOME::INTERNAL_ERROR);
|
SALOME::INTERNAL_ERROR);
|
||||||
if (_seqNumber == false)
|
if (_seqNumber == false)
|
||||||
{
|
{
|
||||||
if (_entity != SALOME_MED::MED_NONE)
|
if (_entity != SALOME_MED::MEDMEM_NONE)
|
||||||
{
|
{
|
||||||
_seqLength = _subMeshDS->NbNodes();
|
_seqLength = _subMeshDS->NbNodes();
|
||||||
_seqNumber = true;
|
_seqNumber = true;
|
||||||
@ -305,7 +305,7 @@ SALOME_TYPES::ListOfLong * SMESH_MEDSupport_i::getNumber(
|
|||||||
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::MEDMEM_NONE)
|
||||||
THROW_SALOME_CORBA_EXCEPTION("Not implemented", SALOME::BAD_PARAM);
|
THROW_SALOME_CORBA_EXCEPTION("Not implemented", SALOME::BAD_PARAM);
|
||||||
|
|
||||||
SALOME_TYPES::ListOfLong_var myseq = new SALOME_TYPES::ListOfLong;
|
SALOME_TYPES::ListOfLong_var myseq = new SALOME_TYPES::ListOfLong;
|
||||||
|
@ -55,7 +55,7 @@ class SMESH_I_EXPORT SMESH_MEDSupport_i:
|
|||||||
// IDL Methods
|
// IDL Methods
|
||||||
char *getName() throw(SALOME::SALOME_Exception);
|
char *getName() throw(SALOME::SALOME_Exception);
|
||||||
char *getDescription() 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);
|
CORBA::Boolean isOnAllElements() throw(SALOME::SALOME_Exception);
|
||||||
SALOME_MED::medEntityMesh getEntity() throw(SALOME::SALOME_Exception);
|
SALOME_MED::medEntityMesh getEntity() throw(SALOME::SALOME_Exception);
|
||||||
CORBA::Long
|
CORBA::Long
|
||||||
|
@ -2822,7 +2822,7 @@ SMESH::long_array* SMESH_Mesh_i::GetElementsByType( SMESH::ElementType theElemTy
|
|||||||
// No sense in returning ids of elements along with ids of nodes:
|
// No sense in returning ids of elements along with ids of nodes:
|
||||||
// when theElemType == SMESH::ALL, return node ids only if
|
// when theElemType == SMESH::ALL, return node ids only if
|
||||||
// there are no elements
|
// there are no elements
|
||||||
if ( theElemType == SMESH::NODE || theElemType == SMESH::ALL && nbElements == 0 )
|
if ( theElemType == SMESH::NODE || (theElemType == SMESH::ALL && nbElements == 0) )
|
||||||
return GetNodesId();
|
return GetNodesId();
|
||||||
|
|
||||||
aResult->length( nbElements );
|
aResult->length( nbElements );
|
||||||
|
Loading…
Reference in New Issue
Block a user