]> SALOME platform Git repositories - plugins/hexoticplugin.git/commitdiff
Salome HOME
Merge from V6_main 28/02/2013 V7_1_0b1
authorvsr <vsr@opencascade.com>
Thu, 28 Feb 2013 15:44:06 +0000 (15:44 +0000)
committervsr <vsr@opencascade.com>
Thu, 28 Feb 2013 15:44:06 +0000 (15:44 +0000)
build_cmake
build_cmake.bat
src/HexoticPlugin/HexoticPlugin_Hexotic.cxx

index 166d83ae03b44534d6e30ed4f296451bb3576840..aea1b59b2f668d2b89dfe6ec72c4d1161558a6ae 100755 (executable)
@@ -21,7 +21,7 @@
 CURRENT_DIR=`pwd`
 CONF_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"`
 cd ${CONF_DIR}
-python $KERNEL_ROOT_DIR/salome_adm/cmake_files/am2cmake.py --hexoticplugin
+python $KERNEL_ROOT_DIR/salome_adm/cmake_files/deprecated/am2cmake.py --hexoticplugin
 status=$?
 cd ${CURRENT_DIR}
 exit $status
index 5f803d46acc1bdad91575325c18cccfa9177716e..aee9960c5747f9bb7226ff68c37a578cda0f4737 100644 (file)
@@ -17,4 +17,4 @@
 @REM See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 @REM
 
-%PYTHONBIN% %KERNEL_ROOT_DIR%\salome_adm\cmake_files\am2cmake.py --hexoticplugin\r
+%PYTHONBIN% %KERNEL_ROOT_DIR%\salome_adm\cmake_files\deprecated\am2cmake.py --hexoticplugin\r
index c188a4850409eaf4a87133049aff8e560362ebe0..64bbbbb6e5800a237330a52ed42d630edfc45f45 100644 (file)
@@ -95,9 +95,7 @@ HexoticPlugin_Hexotic::HexoticPlugin_Hexotic(int hypId, int studyId, SMESH_Gen*
 #ifdef WITH_BLSURFPLUGIN
   _blsurfHypo = NULL;
 #endif
-#ifdef WITH_SMESH_CANCEL_COMPUTE
   _compute_canceled = false;
-#endif
 }
 
 //=============================================================================
@@ -962,11 +960,11 @@ bool HexoticPlugin_Hexotic::Compute(SMESH_Mesh&          aMesh,
 
   if (_iShape == 0 && _nbShape == 0) {
     _nbShape = countShape( meshDS, TopAbs_SOLID );  // we count the number of shapes
-    //_tabNode = new SMDS_MeshNode*[_nbShape];        // we declare the size of the node array
   }
 
   // to prevent from displaying error message after computing,
   // SetIsAlwaysComputed( true ) to empty sub-meshes
+  vector< SMESH_subMesh* > subMeshesAlwaysComp;
   for ( int i = 0; i < _nbShape; ++i )
     if ( SMESH_subMesh* sm = aMesh.GetSubMeshContaining( aShape ))
     {
@@ -976,7 +974,10 @@ bool HexoticPlugin_Hexotic::Compute(SMESH_Mesh&          aMesh,
       {
         sm = smIt->next();
         if ( !sm->IsMeshComputed() )
+        {
           sm->SetIsAlwaysComputed( true );
+          subMeshesAlwaysComp.push_back( sm );
+        }
       }
     }
 
@@ -984,10 +985,6 @@ bool HexoticPlugin_Hexotic::Compute(SMESH_Mesh&          aMesh,
 
   if (_iShape == _nbShape ) {
 
-    // for (int i=0; i<_nbShape; i++)        // we destroy the (_nbShape - 1) nodes created and used
-    //   meshDS->RemoveNode( _tabNode[i] );  // to simulate successful mesh computing.
-    // delete [] _tabNode;
-
     // create bounding box for each shape of the compound
 
     int iShape = 0;
@@ -1064,7 +1061,7 @@ bool HexoticPlugin_Hexotic::Compute(SMESH_Mesh&          aMesh,
 
     MESSAGE("HexoticPlugin_Hexotic::Compute");
 
-    system( run_Hexotic.data() );
+    int status = system( run_Hexotic.data() );
 
     // --------------
     // read a result
@@ -1111,10 +1108,16 @@ bool HexoticPlugin_Hexotic::Compute(SMESH_Mesh&          aMesh,
         if ( std::search( fileBeg, fileEnd, msgLic, msgLic+strlen(msgLic)) != fileEnd )
           error("Licence problems.");
       }
+      if ( status > 0 && WEXITSTATUS(status) == 127 )
+        error("hexotic: command not found");
     }
     cout << "Hexahedra meshing " << hexahedraMessage << std::endl;
     cout << std::endl;
 
+    // restore "always computed" flag of sub-meshes (0022127)
+    for  ( size_t iSM = 0; iSM < subMeshesAlwaysComp.size(); ++iSM )
+      subMeshesAlwaysComp[ iSM ]->SetIsAlwaysComputed( false );
+
     delete [] tabShape;
     for (int i=0; i<_nbShape; i++)
       delete [] tabBox[i];