Salome HOME
Merge remote-tracking branch 'origin/master'
authorPaul RASCLE <paul.rascle@edf.fr>
Mon, 12 Mar 2018 13:10:52 +0000 (14:10 +0100)
committerPaul RASCLE <paul.rascle@edf.fr>
Mon, 12 Mar 2018 13:10:52 +0000 (14:10 +0100)
1  2 
src/SMESH_I/SMESH_Gen_i.cxx

index a32d4db78fd67900433e0f1a6bf434f5406e7f15,bdaaa515f7d8796b96f7314da86ce92e022ccb96..2e11e27e580236fa7145fa8da347eea2a65ae923
@@@ -178,23 -178,7 +178,23 @@@ PortableServer::ServantBase_var SMESH_G
      PortableServer::Servant aServant = GetPOA()->reference_to_servant( theObject );
      return aServant;
    }
 -  catch (...) {
 +  catch (PortableServer::POA::ObjectNotActive &ex)
 +  {
 +    INFOS("GetServant: ObjectNotActive");
 +    return NULL;
 +  }
 +  catch (PortableServer::POA::WrongAdapter &ex)
 +  {
 +    INFOS("GetServant: WrongAdapter: OK when several servants used to build several mesh in parallel...");
 +    return NULL;
 +  }
 +  catch (PortableServer::POA::WrongPolicy &ex)
 +  {
 +    INFOS("GetServant: WrongPolicy");
 +    return NULL;
 +  }
 +  catch (...)
 +  {
      INFOS( "GetServant - Unknown exception was caught!!!" );
      return NULL;
    }
@@@ -645,11 -629,9 +645,11 @@@ void SMESH_Gen_i::setCurrentStudy( SALO
                                     bool                theStudyIsBeingClosed)
  {
    int curStudyId = GetCurrentStudyID();
 +  MESSAGE("curStudyId " << curStudyId);
    myCurrentStudy = SALOMEDS::Study::_duplicate( theStudy );
    // create study context, if it doesn't exist and set current study
    int studyId = GetCurrentStudyID();
 +  MESSAGE("studyId " << studyId);
    if ( myStudyContextMap.find( studyId ) == myStudyContextMap.end() )
      myStudyContextMap[ studyId ] = new StudyContext;
  
      // Let meshes update their data depending on GEOM groups that could change
      if ( curStudyId != studyId )
      {
 +      MESSAGE("curStudyId " << curStudyId << " studyId " << studyId);
        CORBA::String_var compDataType = ComponentDataType();
        SALOMEDS::SComponent_wrap me = myCurrentStudy->FindComponent( compDataType.in() );
        if ( !me->_is_nil() ) {
@@@ -2504,10 -2485,13 +2504,13 @@@ SMESH_Gen_i::ConcatenateCommon(const SM
  
      // assure that IDs increments by one during iteration
      ::SMESH_Mesh& initLocMesh = initImpl->GetImpl();
-     SMESHDS_Mesh* initMeshDS = initLocMesh.GetMeshDS();
-     if ( initMeshDS->MaxNodeID()    != initMeshDS->NbNodes() ||
-          initMeshDS->MaxElementID() != initMeshDS->NbElements() )
+     SMESHDS_Mesh*  initMeshDS = initLocMesh.GetMeshDS();
+     if ( initMeshDS->MaxNodeID()    > initMeshDS->NbNodes() ||
+          initMeshDS->MaxElementID() > initMeshDS->NbElements() )
+     {
+       initMeshDS->Modified();
        initMeshDS->CompactMesh();
+     }
  
      // remember nb of elements before filling in
      SMESH::long_array_var prevState =  newMesh->GetNbElementsByType();