Salome HOME
Clean-up deprecated OCCT-related code
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_ComputeDlg.cxx
index 072b481752a647c102876e2dcfde1d6e226e7315..2d48bf78a0bf82a79bc77927d3ec28a5cc0517be 100644 (file)
@@ -54,6 +54,7 @@
 #include <SUIT_Session.h>
 #include <SVTK_ViewModel.h>
 #include <SVTK_ViewWindow.h>
+#include <SVTK_Renderer.h>
 #include <SalomeApp_Application.h>
 
 // SALOME KERNEL includes
 
 // VTK includes
 #include <vtkProperty.h>
+#include <vtkRenderer.h>
 
 // STL includes
 #include <vector>
 #include <set>
 
-#ifndef WIN32
+#if !defined WIN32 && !defined __APPLE__
 #include <sys/sysinfo.h>
 #endif
 
@@ -784,7 +786,7 @@ SMESHGUI_ComputeDlg_QThreadQDialog(QWidget             * parent,
   QLabel * nbElemsName = new QLabel(tr("SMESH_MESHINFO_ELEMENTS"), this );
   nbNodesLabel = new QLabel("0", this );
   nbElemsLabel = new QLabel("0", this );
-#ifndef WIN32
+#if !defined WIN32 && !defined __APPLE__
   QLabel * freeRAMName = new QLabel(tr("SMESH_FREERAM"), this );
   freeRAMLabel = new QLabel("", this );
 #endif
@@ -800,7 +802,7 @@ SMESHGUI_ComputeDlg_QThreadQDialog(QWidget             * parent,
   layout->addWidget(nbNodesLabel, row++, 1);
   layout->addWidget(nbElemsName,  row,   0);
   layout->addWidget(nbElemsLabel, row++, 1);
-#ifndef WIN32
+#if !defined WIN32 && !defined __APPLE__
   layout->addWidget(freeRAMName,  row,   0);
   layout->addWidget(freeRAMLabel, row++, 1);
 #endif
@@ -840,7 +842,7 @@ void SMESHGUI_ComputeDlg_QThreadQDialog::timerEvent(QTimerEvent *event)
   {
     nbNodesLabel->setText( QString("%1").arg( qthread.getMesh()->NbNodes() ));
     nbElemsLabel->setText( QString("%1").arg( qthread.getMesh()->NbElements() ));
-#ifndef WIN32
+#if !defined WIN32 && !defined __APPLE__
     struct sysinfo si;
     const int err = sysinfo( &si );
     if ( err )
@@ -1009,6 +1011,10 @@ void SMESHGUI_BaseComputeOp::computeMesh()
                 ( (*anIter).second->GetID().c_str(), "SMESH", (*anIter).second->GetName().c_str() );
               SMESH::Update(anIO, toDisplay);
 
+              if ( SVTK_ViewWindow* vtkWnd = SMESH::GetVtkViewWindow(SMESH::GetActiveWindow() ))
+                if ( vtkWnd->getRenderer() )
+                  vtkWnd->getRenderer()->ResetCameraClippingRange();
+
               if ( limitExceeded && !aMesh->_is_nil() )
               {
                 QStringList hiddenMsg;
@@ -1766,7 +1772,7 @@ void SMESHGUI_PrecomputeOp::initDialog()
 
 //================================================================================
 /*!
- * \brief detect asigned mesh algorithms
+ * \brief detect assigned mesh algorithms
  */
 //================================================================================
 
@@ -1978,9 +1984,7 @@ void SMESHGUI_PrecomputeOp::onPreview()
   
   SMESH::long_array_var aShapesId = new SMESH::long_array();
   try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
     OCC_CATCH_SIGNALS;
-#endif
       
     SMESH::MeshPreviewStruct_var previewData =
       gen->Precompute(myMesh, myMainShape, (SMESH::Dimension)dim, aShapesId);
@@ -2003,9 +2007,7 @@ void SMESHGUI_PrecomputeOp::onPreview()
   }
 
   try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
     OCC_CATCH_SIGNALS;
-#endif
     aCompErrors = gen->GetComputeErrors( myMesh, myMainShape );
     // check if there are memory problems
     for ( CORBA::ULong i = 0; (i < aCompErrors->length()) && !memoryLack; ++i )
@@ -2221,9 +2223,7 @@ void SMESHGUI_BaseComputeOp::evaluateMesh()
     }
     SUIT_OverrideCursor aWaitCursor;
     try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
       OCC_CATCH_SIGNALS;
-#endif
       aRes = gen->Evaluate(myMesh, myMainShape);
     }
     catch(const SALOME::SALOME_Exception & S_ex){
@@ -2231,9 +2231,7 @@ void SMESHGUI_BaseComputeOp::evaluateMesh()
     }
 
     try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
       OCC_CATCH_SIGNALS;
-#endif
       aCompErrors = gen->GetComputeErrors( myMesh, myMainShape );
     }
     catch(const SALOME::SALOME_Exception & S_ex){