Salome HOME
0022100: EDF 2413 SMESH: Take into account TRIA7
authoreap <eap@opencascade.com>
Thu, 16 May 2013 17:17:56 +0000 (17:17 +0000)
committereap <eap@opencascade.com>
Thu, 16 May 2013 17:17:56 +0000 (17:17 +0000)
doc/salome/gui/SMESH/input/adding_quadratic_elements.doc
doc/salome/gui/SMESH/input/convert_to_from_quadratic_mesh.doc
src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.cxx
src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.h
src/SMESHGUI/SMESHGUI_ConvToQuadOp.cxx
src/SMESHGUI/SMESHGUI_MeshEditPreview.cxx
src/SMESHGUI/SMESHGUI_MeshInfo.cxx
src/SMESHGUI/SMESHGUI_MeshInfosBox.cxx
src/SMESHGUI/SMESH_images.ts

index 11b7931d8f93e1750c46daacd2efa514c9347868..6a9527b5d04ac4326f901108010db5c04035004b 100644 (file)
@@ -8,11 +8,11 @@ Quadratic elements are defined by the same corner nodes as the
 corresponding linear ones, but in addition they have \a midside nodes
 located between the corner nodes on element sides.
 
 corresponding linear ones, but in addition they have \a midside nodes
 located between the corner nodes on element sides.
 
-If a quadratic quadrilateral element has an additional node at the
-element center, it is a bi-quadratic element (or
-QUAD9). If a quadratic hexahedral element has 7 additional nodes:
-at the element center and at the center of each side, it is a
-tri-quadratic element (or HEXA27).
+If a quadratic 2D element has an additional node at the
+element center, it is a bi-quadratic element (both TRIA7 and
+QUAD9 elements are supported). If a quadratic hexahedral element has 7
+additional nodes: at the element center and at the center of each
+side, it is a tri-quadratic element (or HEXA27).
 
 The convention of nodal connectivity of elements used in SALOME is
 the MED library convention. You can consult the description of nodal
 
 The convention of nodal connectivity of elements used in SALOME is
 the MED library convention. You can consult the description of nodal
@@ -56,20 +56,22 @@ a new quadratic element is not created.
 
 
 To create any <b>Quadratic Element</b> specify the nodes which will form your
 
 
 To create any <b>Quadratic Element</b> specify the nodes which will form your
-triangle by selecting them in the 3D viewer with pressed Shift
+element by selecting them in the 3D viewer with pressed Shift
 button. Their numbers will appear in the dialog box as <b>Corner Nodes</b>
 (alternatively you can just input numbers in this field without
 button. Their numbers will appear in the dialog box as <b>Corner Nodes</b>
 (alternatively you can just input numbers in this field without
-selection).The edges formed by the corner nodes will appear in the
-table. To define the middle nodes for each edge double-click on the
-respective field and input the number of the node. All edges and the
-object formed by them will be displayed in the Object browser. When
-all edges are defined you will be able to click \b Apply or <b>Apply and Close</b> button to
+selection). The edges formed by the corner nodes will appear in the
+table. To define the middle nodes for each edge, double-click on the
+respective field and input the number of the node (or pick the node in
+the viewer). For bi-quadratic and tri-quadratic elements, your also
+need to specify central nodes.
+As soon as all needed nodes are specified, a preview of a new
+quadratic element will be displayed in the 3D viewer. Then
+you will be able to click \b Apply or <b>Apply and Close</b> button to
 add the element to the mesh.
 
 \image html aqt.png
 
 add the element to the mesh.
 
 \image html aqt.png
 
-\b Reverse button for Quadratic Edges switches the first and the last
-nodes. For all other elements it reverses the element.
+\b Reverse button reverses the element.
 </li>
 </ol>
 
 </li>
 </ol>
 
index c8f53682fad4e1f85be74c3d2053afdc050ba191..ee68098e968f65316ff5e6e92f85e37d94a4f58b 100644 (file)
@@ -34,14 +34,15 @@ The following dialog box will appear:
 <ul>
 <li>If it is necessary to convert a linear mesh to quadratic or a quadratic
   mesh to linear. **Convert to bi-quadratic** option does the same as
 <ul>
 <li>If it is necessary to convert a linear mesh to quadratic or a quadratic
   mesh to linear. **Convert to bi-quadratic** option does the same as
-  **Convert to quadratic** except for that QUAD9 elements are created
-  instead of QUAD8, and HEXA27 elements are created instead of
-  HEXA20. Note that the choice is available only if the selected mesh
-  (or sub-mesh) contains both quadratic and linear elements, else the
+  **Convert to quadratic** except for that TRIA7, QUAD9 and HEXA27
+  elements are created instead of TRIA6, QUAD8, and HEXA20 elements
+  respectively. Note that the choice is available only if the selected
+  mesh (or sub-mesh) contains both quadratic and linear elements, else the
   direction of conversion is selected automatically.</li>
   direction of conversion is selected automatically.</li>
-<li>If it is necessary to place medium nodes of the quadratic mesh on the
-geometry (meshed object). This option is relevant for conversion to
-quadratic provided that the mesh is based on a geometry (not imported from file).</li>
+<li>If it is necessary to place **medium nodes** of the quadratic mesh **on the
+  geometry** (meshed object). This option is relevant for conversion to
+  quadratic provided that the mesh is based on a geometry (not imported
+  from file).</li> 
 </ul>
 
 \image html image156.gif
 </ul>
 
 \image html image156.gif
index 94fdeec8a5b45d9dd32e139f5506e975b0165839..652336eca4f03abd047ac0950fc3421e6b9557f6 100644 (file)
@@ -278,7 +278,6 @@ static int LastHexahedronIds[] =  {1,2,3,0,5,6,7,4,4,5,6,7};
   \brief Simple 'busy state' flag locker.
   \internal
 */
   \brief Simple 'busy state' flag locker.
   \internal
 */
