]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
changes due to the fact that Tetra_3D has been replaced by NETGEN_3D plus
authornadir <nadir>
Mon, 24 Nov 2003 13:22:53 +0000 (13:22 +0000)
committernadir <nadir>
Mon, 24 Nov 2003 13:22:53 +0000 (13:22 +0000)
few changes (misc).

src/SMESHGUI/SMESHGUI.cxx
src/SMESHGUI/SMESHGUI.h

index f87fa254605cf42ffa64127a7d0a3560577c5cd6..e02913ede98d8da55d5d12f1109fc89b04092e48 100644 (file)
@@ -846,7 +846,7 @@ void SMESHGUI::CreateAlgorithm( QString TypeAlgo, QString NameAlgo )
       Hyp = myComponentMesh->CreateHypothesis( TypeAlgo, myStudyId );
     else if ( TypeAlgo.compare("Hexa_3D") == 0 )
       Hyp = myComponentMesh->CreateHypothesis( TypeAlgo, myStudyId );
-    else if ( TypeAlgo.compare("Tetra_3D") == 0 )
+    else if ( TypeAlgo.compare("NETGEN_3D") == 0 )
       Hyp = myComponentMesh->CreateHypothesis( TypeAlgo, myStudyId );
     
     if ( !Hyp->_is_nil() ) {
@@ -930,7 +930,7 @@ void SMESHGUI::CreateMaxElementVolume( QString TypeHypothesis, QString NameHypot
  *
  */
 //=============================================================================
-void SMESHGUI::CreateNbSegments( QString TypeHypothesis, QString NameHypothesis, double nbSegments )
+void SMESHGUI::CreateNbSegments( QString TypeHypothesis, QString NameHypothesis, int nbSegments )
 {
   QApplication::setOverrideCursor( Qt::waitCursor );
   try {
@@ -1363,13 +1363,29 @@ void SMESHGUI::ChangeRepresentation( SMESH_Actor* ac, int type )
       float backfacecolor[3];
       float nodecolor[3];
       ac->GetColor(color[0],color[1],color[2]);
-      QColor c(color[0]*255,color[1]*255,color[2]*255);
+//       QColor c(color[0]*255,color[1]*255,color[2]*255);
+      int c0 = int(color[0]*255);
+      int c1 = int(color[1]*255);
+      int c2 = int(color[2]*255);
+      QColor c( c0, c1, c2 );
       ac->GetEdgeColor(edgecolor[0],edgecolor[1],edgecolor[2]);
-      QColor e(edgecolor[0]*255,edgecolor[1]*255,edgecolor[2]*255);
+//       QColor e(edgecolor[0]*255,edgecolor[1]*255,edgecolor[2]*255);
+      c0 = int(edgecolor[0]*255);
+      c1 = int(edgecolor[1]*255);
+      c2 = int(edgecolor[2]*255);
+      QColor e( c0, c1, c2 );
       ac->GetBackfaceProperty()->GetColor(backfacecolor);
-      QColor b(backfacecolor[0]*255,backfacecolor[1]*255,backfacecolor[2]*255);
+//       QColor b(backfacecolor[0]*255,backfacecolor[1]*255,backfacecolor[2]*255);
+      c0 = int(backfacecolor[0]*255);
+      c1 = int(backfacecolor[1]*255);
+      c2 = int(backfacecolor[2]*255);
+      QColor b( c0, c1, c2 );
       ac->GetNodeColor(nodecolor[0], nodecolor[1], nodecolor[2] ) ;
-      QColor n(nodecolor[0]*255, nodecolor[1]*255, nodecolor[2]*255 ) ;
+//       QColor n(nodecolor[0]*255, nodecolor[1]*255, nodecolor[2]*255 ) ;
+      c0 = int(nodecolor[0]*255);
+      c1 = int(nodecolor[1]*255);
+      c2 = int(nodecolor[2]*255);
+      QColor n( c0, c1, c2 ) ;
 
       int Edgewidth = (int)ac->EdgeDevice->GetProperty()->GetLineWidth();
       if ( Edgewidth == 0 )
@@ -2494,7 +2510,7 @@ bool SMESHGUI::OnGUIEvent(int theCommandID,       QAD_Desktop* parent)
       }
     case 5021: 
       {
-       smeshGUI->CreateAlgorithm("Tetra_3D","Tetrahedral (Netgen)");   
+       smeshGUI->CreateAlgorithm("NETGEN_3D","Tetrahedral (Netgen)");  
        break;
       }
 
@@ -5314,7 +5330,8 @@ void SMESHGUI::DisplaySimulationNode( SMESH::SMESH_Mesh_ptr aMesh, float x, floa
     QString SCb = QAD_CONFIG->getSetting("SMESH:SettingsNodeColorBlue");
     QColor nodecolor(SCr.toInt(), SCg.toInt(), SCb.toInt());
     if ( !nodecolor.isValid() )
-      nodecolor = QColor(0.,1.,0.);
+//       nodecolor = QColor(0.,1.,0.);
+      nodecolor = QColor(0,1,0);
 
     node->GetProperty()->SetColor( float(nodecolor.red())/255.,
                                   float(nodecolor.green())/255.,
index 37769bcb43fd435a5697f1374017c1735ca2a9e7..ee29287bfb2c54b9e87e3d2cce9a4a9e4cdcc10e 100644 (file)
@@ -150,7 +150,7 @@ public :
   void RemoveHypothesisOrAlgorithmOnMesh( SALOMEDS::SObject_ptr MorSM, SMESH::SMESH_Hypothesis_ptr anHyp ) ;
 
   void CreateLocalLength( QString TypeHypothesis, QString NameHypothesis, double Length );
-  void CreateNbSegments( QString TypeHypothesis, QString NameHypothesis, double nbSegments );
+  void CreateNbSegments( QString TypeHypothesis, QString NameHypothesis, int nbSegments );
   void CreateMaxElementArea( QString TypeHypothesis, QString NameHypothesis, double MaxArea );
   void CreateMaxElementVolume( QString TypeHypothesis, QString NameHypothesis, double MaxVolume );