-
 class BusyLocker
 {
 public:
 class BusyLocker
 {
 public:
@@ -295,7 +294,6 @@ private:
   \brief Simple editable table item.
   \internal
 */
   \brief Simple editable table item.
   \internal
 */
-
 class IdEditItem: public QTableWidgetItem
 {
 public:
 class IdEditItem: public QTableWidgetItem
 {
 public:
@@ -325,6 +323,7 @@ QWidget* IdEditItem::createEditor() const
 // function : SMESHGUI_AddQuadraticElementDlg()
 // purpose  : constructor
 //=================================================================================
 // function : SMESHGUI_AddQuadraticElementDlg()
 // purpose  : constructor
 //=================================================================================
+
 SMESHGUI_AddQuadraticElementDlg::SMESHGUI_AddQuadraticElementDlg( SMESHGUI* theModule,
                                                                   const SMDSAbs_EntityType theType )
   : QDialog( SMESH::GetDesktop( theModule ) ),
 SMESHGUI_AddQuadraticElementDlg::SMESHGUI_AddQuadraticElementDlg( SMESHGUI* theModule,
                                                                   const SMDSAbs_EntityType theType )
   : QDialog( SMESH::GetDesktop( theModule ) ),
@@ -358,6 +357,9 @@ SMESHGUI_AddQuadraticElementDlg::SMESHGUI_AddQuadraticElementDlg( SMESHGUI* theM
   case SMDSEntity_BiQuad_Quadrangle:
     anElementName = QString("BIQUADRATIC_QUADRANGLE");
     break;
   case SMDSEntity_BiQuad_Quadrangle:
     anElementName = QString("BIQUADRATIC_QUADRANGLE");
     break;
+  case SMDSEntity_BiQuad_Triangle:
+    anElementName = QString("BIQUADRATIC_TRIANGLE");
+    break;
   case SMDSEntity_Quad_Tetra:
     anElementName = QString("QUADRATIC_TETRAHEDRON");
     break;
   case SMDSEntity_Quad_Tetra:
     anElementName = QString("QUADRATIC_TETRAHEDRON");
     break;
@@ -501,6 +503,7 @@ SMESHGUI_AddQuadraticElementDlg::SMESHGUI_AddQuadraticElementDlg( SMESHGUI* theM
 // function : ~SMESHGUI_AddQuadraticElementDlg()
 // purpose  : Destroys the object and frees any allocated resources
 //=================================================================================
 // function : ~SMESHGUI_AddQuadraticElementDlg()
 // purpose  : Destroys the object and frees any allocated resources
 //=================================================================================
+
 SMESHGUI_AddQuadraticElementDlg::~SMESHGUI_AddQuadraticElementDlg()
 {
   delete mySimulation;
 SMESHGUI_AddQuadraticElementDlg::~SMESHGUI_AddQuadraticElementDlg()
 {
   delete mySimulation;
@@ -510,6 +513,7 @@ SMESHGUI_AddQuadraticElementDlg::~SMESHGUI_AddQuadraticElementDlg()
 // function : Init()
 // purpose  :
 //=================================================================================
 // function : Init()
 // purpose  :
 //=================================================================================
+
 void SMESHGUI_AddQuadraticElementDlg::Init()
 {
   myRadioButton1->setChecked(true);
 void SMESHGUI_AddQuadraticElementDlg::Init()
 {
   myRadioButton1->setChecked(true);
@@ -535,6 +539,12 @@ void SMESHGUI_AddQuadraticElementDlg::Init()
     myNbCorners = 3;
     myHelpFileName = "adding_quadratic_elements_page.html#?"; //Adding_triangles
     break;
     myNbCorners = 3;
     myHelpFileName = "adding_quadratic_elements_page.html#?"; //Adding_triangles
     break;
+  case SMDSEntity_BiQuad_Triangle:
+    aNumRows = 3;
+    myNbCorners = 3;
+    myNbCenterNodes = 1;
+    myHelpFileName = "adding_quadratic_elements_page.html#?"; //Adding_triangles
+    break;
   case SMDSEntity_Quad_Quadrangle:
     aNumRows = 4;
     myNbCorners = 4;
   case SMDSEntity_Quad_Quadrangle:
     aNumRows = 4;
     myNbCorners = 4;
@@ -651,13 +661,14 @@ void SMESHGUI_AddQuadraticElementDlg::Init()
 // function : ClickOnApply()
 // purpose  :
 //=================================================================================
 // function : ClickOnApply()
 // purpose  :
 //=================================================================================
-void SMESHGUI_AddQuadraticElementDlg::ClickOnApply()
+
+bool SMESHGUI_AddQuadraticElementDlg::ClickOnApply()
 {
   if( !isValid() )
 {
   if( !isValid() )
-    return;
+    return false;
 
   if ( mySMESHGUI->isActiveStudyLocked() || myBusy || !IsValid() )
 
   if ( mySMESHGUI->isActiveStudyLocked() || myBusy || !IsValid() )
-    return;
+    return false;
 
   BusyLocker lock( myBusy );
 
 
   BusyLocker lock( myBusy );
 
@@ -671,6 +682,7 @@ void SMESHGUI_AddQuadraticElementDlg::ClickOnApply()
     break;
   case SMDSEntity_Quad_Triangle:
   case SMDSEntity_Quad_Quadrangle:
     break;
   case SMDSEntity_Quad_Triangle:
   case SMDSEntity_Quad_Quadrangle:
+  case SMDSEntity_BiQuad_Triangle:
   case SMDSEntity_BiQuad_Quadrangle:
   case SMDSEntity_Quad_Tetra:
   case SMDSEntity_Quad_Pyramid:
   case SMDSEntity_BiQuad_Quadrangle:
   case SMDSEntity_Quad_Tetra:
   case SMDSEntity_Quad_Pyramid:
@@ -722,7 +734,7 @@ void SMESHGUI_AddQuadraticElementDlg::ClickOnApply()
         int res = SUIT_MessageBox::question( this, tr( "SMESH_WRN_WARNING" ),
                                              tr( "MESH_STANDALONE_GRP_CHOSEN" ).arg( aGroupName ),
                                              tr( "SMESH_BUT_YES" ), tr( "SMESH_BUT_NO" ), 0, 1 );
         int res = SUIT_MessageBox::question( this, tr( "SMESH_WRN_WARNING" ),
                                              tr( "MESH_STANDALONE_GRP_CHOSEN" ).arg( aGroupName ),
                                              tr( "SMESH_BUT_YES" ), tr( "SMESH_BUT_NO" ), 0, 1 );
-        if ( res == 1 ) return;
+        if ( res == 1 ) return false;
       }
       aGroup = myGroups[idx-1];
     }
       }
       aGroup = myGroups[idx-1];
     }
@@ -737,6 +749,7 @@ void SMESHGUI_AddQuadraticElementDlg::ClickOnApply()
     anElemId = aMeshEditor->AddEdge(anArrayOfIdeces.inout()); break;
   case SMDSEntity_Quad_Triangle:
   case SMDSEntity_Quad_Quadrangle:
     anElemId = aMeshEditor->AddEdge(anArrayOfIdeces.inout()); break;
   case SMDSEntity_Quad_Triangle:
   case SMDSEntity_Quad_Quadrangle:
+  case SMDSEntity_BiQuad_Triangle:
   case SMDSEntity_BiQuad_Quadrangle:
     anElementType = SMESH::FACE;
     anElemId = aMeshEditor->AddFace(anArrayOfIdeces.inout()); break;
   case SMDSEntity_BiQuad_Quadrangle:
     anElementType = SMESH::FACE;
     anElemId = aMeshEditor->AddFace(anArrayOfIdeces.inout()); break;
@@ -794,22 +807,26 @@ void SMESHGUI_AddQuadraticElementDlg::ClickOnApply()
   updateButtons();
 
   SMESHGUI::Modified();
   updateButtons();
 
   SMESHGUI::Modified();
+
+  return true;
 }
 
 //=================================================================================
 // function : ClickOnOk()
 // purpose  :
 //=================================================================================
 }
 
 //=================================================================================
 // function : ClickOnOk()
 // purpose  :
 //=================================================================================
+
 void SMESHGUI_AddQuadraticElementDlg::ClickOnOk()
 {
 void SMESHGUI_AddQuadraticElementDlg::ClickOnOk()
 {
-  ClickOnApply();
-  reject();
+  if ( ClickOnApply() )
+    reject();
 }
 
 //=================================================================================
 // function : reject()
 // purpose  :
 //=================================================================================
 }
 
 //=================================================================================
 // function : reject()
 // purpose  :
 //=================================================================================
+
 void SMESHGUI_AddQuadraticElementDlg::reject()
 {
   mySelectionMgr->clearSelected();
 void SMESHGUI_AddQuadraticElementDlg::reject()
 {
   mySelectionMgr->clearSelected();
@@ -826,6 +843,7 @@ void SMESHGUI_AddQuadraticElementDlg::reject()
 // function : ClickOnHelp()
 // purpose  :
 //=================================================================================
 // function : ClickOnHelp()
 // purpose  :
 //=================================================================================
+
 void SMESHGUI_AddQuadraticElementDlg::ClickOnHelp()
 {
   LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
 void SMESHGUI_AddQuadraticElementDlg::ClickOnHelp()
 {
   LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
@@ -850,6 +868,7 @@ void SMESHGUI_AddQuadraticElementDlg::ClickOnHelp()
 // function : onTextChange()
 // purpose  :
 //=================================================================================
 // function : onTextChange()
 // purpose  :
 //=================================================================================
+
 void SMESHGUI_AddQuadraticElementDlg::onTextChange (const QString& theNewText)
 {
   if (myBusy) return;
 void SMESHGUI_AddQuadraticElementDlg::onTextChange (const QString& theNewText)
 {
   if (myBusy) return;
@@ -901,6 +920,7 @@ void SMESHGUI_AddQuadraticElementDlg::onTextChange (const QString& theNewText)
 // function : SelectionIntoArgument()
 // purpose  : Called when selection has changed
 //=================================================================================
 // function : SelectionIntoArgument()
 // purpose  : Called when selection has changed
 //=================================================================================
+
 void SMESHGUI_AddQuadraticElementDlg::SelectionIntoArgument()
 {
   if (myBusy) return;
 void SMESHGUI_AddQuadraticElementDlg::SelectionIntoArgument()
 {
   if (myBusy) return;
@@ -951,6 +971,7 @@ void SMESHGUI_AddQuadraticElementDlg::SelectionIntoArgument()
       anElementType = SMESH::EDGE; break;
     case SMDSEntity_Quad_Triangle:
     case SMDSEntity_Quad_Quadrangle:
       anElementType = SMESH::EDGE; break;
     case SMDSEntity_Quad_Triangle:
     case SMDSEntity_Quad_Quadrangle:
+    case SMDSEntity_BiQuad_Triangle:
     case SMDSEntity_BiQuad_Quadrangle:
       anElementType = SMESH::FACE; break;
     case SMDSEntity_Quad_Tetra:
     case SMDSEntity_BiQuad_Quadrangle:
       anElementType = SMESH::FACE; break;
     case SMDSEntity_Quad_Tetra:
@@ -1008,6 +1029,7 @@ void SMESHGUI_AddQuadraticElementDlg::SelectionIntoArgument()
 // function : displaySimulation()
 // purpose  :
 //=================================================================================
 // function : displaySimulation()
 // purpose  :
 //=================================================================================
+
 void SMESHGUI_AddQuadraticElementDlg::displaySimulation()
 {
   if ( IsValid() )
 void SMESHGUI_AddQuadraticElementDlg::displaySimulation()
 {
   if ( IsValid() )
@@ -1068,6 +1090,7 @@ void SMESHGUI_AddQuadraticElementDlg::displaySimulation()
 // function : SetCurrentSelection()
 // purpose  :
 //=================================================================================
 // function : SetCurrentSelection()
 // purpose  :
 //=================================================================================
+
 void SMESHGUI_AddQuadraticElementDlg::SetCurrentSelection()
 {
   QPushButton* send = (QPushButton*)sender();
 void SMESHGUI_AddQuadraticElementDlg::SetCurrentSelection()
 {
   QPushButton* send = (QPushButton*)sender();
@@ -1091,6 +1114,7 @@ void SMESHGUI_AddQuadraticElementDlg::SetCurrentSelection()
 // function : DeactivateActiveDialog()
 // purpose  :
 //=================================================================================
 // function : DeactivateActiveDialog()
 // purpose  :
 //=================================================================================
+
 void SMESHGUI_AddQuadraticElementDlg::DeactivateActiveDialog()
 {
   if (GroupConstructors->isEnabled()) {
 void SMESHGUI_AddQuadraticElementDlg::DeactivateActiveDialog()
 {
   if (GroupConstructors->isEnabled()) {
@@ -1107,6 +1131,7 @@ void SMESHGUI_AddQuadraticElementDlg::DeactivateActiveDialog()
 // function : ActivateThisDialog()
 // purpose  :
 //=================================================================================
 // function : ActivateThisDialog()
 // purpose  :
 //=================================================================================
+
 void SMESHGUI_AddQuadraticElementDlg::ActivateThisDialog()
 {
   /* Emit a signal to deactivate the active dialog */
 void SMESHGUI_AddQuadraticElementDlg::ActivateThisDialog()
 {
   /* Emit a signal to deactivate the active dialog */
@@ -1127,6 +1152,7 @@ void SMESHGUI_AddQuadraticElementDlg::ActivateThisDialog()
 // function : enterEvent()
 // purpose  :
 //=================================================================================
 // function : enterEvent()
 // purpose  :
 //=================================================================================
+
 void SMESHGUI_AddQuadraticElementDlg::enterEvent (QEvent*)
 {
   if (GroupConstructors->isEnabled())
 void SMESHGUI_AddQuadraticElementDlg::enterEvent (QEvent*)
 {
   if (GroupConstructors->isEnabled())
@@ -1138,6 +1164,7 @@ void SMESHGUI_AddQuadraticElementDlg::enterEvent (QEvent*)
 // function : onReverse()
 // purpose  :
 //=================================================================================
 // function : onReverse()
 // purpose  :
 //=================================================================================
+
 void SMESHGUI_AddQuadraticElementDlg::onReverse (int state)
 {
   mySimulation->SetVisibility(false);
 void SMESHGUI_AddQuadraticElementDlg::onReverse (int state)
 {
   mySimulation->SetVisibility(false);
@@ -1145,11 +1172,11 @@ void SMESHGUI_AddQuadraticElementDlg::onReverse (int state)
   updateButtons();
 }
 
   updateButtons();
 }
 
-
 //=================================================================================
 // function : IsValid()
 // purpose  :
 //=================================================================================
 //=================================================================================
 // function : IsValid()
 // purpose  :
 //=================================================================================
+
 bool SMESHGUI_AddQuadraticElementDlg::IsValid()
 {
   SMDS_Mesh* aMesh = 0;
 bool SMESHGUI_AddQuadraticElementDlg::IsValid()
 {
   SMDS_Mesh* aMesh = 0;
@@ -1196,6 +1223,7 @@ bool SMESHGUI_AddQuadraticElementDlg::IsValid()
 // function : UpdateTable()
 // purpose  :
 //=================================================================================
 // function : UpdateTable()
 // purpose  :
 //=================================================================================
+
 void SMESHGUI_AddQuadraticElementDlg::UpdateTable( bool theConersValidity )
 {
   QStringList aListCorners = myCornerNodes->text().split(" ", QString::SkipEmptyParts);
 void SMESHGUI_AddQuadraticElementDlg::UpdateTable( bool theConersValidity )
 {
   QStringList aListCorners = myCornerNodes->text().split(" ", QString::SkipEmptyParts);
@@ -1217,6 +1245,7 @@ void SMESHGUI_AddQuadraticElementDlg::UpdateTable( bool theConersValidity )
       aLastColIds  = LastEdgeIds;
       break;
     case SMDSEntity_Quad_Triangle:
       aLastColIds  = LastEdgeIds;
       break;
     case SMDSEntity_Quad_Triangle:
+    case SMDSEntity_BiQuad_Triangle:
       aFirstColIds = FirstTriangleIds;
       aLastColIds  = LastTriangleIds;
       break;
       aFirstColIds = FirstTriangleIds;
       aLastColIds  = LastTriangleIds;
       break;
@@ -1262,11 +1291,11 @@ void SMESHGUI_AddQuadraticElementDlg::UpdateTable( bool theConersValidity )
   }
 }
 
   }
 }
 
-
 //=================================================================================
 // function : onTableActivate()
 // purpose  :
 //=================================================================================
 //=================================================================================
 // function : onTableActivate()
 // purpose  :
 //=================================================================================
+
 void SMESHGUI_AddQuadraticElementDlg::onCellDoubleClicked( int theRow, int theCol )
 {
   myCurrentLineEdit = 0;
 void SMESHGUI_AddQuadraticElementDlg::onCellDoubleClicked( int theRow, int theCol )
 {
   myCurrentLineEdit = 0;
@@ -1274,11 +1303,11 @@ void SMESHGUI_AddQuadraticElementDlg::onCellDoubleClicked( int theRow, int theCo
   updateButtons();
 }
 
   updateButtons();
 }
 
-
 //=================================================================================
 // function : onCellTextChange()
 // purpose  :
 //=================================================================================
 //=================================================================================
 // function : onCellTextChange()
 // purpose  :
 //=================================================================================
+
 void SMESHGUI_AddQuadraticElementDlg::onCellTextChange(int theRow, int theCol)
 {
   myCurrentLineEdit = 0;
 void SMESHGUI_AddQuadraticElementDlg::onCellTextChange(int theRow, int theCol)
 {
   myCurrentLineEdit = 0;
@@ -1290,6 +1319,7 @@ void SMESHGUI_AddQuadraticElementDlg::onCellTextChange(int theRow, int theCol)
 // function : keyPressEvent()
 // purpose  :
 //=================================================================================
 // function : keyPressEvent()
 // purpose  :
 //=================================================================================
+
 void SMESHGUI_AddQuadraticElementDlg::keyPressEvent( QKeyEvent* e )
 {
   QDialog::keyPressEvent( e );
 void SMESHGUI_AddQuadraticElementDlg::keyPressEvent( QKeyEvent* e )
 {
   QDialog::keyPressEvent( e );
@@ -1302,6 +1332,11 @@ void SMESHGUI_AddQuadraticElementDlg::keyPressEvent( QKeyEvent* e )
   }
 }
 
   }
 }
 
+//=======================================================================
+//function : updateButtons
+//purpose  : 
+//=======================================================================
+
 void SMESHGUI_AddQuadraticElementDlg::updateButtons()
 {
   bool valid = IsValid();
 void SMESHGUI_AddQuadraticElementDlg::updateButtons()
 {
   bool valid = IsValid();
@@ -1313,6 +1348,7 @@ void SMESHGUI_AddQuadraticElementDlg::updateButtons()
 // function : isValid
 // purpose  :
 //=================================================================================
 // function : isValid
 // purpose  :
 //=================================================================================
+
 bool SMESHGUI_AddQuadraticElementDlg::isValid()
 {
   if( GroupGroups->isChecked() && ComboBox_GroupName->currentText().isEmpty() ) {
 bool SMESHGUI_AddQuadraticElementDlg::isValid()
 {
   if( GroupGroups->isChecked() && ComboBox_GroupName->currentText().isEmpty() ) {
index 6639f6c7c410426736faa9db5c8c2d02c84aa7fd..f6ba14d1e10a89c1daf99cf40770d0168e50d658 100644 (file)
@@ -136,7 +136,7 @@ private slots:
   void                        onCellDoubleClicked( int, int );
   
   void                        ClickOnOk();
   void                        onCellDoubleClicked( int, int );
   
   void                        ClickOnOk();
-  void                        ClickOnApply();
+  bool                        ClickOnApply();
   void                        ClickOnHelp();
   void                        SetCurrentSelection();
   void                        SelectionIntoArgument();
   void                        ClickOnHelp();
   void                        SetCurrentSelection();
   void                        SelectionIntoArgument();
index b32a648bae76cfd9dc3e75f088859aa7a711b679..33e1aaf078e01388236138f6436385dff420a9c2 100644 (file)
@@ -330,11 +330,14 @@ SMESHGUI_ConvToQuadOp::DestinationMesh( const SMESH::SMESH_IDSource_var& idSourc
 {
   SMESH::long_array_var nbElemOfType = idSource->GetMeshInfo();
 
 {
   SMESH::long_array_var nbElemOfType = idSource->GetMeshInfo();
 
-  bool hasBiQuad     = ( nbElemOfType[SMDSEntity_BiQuad_Quadrangle ] ||
+  bool hasBiQuad     = ( nbElemOfType[SMDSEntity_BiQuad_Triangle   ] ||
+                         nbElemOfType[SMDSEntity_BiQuad_Quadrangle ] ||
                          nbElemOfType[SMDSEntity_TriQuad_Hexa      ] );
                          nbElemOfType[SMDSEntity_TriQuad_Hexa      ] );
-  bool hasLinStruct  = ( nbElemOfType[SMDSEntity_Quadrangle ] ||
+  bool hasLinBiQuad  = ( nbElemOfType[SMDSEntity_Triangle   ] ||
+                         nbElemOfType[SMDSEntity_Quadrangle ] ||
                          nbElemOfType[SMDSEntity_Hexa       ] );
                          nbElemOfType[SMDSEntity_Hexa       ] );
-  bool hasQuadStruct = ( nbElemOfType[SMDSEntity_Quad_Quadrangle ] ||
+  bool hasQuadBiQuad = ( nbElemOfType[SMDSEntity_Quad_Triangle   ] ||
+                         nbElemOfType[SMDSEntity_Quad_Quadrangle ] ||
                          nbElemOfType[SMDSEntity_Quad_Hexa       ] );
 
   bool hasQuad = ( nbElemOfType[SMDSEntity_Quad_Edge      ] ||
                          nbElemOfType[SMDSEntity_Quad_Hexa       ] );
 
   bool hasQuad = ( nbElemOfType[SMDSEntity_Quad_Edge      ] ||
@@ -356,9 +359,9 @@ SMESHGUI_ConvToQuadOp::DestinationMesh( const SMESH::SMESH_IDSource_var& idSourc
   int tgtType = 0;
   if ( hasBiQuad )
     tgtType |= ( Quadratic | Linear );
   int tgtType = 0;
   if ( hasBiQuad )
     tgtType |= ( Quadratic | Linear );
-  if ( hasLinStruct )
+  if ( hasLinBiQuad )
     tgtType |= ( BiQuadratic | Quadratic );
     tgtType |= ( BiQuadratic | Quadratic );
-  if ( hasQuadStruct )
+  if ( hasQuadBiQuad )
     tgtType |= ( BiQuadratic | Linear );
   if ( hasQuad )
     tgtType |= Linear;
     tgtType |= ( BiQuadratic | Linear );
   if ( hasQuad )
     tgtType |= Linear;
index 358b2cf402a17b462dcd38ff266eef4be1224b37..439abbb57c86c3f93b0d948c7cabe6c76f689e09 100644 (file)
@@ -111,8 +111,8 @@ SMESHGUI_MeshEditPreview::~SMESHGUI_MeshEditPreview()
 //================================================================================
 
 vtkIdType getCellType( const SMDSAbs_ElementType theType,
 //================================================================================
 
 vtkIdType getCellType( const SMDSAbs_ElementType theType,
-                       const bool thePoly,
-                       const int theNbNodes )
+                       const bool                thePoly,
+                       const int                 theNbNodes )
 {
   switch( theType ) 
   {
 {
   switch( theType ) 
   {
@@ -127,6 +127,7 @@ vtkIdType getCellType( const SMDSAbs_ElementType theType,
     else if ( theNbNodes == 3 )   return VTK_TRIANGLE;
     else if ( theNbNodes == 4 )   return VTK_QUAD;
     else if ( theNbNodes == 6 )   return VTK_QUADRATIC_TRIANGLE;
     else if ( theNbNodes == 3 )   return VTK_TRIANGLE;
     else if ( theNbNodes == 4 )   return VTK_QUAD;
     else if ( theNbNodes == 6 )   return VTK_QUADRATIC_TRIANGLE;
+    else if ( theNbNodes == 7 )   return VTK_BIQUADRATIC_TRIANGLE;
     else if ( theNbNodes == 8 )   return VTK_QUADRATIC_QUAD;
     else if ( theNbNodes == 9 )   return VTK_BIQUADRATIC_QUAD;
     else return VTK_EMPTY_CELL;
     else if ( theNbNodes == 8 )   return VTK_QUADRATIC_QUAD;
     else if ( theNbNodes == 9 )   return VTK_BIQUADRATIC_QUAD;
     else return VTK_EMPTY_CELL;
index e52f32026e106cda32e1fcc53c4bcbc04290fc98..aad40cdb2c098427bce3f36cee01e701d1a8f5f0 100644 (file)
@@ -491,16 +491,16 @@ void SMESHGUI_MeshInfo::showInfo( SMESH::SMESH_IDSource_ptr obj )
     myWidgets[i1D][iTotal]    ->setProperty( "text", QString::number( nbEdges ) );
     myWidgets[i1D][iLinear]   ->setProperty( "text", QString::number( info[SMDSEntity_Edge] ) );
     myWidgets[i1D][iQuadratic]->setProperty( "text", QString::number( info[SMDSEntity_Quad_Edge] ) );
     myWidgets[i1D][iTotal]    ->setProperty( "text", QString::number( nbEdges ) );
     myWidgets[i1D][iLinear]   ->setProperty( "text", QString::number( info[SMDSEntity_Edge] ) );
     myWidgets[i1D][iQuadratic]->setProperty( "text", QString::number( info[SMDSEntity_Quad_Edge] ) );
-    long nbTriangles   = info[SMDSEntity_Triangle]   + info[SMDSEntity_Quad_Triangle];
+    long nbTriangles   = info[SMDSEntity_Triangle]   + info[SMDSEntity_Quad_Triangle]   + info[SMDSEntity_BiQuad_Triangle];
     long nbQuadrangles = info[SMDSEntity_Quadrangle] + info[SMDSEntity_Quad_Quadrangle] + info[SMDSEntity_BiQuad_Quadrangle];
     long nb2DLinear    = info[SMDSEntity_Triangle] + info[SMDSEntity_Quadrangle] + info[SMDSEntity_Polygon];
     long nbQuadrangles = info[SMDSEntity_Quadrangle] + info[SMDSEntity_Quad_Quadrangle] + info[SMDSEntity_BiQuad_Quadrangle];
     long nb2DLinear    = info[SMDSEntity_Triangle] + info[SMDSEntity_Quadrangle] + info[SMDSEntity_Polygon];
-    long nb2DQuadratic = info[SMDSEntity_Quad_Triangle] + info[SMDSEntity_Quad_Quadrangle] + info[SMDSEntity_BiQuad_Quadrangle];
+    long nb2DQuadratic = info[SMDSEntity_Quad_Triangle] + info[SMDSEntity_BiQuad_Triangle] + info[SMDSEntity_Quad_Quadrangle] + info[SMDSEntity_BiQuad_Quadrangle];
     myWidgets[i2D][iTotal]               ->setProperty( "text", QString::number( nb2DLinear + nb2DQuadratic ) );
     myWidgets[i2D][iLinear]              ->setProperty( "text", QString::number( nb2DLinear ) );
     myWidgets[i2D][iQuadratic]           ->setProperty( "text", QString::number( nb2DQuadratic ) );
     myWidgets[i2DTriangles][iTotal]      ->setProperty( "text", QString::number( nbTriangles ) );
     myWidgets[i2DTriangles][iLinear]     ->setProperty( "text", QString::number( info[SMDSEntity_Triangle] ) );
     myWidgets[i2D][iTotal]               ->setProperty( "text", QString::number( nb2DLinear + nb2DQuadratic ) );
     myWidgets[i2D][iLinear]              ->setProperty( "text", QString::number( nb2DLinear ) );
     myWidgets[i2D][iQuadratic]           ->setProperty( "text", QString::number( nb2DQuadratic ) );
     myWidgets[i2DTriangles][iTotal]      ->setProperty( "text", QString::number( nbTriangles ) );
     myWidgets[i2DTriangles][iLinear]     ->setProperty( "text", QString::number( info[SMDSEntity_Triangle] ) );
-    myWidgets[i2DTriangles][iQuadratic]  ->setProperty( "text", QString::number( info[SMDSEntity_Quad_Triangle] ) );
+    myWidgets[i2DTriangles][iQuadratic]  ->setProperty( "text", QString::number( info[SMDSEntity_Quad_Triangle] + info[SMDSEntity_BiQuad_Triangle]) );
     myWidgets[i2DQuadrangles][iTotal]    ->setProperty( "text", QString::number( nbQuadrangles ) );
     myWidgets[i2DQuadrangles][iLinear]   ->setProperty( "text", QString::number( info[SMDSEntity_Quadrangle] ) );
     myWidgets[i2DQuadrangles][iQuadratic]->setProperty( "text", QString::number( info[SMDSEntity_Quad_Quadrangle] + info[SMDSEntity_BiQuad_Quadrangle] ));
     myWidgets[i2DQuadrangles][iTotal]    ->setProperty( "text", QString::number( nbQuadrangles ) );
     myWidgets[i2DQuadrangles][iLinear]   ->setProperty( "text", QString::number( info[SMDSEntity_Quadrangle] ) );
     myWidgets[i2DQuadrangles][iQuadratic]->setProperty( "text", QString::number( info[SMDSEntity_Quad_Quadrangle] + info[SMDSEntity_BiQuad_Quadrangle] ));
@@ -1208,7 +1208,7 @@ void SMESHGUI_SimpleElemInfo::information( const QList<long>& ids )
         SMESH::Controls::NumericalFunctorPtr afunctor;
         if ( !e ) return;
         
         SMESH::Controls::NumericalFunctorPtr afunctor;
         if ( !e ) return;
         
-        // element ID && type
+        // Element ID && Type
         QString stype;
         switch( e->GetType() ) {
         case SMDSAbs_0DElement:
         QString stype;
         switch( e->GetType() ) {
         case SMDSAbs_0DElement:
@@ -1228,11 +1228,13 @@ void SMESHGUI_SimpleElemInfo::information( const QList<long>& ids )
         myInfo->append( QString( "<b>%1 #%2</b>" ).arg( stype ).arg( id ) );
         // separator
         myInfo->append( "" );
         myInfo->append( QString( "<b>%1 #%2</b>" ).arg( stype ).arg( id ) );
         // separator
         myInfo->append( "" );
-        // geometry type
+
+        // Geometry type
         QString gtype;
         switch( e->GetEntityType() ) {
         case SMDSEntity_Triangle:
         case SMDSEntity_Quad_Triangle:
         QString gtype;
         switch( e->GetEntityType() ) {
         case SMDSEntity_Triangle:
         case SMDSEntity_Quad_Triangle:
+        case SMDSEntity_BiQuad_Triangle:
           gtype = SMESHGUI_ElemInfo::tr( "TRIANGLE" ); break;
         case SMDSEntity_Quadrangle:
         case SMDSEntity_Quad_Quadrangle:
           gtype = SMESHGUI_ElemInfo::tr( "TRIANGLE" ); break;
         case SMDSEntity_Quadrangle:
         case SMDSEntity_Quad_Quadrangle:
@@ -1264,23 +1266,19 @@ void SMESHGUI_SimpleElemInfo::information( const QList<long>& ids )
         }
         if ( !gtype.isEmpty() )
           myInfo->append( QString( "<b>%1:</b> %2" ).arg( SMESHGUI_ElemInfo::tr( "TYPE" ) ).arg( gtype ) );
         }
         if ( !gtype.isEmpty() )
           myInfo->append( QString( "<b>%1:</b> %2" ).arg( SMESHGUI_ElemInfo::tr( "TYPE" ) ).arg( gtype ) );
-        // quadratic flag and gravity center (any element except 0D)
+
+        // Quadratic flag (any element except 0D)
         if ( e->GetEntityType() > SMDSEntity_0D && e->GetEntityType() < SMDSEntity_Ball ) {
         if ( e->GetEntityType() > SMDSEntity_0D && e->GetEntityType() < SMDSEntity_Ball ) {
-          // quadratic flag
           myInfo->append( QString( "<b>%1?</b> %2" ).arg( SMESHGUI_ElemInfo::tr( "QUADRATIC" ) ).arg( e->IsQuadratic() ? SMESHGUI_ElemInfo::tr( "YES" ) : SMESHGUI_ElemInfo::tr( "NO" ) ) );
           myInfo->append( QString( "<b>%1?</b> %2" ).arg( SMESHGUI_ElemInfo::tr( "QUADRATIC" ) ).arg( e->IsQuadratic() ? SMESHGUI_ElemInfo::tr( "YES" ) : SMESHGUI_ElemInfo::tr( "NO" ) ) );
-          // separator
-          myInfo->append( "" );
-          // gravity center
-          XYZ gc = gravityCenter( e );
-          myInfo->append( QString( "<b>%1:</b> (%2, %3, %4)" ).arg( SMESHGUI_ElemInfo::tr( "GRAVITY_CENTER" ) ).arg( gc.x() ).arg( gc.y() ).arg( gc.z() ) );
         }
         if ( const SMDS_BallElement* ball = dynamic_cast<const SMDS_BallElement*>( e )) {
         }
         if ( const SMDS_BallElement* ball = dynamic_cast<const SMDS_BallElement*>( e )) {
-          // ball diameter
+          // Ball diameter
           myInfo->append( QString( "<b>%1:</b> %2" ).arg( SMESHGUI_ElemInfo::tr( "BALL_DIAMETER" ) ).arg( ball->GetDiameter() ));
         }
         // separator
         myInfo->append( "" );
           myInfo->append( QString( "<b>%1:</b> %2" ).arg( SMESHGUI_ElemInfo::tr( "BALL_DIAMETER" ) ).arg( ball->GetDiameter() ));
         }
         // separator
         myInfo->append( "" );
-        // connectivity
+
+        // Connectivity
         SMDS_ElemIteratorPtr nodeIt = e->nodesIterator();
         for ( int idx = 1; nodeIt->more(); idx++ ) {
           const SMDS_MeshNode* node = static_cast<const SMDS_MeshNode*>( nodeIt->next() );
         SMDS_ElemIteratorPtr nodeIt = e->nodesIterator();
         for ( int idx = 1; nodeIt->more(); idx++ ) {
           const SMDS_MeshNode* node = static_cast<const SMDS_MeshNode*>( nodeIt->next() );
@@ -1314,27 +1312,28 @@ void SMESHGUI_SimpleElemInfo::information( const QList<long>& ids )
         }
         // separator
         myInfo->append( "" );
         }
         // separator
         myInfo->append( "" );
-        //controls
+
+        // Controls
         myInfo->append( QString( "<b>%1:</b>" ).arg( SMESHGUI_ElemInfo::tr( "CONTROLS" ) ) );
         //Length
         myInfo->append( QString( "<b>%1:</b>" ).arg( SMESHGUI_ElemInfo::tr( "CONTROLS" ) ) );
         //Length
-        if ( e->GetType() == SMDSAbs_Edge ) {    
+        if ( e->GetType() == SMDSAbs_Edge ) {
           afunctor.reset( new SMESH::Controls::Length() );
           afunctor->SetMesh( actor()->GetObject()->GetMesh() );
           afunctor->SetPrecision( cprecision );
           myInfo->append( QString( "- <b>%1:</b> %2" ).arg( tr( "LENGTH_EDGES" ) ).arg( afunctor->GetValue( id ) ) );  
         }
         if( e->GetType() == SMDSAbs_Face ) {
           afunctor.reset( new SMESH::Controls::Length() );
           afunctor->SetMesh( actor()->GetObject()->GetMesh() );
           afunctor->SetPrecision( cprecision );
           myInfo->append( QString( "- <b>%1:</b> %2" ).arg( tr( "LENGTH_EDGES" ) ).arg( afunctor->GetValue( id ) ) );  
         }
         if( e->GetType() == SMDSAbs_Face ) {
-          //Area                         
+          //Area
           afunctor.reset(  new SMESH::Controls::Area() );
           afunctor->SetMesh( actor()->GetObject()->GetMesh() );
           afunctor->SetPrecision( cprecision );  
           myInfo->append( QString( "- <b>%1:</b> %2" ).arg( tr( "AREA_ELEMENTS" ) ).arg( afunctor->GetValue( id ) ) );
           afunctor.reset(  new SMESH::Controls::Area() );
           afunctor->SetMesh( actor()->GetObject()->GetMesh() );
           afunctor->SetPrecision( cprecision );  
           myInfo->append( QString( "- <b>%1:</b> %2" ).arg( tr( "AREA_ELEMENTS" ) ).arg( afunctor->GetValue( id ) ) );
-          //Taper        
+          //Taper
           afunctor.reset( new SMESH::Controls::Taper() );
           afunctor->SetMesh( actor()->GetObject()->GetMesh() );  
           afunctor->SetPrecision( cprecision );
           myInfo->append( QString( "- <b>%1:</b> %2" ).arg( tr( "TAPER_ELEMENTS" ) ).arg( afunctor->GetValue( id ) ) );
           afunctor.reset( new SMESH::Controls::Taper() );
           afunctor->SetMesh( actor()->GetObject()->GetMesh() );  
           afunctor->SetPrecision( cprecision );
           myInfo->append( QString( "- <b>%1:</b> %2" ).arg( tr( "TAPER_ELEMENTS" ) ).arg( afunctor->GetValue( id ) ) );
-          //AspectRatio2D        
+          //AspectRatio2D
           afunctor.reset( new SMESH::Controls::AspectRatio() );
           afunctor->SetMesh( actor()->GetObject()->GetMesh() );
           myInfo->append( QString( "- <b>%1:</b> %2" ).arg( tr( "ASPECTRATIO_ELEMENTS" ) ).arg( afunctor->GetValue( id ) ) );
           afunctor.reset( new SMESH::Controls::AspectRatio() );
           afunctor->SetMesh( actor()->GetObject()->GetMesh() );
           myInfo->append( QString( "- <b>%1:</b> %2" ).arg( tr( "ASPECTRATIO_ELEMENTS" ) ).arg( afunctor->GetValue( id ) ) );
@@ -1372,7 +1371,14 @@ void SMESHGUI_SimpleElemInfo::information( const QList<long>& ids )
           afunctor->SetMesh( actor()->GetObject()->GetMesh() );
           myInfo->append( QString( "- <b>%1:</b> %2" ).arg( tr( "MAX_ELEMENT_LENGTH_3D" ) ).arg( afunctor->GetValue( id ) ) );
         }
           afunctor->SetMesh( actor()->GetObject()->GetMesh() );
           myInfo->append( QString( "- <b>%1:</b> %2" ).arg( tr( "MAX_ELEMENT_LENGTH_3D" ) ).arg( afunctor->GetValue( id ) ) );
         }
-        // element position
+        // separator
+        myInfo->append( "" );
+
+        // Gravity center
+        XYZ gc = gravityCenter( e );
+        myInfo->append( QString( "<b>%1:</b> (%2, %3, %4)" ).arg( SMESHGUI_ElemInfo::tr( "GRAVITY_CENTER" ) ).arg( gc.x() ).arg( gc.y() ).arg( gc.z() ) );
+
+        // Element position
         if ( e->GetType() >= SMDSAbs_Edge && e->GetType() <= SMDSAbs_Volume ) {
           SMESH::SMESH_Mesh_ptr aMesh = actor()->GetObject()->GetMeshServer();    
           if ( !CORBA::is_nil( aMesh ) ) {
         if ( e->GetType() >= SMDSAbs_Edge && e->GetType() <= SMDSAbs_Volume ) {
           SMESH::SMESH_Mesh_ptr aMesh = actor()->GetObject()->GetMeshServer();    
           if ( !CORBA::is_nil( aMesh ) ) {
@@ -1393,7 +1399,8 @@ void SMESHGUI_SimpleElemInfo::information( const QList<long>& ids )
             }
           }
         }
             }
           }
         }
-        // groups element belongs to
+
+        // Groups the element belongs to
         SMESH::SMESH_Mesh_ptr aMesh = actor()->GetObject()->GetMeshServer();
         if ( !CORBA::is_nil( aMesh ) ) {
           SMESH::ListOfGroups_var  groups = aMesh->GetGroups();
         SMESH::SMESH_Mesh_ptr aMesh = actor()->GetObject()->GetMeshServer();
         if ( !CORBA::is_nil( aMesh ) ) {
           SMESH::ListOfGroups_var  groups = aMesh->GetGroups();
@@ -1721,18 +1728,12 @@ void SMESHGUI_TreeElemInfo::information( const QList<long>& ids )
         // element ID && type
         QString stype;
         switch( e->GetType() ) {
         // element ID && type
         QString stype;
         switch( e->GetType() ) {
-        case SMDSAbs_0DElement:
-          stype = SMESHGUI_ElemInfo::tr( "0D_ELEMENT" ); break;
-        case SMDSAbs_Ball:
-          stype = SMESHGUI_ElemInfo::tr( "BALL" ); break;
-        case SMDSAbs_Edge:
-          stype = SMESHGUI_ElemInfo::tr( "EDGE" ); break;
-        case SMDSAbs_Face:
-          stype = SMESHGUI_ElemInfo::tr( "FACE" ); break;
-        case SMDSAbs_Volume:
-          stype = SMESHGUI_ElemInfo::tr( "VOLUME" ); break;
-        default: 
-          break;
+        case SMDSAbs_0DElement: stype = SMESHGUI_ElemInfo::tr( "0D_ELEMENT" ); break;
+        case SMDSAbs_Ball:      stype = SMESHGUI_ElemInfo::tr( "BALL" ); break;
+        case SMDSAbs_Edge:      stype = SMESHGUI_ElemInfo::tr( "EDGE" ); break;
+        case SMDSAbs_Face:      stype = SMESHGUI_ElemInfo::tr( "FACE" ); break;
+        case SMDSAbs_Volume:    stype = SMESHGUI_ElemInfo::tr( "VOLUME" ); break;
+        default:;
         }
         if ( stype.isEmpty() ) return;
         QTreeWidgetItem* elemItem = createItem( 0, Bold | All );
         }
         if ( stype.isEmpty() ) return;
         QTreeWidgetItem* elemItem = createItem( 0, Bold | All );
@@ -1743,6 +1744,7 @@ void SMESHGUI_TreeElemInfo::information( const QList<long>& ids )
         switch( e->GetEntityType() ) {
         case SMDSEntity_Triangle:
         case SMDSEntity_Quad_Triangle:
         switch( e->GetEntityType() ) {
         case SMDSEntity_Triangle:
         case SMDSEntity_Quad_Triangle:
+        case SMDSEntity_BiQuad_Triangle:
           gtype = SMESHGUI_ElemInfo::tr( "TRIANGLE" ); break;
         case SMDSEntity_Quadrangle:
         case SMDSEntity_Quad_Quadrangle:
           gtype = SMESHGUI_ElemInfo::tr( "TRIANGLE" ); break;
         case SMDSEntity_Quadrangle:
         case SMDSEntity_Quad_Quadrangle:
@@ -1777,25 +1779,12 @@ void SMESHGUI_TreeElemInfo::information( const QList<long>& ids )
           typeItem->setText( 0, SMESHGUI_ElemInfo::tr( "TYPE" ) );
           typeItem->setText( 1, gtype );
         }
           typeItem->setText( 0, SMESHGUI_ElemInfo::tr( "TYPE" ) );
           typeItem->setText( 1, gtype );
         }
-        // quadratic flag and gravity center (any element except 0D)
-        if ( e->GetEntityType() > SMDSEntity_0D && e->GetEntityType() < SMDSEntity_Ball ) {
+        // quadratic flag (for edges, faces and volumes)
+        if ( e->GetType() >= SMDSAbs_Edge && e->GetType() <= SMDSAbs_Volume ) {
           // quadratic flag
           QTreeWidgetItem* quadItem = createItem( elemItem, Bold );
           quadItem->setText( 0, SMESHGUI_ElemInfo::tr( "QUADRATIC" ) );
           quadItem->setText( 1, e->IsQuadratic() ? SMESHGUI_ElemInfo::tr( "YES" ) : SMESHGUI_ElemInfo::tr( "NO" ) );
           // quadratic flag
           QTreeWidgetItem* quadItem = createItem( elemItem, Bold );
           quadItem->setText( 0, SMESHGUI_ElemInfo::tr( "QUADRATIC" ) );
           quadItem->setText( 1, e->IsQuadratic() ? SMESHGUI_ElemInfo::tr( "YES" ) : SMESHGUI_ElemInfo::tr( "NO" ) );
-          // gravity center
-          XYZ gc = gravityCenter( e );
-          QTreeWidgetItem* gcItem = createItem( elemItem, Bold );
-          gcItem->setText( 0, SMESHGUI_ElemInfo::tr( "GRAVITY_CENTER" ) );
-          QTreeWidgetItem* xItem = createItem( gcItem );
-          xItem->setText( 0, "X" );
-          xItem->setText( 1, QString::number( gc.x(), precision > 0 ? 'f' : 'g', qAbs( precision ) ) );
-          QTreeWidgetItem* yItem = createItem( gcItem );
-          yItem->setText( 0, "Y" );
-          yItem->setText( 1, QString::number( gc.y(), precision > 0 ? 'f' : 'g', qAbs( precision ) ) );
-          QTreeWidgetItem* zItem = createItem( gcItem );
-          zItem->setText( 0, "Z" );
-          zItem->setText( 1, QString::number( gc.z(), precision > 0 ? 'f' : 'g', qAbs( precision ) ) );
         }
         if ( const SMDS_BallElement* ball = dynamic_cast<const SMDS_BallElement*>( e )) {
           // ball diameter
         }
         if ( const SMDS_BallElement* ball = dynamic_cast<const SMDS_BallElement*>( e )) {
           // ball diameter
@@ -1931,7 +1920,7 @@ void SMESHGUI_TreeElemInfo::information( const QList<long>& ids )
           diamItem->setText( 1, QString( "%1" ).arg( afunctor->GetValue( id ) ) );       
         }
         if( e->GetType() == SMDSAbs_Volume ) {
           diamItem->setText( 1, QString( "%1" ).arg( afunctor->GetValue( id ) ) );       
         }
         if( e->GetType() == SMDSAbs_Volume ) {
-          //AspectRatio3D       
+          //AspectRatio3D
           afunctor.reset( new SMESH::Controls::AspectRatio3D() );
           afunctor->SetMesh( actor()->GetObject()->GetMesh() );
           QTreeWidgetItem* ratlItem3 = createItem( cntrItem, Bold );
           afunctor.reset( new SMESH::Controls::AspectRatio3D() );
           afunctor->SetMesh( actor()->GetObject()->GetMesh() );
           QTreeWidgetItem* ratlItem3 = createItem( cntrItem, Bold );
@@ -1943,16 +1932,30 @@ void SMESHGUI_TreeElemInfo::information( const QList<long>& ids )
           QTreeWidgetItem* volItem = createItem( cntrItem, Bold );
           volItem->setText( 0, tr( "VOLUME_3D_ELEMENTS" ) );
           volItem->setText( 1, QString( "%1" ).arg( afunctor->GetValue( id ) ) );
           QTreeWidgetItem* volItem = createItem( cntrItem, Bold );
           volItem->setText( 0, tr( "VOLUME_3D_ELEMENTS" ) );
           volItem->setText( 1, QString( "%1" ).arg( afunctor->GetValue( id ) ) );
-          //ElementDiameter3D   
+          //ElementDiameter3D
           afunctor.reset( new SMESH::Controls::MaxElementLength3D() );
           afunctor->SetMesh( actor()->GetObject()->GetMesh() );
           QTreeWidgetItem* diam3Item = createItem( cntrItem, Bold );
           diam3Item->setText( 0, tr( "MAX_ELEMENT_LENGTH_3D" ) );
           diam3Item->setText( 1, QString( "%1" ).arg( afunctor->GetValue( id ) ) );     
         }
           afunctor.reset( new SMESH::Controls::MaxElementLength3D() );
           afunctor->SetMesh( actor()->GetObject()->GetMesh() );
           QTreeWidgetItem* diam3Item = createItem( cntrItem, Bold );
           diam3Item->setText( 0, tr( "MAX_ELEMENT_LENGTH_3D" ) );
           diam3Item->setText( 1, QString( "%1" ).arg( afunctor->GetValue( id ) ) );     
         }
+
+        // gravity center
+        XYZ gc = gravityCenter( e );
+        QTreeWidgetItem* gcItem = createItem( elemItem, Bold );
+        gcItem->setText( 0, SMESHGUI_ElemInfo::tr( "GRAVITY_CENTER" ) );
+        QTreeWidgetItem* xItem = createItem( gcItem );
+        xItem->setText( 0, "X" );
+        xItem->setText( 1, QString::number( gc.x(), precision > 0 ? 'f' : 'g', qAbs( precision ) ) );
+        QTreeWidgetItem* yItem = createItem( gcItem );
+        yItem->setText( 0, "Y" );
+        yItem->setText( 1, QString::number( gc.y(), precision > 0 ? 'f' : 'g', qAbs( precision ) ) );
+        QTreeWidgetItem* zItem = createItem( gcItem );
+        zItem->setText( 0, "Z" );
+        zItem->setText( 1, QString::number( gc.z(), precision > 0 ? 'f' : 'g', qAbs( precision ) ) );
         // element position
         // element position
+        SMESH::SMESH_Mesh_ptr aMesh = actor()->GetObject()->GetMeshServer();
         if ( e->GetType() >= SMDSAbs_Edge && e->GetType() <= SMDSAbs_Volume ) {
         if ( e->GetType() >= SMDSAbs_Edge && e->GetType() <= SMDSAbs_Volume ) {
-          SMESH::SMESH_Mesh_ptr aMesh = actor()->GetObject()->GetMeshServer();    
           if ( !CORBA::is_nil( aMesh ) ) {
             SMESH::ElementPosition pos = aMesh->GetElementPosition( id );
             int shapeID = pos.shapeID;
           if ( !CORBA::is_nil( aMesh ) ) {
             SMESH::ElementPosition pos = aMesh->GetElementPosition( id );
             int shapeID = pos.shapeID;
@@ -1973,7 +1976,6 @@ void SMESHGUI_TreeElemInfo::information( const QList<long>& ids )
           }
         }
         // groups element belongs to
           }
         }
         // groups element belongs to
-        SMESH::SMESH_Mesh_ptr aMesh = actor()->GetObject()->GetMeshServer();
         if ( !CORBA::is_nil( aMesh ) ) {
           SMESH::ListOfGroups_var  groups = aMesh->GetGroups();
           QTreeWidgetItem* groupsItem = 0;
         if ( !CORBA::is_nil( aMesh ) ) {
           SMESH::ListOfGroups_var  groups = aMesh->GetGroups();
           QTreeWidgetItem* groupsItem = 0;
index f6fee7bb272cadfe1fe591eaffa230d14cd0e848..30db6e8ceb23d3d4ffa4eeb21f06fbd2e725635f 100644 (file)
@@ -403,6 +403,7 @@ void SMESHGUI_MeshInfosBox::SetMeshInfo(const SMESH::long_array& theInfo)
   // faces
   myNbFace     ->setText( QString("%1").arg( theInfo[SMDSEntity_Triangle] +
                                              theInfo[SMDSEntity_Quad_Triangle] +
   // faces
   myNbFace     ->setText( QString("%1").arg( theInfo[SMDSEntity_Triangle] +
                                              theInfo[SMDSEntity_Quad_Triangle] +
+                                             theInfo[SMDSEntity_BiQuad_Triangle] +
                                              theInfo[SMDSEntity_Quadrangle] +
                                              theInfo[SMDSEntity_Quad_Quadrangle] +
                                              theInfo[SMDSEntity_BiQuad_Quadrangle] +
                                              theInfo[SMDSEntity_Quadrangle] +
                                              theInfo[SMDSEntity_Quad_Quadrangle] +
                                              theInfo[SMDSEntity_BiQuad_Quadrangle] +
@@ -441,9 +442,11 @@ void SMESHGUI_MeshInfosBox::SetMeshInfo(const SMESH::long_array& theInfo)
   {
     // triangles
     myNbTrai     ->setText( QString("%1").arg( theInfo[SMDSEntity_Triangle] +
   {
     // triangles
     myNbTrai     ->setText( QString("%1").arg( theInfo[SMDSEntity_Triangle] +
-                                               theInfo[SMDSEntity_Quad_Triangle] ));
+                                               theInfo[SMDSEntity_Quad_Triangle] +
+                                               theInfo[SMDSEntity_BiQuad_Triangle] ));
     myNbLinTrai  ->setText( QString("%1").arg( theInfo[SMDSEntity_Triangle] ));
     myNbLinTrai  ->setText( QString("%1").arg( theInfo[SMDSEntity_Triangle] ));
-    myNbQuadTrai ->setText( QString("%1").arg( theInfo[SMDSEntity_Quad_Triangle] ));
+    myNbQuadTrai ->setText( QString("%1").arg( theInfo[SMDSEntity_Quad_Triangle] +
+                                               theInfo[SMDSEntity_BiQuad_Triangle] ));
     // quadrangles
     myNbQuad     ->setText( QString("%1").arg( theInfo[SMDSEntity_Quadrangle] +
                                                theInfo[SMDSEntity_Quad_Quadrangle] +
     // quadrangles
     myNbQuad     ->setText( QString("%1").arg( theInfo[SMDSEntity_Quadrangle] +
                                                theInfo[SMDSEntity_Quad_Quadrangle] +
index 42874a52e68bed9b12a295002a6ca030e1c7c3a6..17eafcde31fff18216279f7776ab8890d18283ea 100644 (file)
             <source>ICON_DLG_QUADRATIC_TRIANGLE</source>
             <translation>mesh_quad_triangle.png</translation>
         </message>
             <source>ICON_DLG_QUADRATIC_TRIANGLE</source>
             <translation>mesh_quad_triangle.png</translation>
         </message>
+        <message>
+            <source>ICON_DLG_BIQUADRATIC_TRIANGLE</source>
+            <translation>mesh_biquad_triangle.png</translation>
+        </message>
         <message>
             <source>ICON_DLG_REM_ELEMENT</source>
             <translation>mesh_rem_element.png</translation>
         <message>
             <source>ICON_DLG_REM_ELEMENT</source>
             <translation>mesh_rem_element.png</translation>