0022100: EDF 2413 SMESH: Take into account TRIA7

This commit is contained in:
eap 2013-05-16 17:17:56 +00:00
parent 7c9baff7a5
commit 9791c651e7
9 changed files with 145 additions and 93 deletions

View 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 corresponding linear ones, but in addition they have \a midside nodes
located between the corner nodes on element sides. located between the corner nodes on element sides.
If a quadratic quadrilateral element has an additional node at the If a quadratic 2D element has an additional node at the
element center, it is a bi-quadratic element (or element center, it is a bi-quadratic element (both TRIA7 and
QUAD9). If a quadratic hexahedral element has 7 additional nodes: QUAD9 elements are supported). If a quadratic hexahedral element has 7
at the element center and at the center of each side, it is a additional nodes: at the element center and at the center of each
tri-quadratic element (or HEXA27). side, it is a tri-quadratic element (or HEXA27).
The convention of nodal connectivity of elements used in SALOME is The convention of nodal connectivity of elements used in SALOME is
the MED library convention. You can consult the description of nodal 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> button. Their numbers will appear in the dialog box as <b>Corner Nodes</b>
(alternatively you can just input numbers in this field without (alternatively you can just input numbers in this field without
selection).The edges formed by the corner nodes will appear in the 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 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 respective field and input the number of the node (or pick the node in
object formed by them will be displayed in the Object browser. When the viewer). For bi-quadratic and tri-quadratic elements, your also
all edges are defined you will be able to click \b Apply or <b>Apply and Close</b> button to 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. add the element to the mesh.
\image html aqt.png \image html aqt.png
\b Reverse button for Quadratic Edges switches the first and the last \b Reverse button reverses the element.
nodes. For all other elements it reverses the element.
</li> </li>
</ol> </ol>

View File

@ -34,14 +34,15 @@ The following dialog box will appear:
<ul> <ul>
<li>If it is necessary to convert a linear mesh to quadratic or a quadratic <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 mesh to linear. **Convert to bi-quadratic** option does the same as
**Convert to quadratic** except for that QUAD9 elements are created **Convert to quadratic** except for that TRIA7, QUAD9 and HEXA27
instead of QUAD8, and HEXA27 elements are created instead of elements are created instead of TRIA6, QUAD8, and HEXA20 elements
HEXA20. Note that the choice is available only if the selected mesh respectively. Note that the choice is available only if the selected
(or sub-mesh) contains both quadratic and linear elements, else the 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 <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 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> quadratic provided that the mesh is based on a geometry (not imported
from file).</li>
</ul> </ul>
\image html image156.gif \image html image156.gif

View 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. \brief Simple 'busy state' flag locker.
\internal \internal
*/ */
class BusyLocker class BusyLocker
{ {
public: public:
@ -295,7 +294,6 @@ private:
\brief Simple editable table item. \brief Simple editable table item.
\internal \internal
*/ */
class IdEditItem: public QTableWidgetItem class IdEditItem: public QTableWidgetItem
{ {
public: public:
@ -325,6 +323,7 @@ QWidget* IdEditItem::createEditor() const
// function : SMESHGUI_AddQuadraticElementDlg() // function : SMESHGUI_AddQuadraticElementDlg()
// purpose : constructor // purpose : constructor
//================================================================================= //=================================================================================
SMESHGUI_AddQuadraticElementDlg::SMESHGUI_AddQuadraticElementDlg( SMESHGUI* theModule, SMESHGUI_AddQuadraticElementDlg::SMESHGUI_AddQuadraticElementDlg( SMESHGUI* theModule,
const SMDSAbs_EntityType theType ) const SMDSAbs_EntityType theType )
: QDialog( SMESH::GetDesktop( theModule ) ), : QDialog( SMESH::GetDesktop( theModule ) ),
@ -358,6 +357,9 @@ SMESHGUI_AddQuadraticElementDlg::SMESHGUI_AddQuadraticElementDlg( SMESHGUI* theM
case SMDSEntity_BiQuad_Quadrangle: case SMDSEntity_BiQuad_Quadrangle:
anElementName = QString("BIQUADRATIC_QUADRANGLE"); anElementName = QString("BIQUADRATIC_QUADRANGLE");
break; break;
case SMDSEntity_BiQuad_Triangle:
anElementName = QString("BIQUADRATIC_TRIANGLE");
break;
case SMDSEntity_Quad_Tetra: case SMDSEntity_Quad_Tetra:
anElementName = QString("QUADRATIC_TETRAHEDRON"); anElementName = QString("QUADRATIC_TETRAHEDRON");
break; break;
@ -501,6 +503,7 @@ SMESHGUI_AddQuadraticElementDlg::SMESHGUI_AddQuadraticElementDlg( SMESHGUI* theM
// function : ~SMESHGUI_AddQuadraticElementDlg() // function : ~SMESHGUI_AddQuadraticElementDlg()
// purpose : Destroys the object and frees any allocated resources // purpose : Destroys the object and frees any allocated resources
//================================================================================= //=================================================================================
SMESHGUI_AddQuadraticElementDlg::~SMESHGUI_AddQuadraticElementDlg() SMESHGUI_AddQuadraticElementDlg::~SMESHGUI_AddQuadraticElementDlg()
{ {
delete mySimulation; delete mySimulation;
@ -510,6 +513,7 @@ SMESHGUI_AddQuadraticElementDlg::~SMESHGUI_AddQuadraticElementDlg()
// function : Init() // function : Init()
// purpose : // purpose :
//================================================================================= //=================================================================================
void SMESHGUI_AddQuadraticElementDlg::Init() void SMESHGUI_AddQuadraticElementDlg::Init()
{ {
myRadioButton1->setChecked(true); myRadioButton1->setChecked(true);
@ -535,6 +539,12 @@ void SMESHGUI_AddQuadraticElementDlg::Init()
myNbCorners = 3; myNbCorners = 3;
myHelpFileName = "adding_quadratic_elements_page.html#?"; //Adding_triangles myHelpFileName = "adding_quadratic_elements_page.html#?"; //Adding_triangles
break; break;
case SMDSEntity_BiQuad_Triangle:
aNumRows = 3;
myNbCorners = 3;
myNbCenterNodes = 1;
myHelpFileName = "adding_quadratic_elements_page.html#?"; //Adding_triangles
break;
case SMDSEntity_Quad_Quadrangle: case SMDSEntity_Quad_Quadrangle:
aNumRows = 4; aNumRows = 4;
myNbCorners = 4; myNbCorners = 4;
@ -651,13 +661,14 @@ void SMESHGUI_AddQuadraticElementDlg::Init()
// function : ClickOnApply() // function : ClickOnApply()
// purpose : // 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; break;
case SMDSEntity_Quad_Triangle: case SMDSEntity_Quad_Triangle:
case SMDSEntity_Quad_Quadrangle: case SMDSEntity_Quad_Quadrangle:
case SMDSEntity_BiQuad_Triangle:
case SMDSEntity_BiQuad_Quadrangle: case SMDSEntity_BiQuad_Quadrangle:
case SMDSEntity_Quad_Tetra: case SMDSEntity_Quad_Tetra:
case SMDSEntity_Quad_Pyramid: case SMDSEntity_Quad_Pyramid:
@ -722,7 +734,7 @@ void SMESHGUI_AddQuadraticElementDlg::ClickOnApply()
int res = SUIT_MessageBox::question( this, tr( "SMESH_WRN_WARNING" ), int res = SUIT_MessageBox::question( this, tr( "SMESH_WRN_WARNING" ),
tr( "MESH_STANDALONE_GRP_CHOSEN" ).arg( aGroupName ), tr( "MESH_STANDALONE_GRP_CHOSEN" ).arg( aGroupName ),
tr( "SMESH_BUT_YES" ), tr( "SMESH_BUT_NO" ), 0, 1 ); 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; anElemId = aMeshEditor->AddEdge(anArrayOfIdeces.inout()); break;
case SMDSEntity_Quad_Triangle: case SMDSEntity_Quad_Triangle:
case SMDSEntity_Quad_Quadrangle: case SMDSEntity_Quad_Quadrangle:
case SMDSEntity_BiQuad_Triangle:
case SMDSEntity_BiQuad_Quadrangle: case SMDSEntity_BiQuad_Quadrangle:
anElementType = SMESH::FACE; anElementType = SMESH::FACE;
anElemId = aMeshEditor->AddFace(anArrayOfIdeces.inout()); break; anElemId = aMeshEditor->AddFace(anArrayOfIdeces.inout()); break;
@ -794,22 +807,26 @@ void SMESHGUI_AddQuadraticElementDlg::ClickOnApply()
updateButtons(); updateButtons();
SMESHGUI::Modified(); SMESHGUI::Modified();
return true;
} }
//================================================================================= //=================================================================================
// function : ClickOnOk() // function : ClickOnOk()
// purpose : // purpose :
//================================================================================= //=================================================================================
void SMESHGUI_AddQuadraticElementDlg::ClickOnOk() void SMESHGUI_AddQuadraticElementDlg::ClickOnOk()
{ {
ClickOnApply(); if ( ClickOnApply() )
reject(); reject();
} }
//================================================================================= //=================================================================================
// function : reject() // function : reject()
// purpose : // purpose :
//================================================================================= //=================================================================================
void SMESHGUI_AddQuadraticElementDlg::reject() void SMESHGUI_AddQuadraticElementDlg::reject()
{ {
mySelectionMgr->clearSelected(); mySelectionMgr->clearSelected();
@ -826,6 +843,7 @@ void SMESHGUI_AddQuadraticElementDlg::reject()
// function : ClickOnHelp() // function : ClickOnHelp()
// purpose : // purpose :
//================================================================================= //=================================================================================
void SMESHGUI_AddQuadraticElementDlg::ClickOnHelp() void SMESHGUI_AddQuadraticElementDlg::ClickOnHelp()
{ {
LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication()); LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
@ -850,6 +868,7 @@ void SMESHGUI_AddQuadraticElementDlg::ClickOnHelp()
// function : onTextChange() // function : onTextChange()
// purpose : // purpose :
//================================================================================= //=================================================================================
void SMESHGUI_AddQuadraticElementDlg::onTextChange (const QString& theNewText) void SMESHGUI_AddQuadraticElementDlg::onTextChange (const QString& theNewText)
{ {
if (myBusy) return; if (myBusy) return;
@ -901,6 +920,7 @@ void SMESHGUI_AddQuadraticElementDlg::onTextChange (const QString& theNewText)
// function : SelectionIntoArgument() // function : SelectionIntoArgument()
// purpose : Called when selection has changed // purpose : Called when selection has changed
//================================================================================= //=================================================================================
void SMESHGUI_AddQuadraticElementDlg::SelectionIntoArgument() void SMESHGUI_AddQuadraticElementDlg::SelectionIntoArgument()
{ {
if (myBusy) return; if (myBusy) return;
@ -951,6 +971,7 @@ void SMESHGUI_AddQuadraticElementDlg::SelectionIntoArgument()
anElementType = SMESH::EDGE; break; anElementType = SMESH::EDGE; break;
case SMDSEntity_Quad_Triangle: case SMDSEntity_Quad_Triangle:
case SMDSEntity_Quad_Quadrangle: case SMDSEntity_Quad_Quadrangle:
case SMDSEntity_BiQuad_Triangle:
case SMDSEntity_BiQuad_Quadrangle: case SMDSEntity_BiQuad_Quadrangle:
anElementType = SMESH::FACE; break; anElementType = SMESH::FACE; break;
case SMDSEntity_Quad_Tetra: case SMDSEntity_Quad_Tetra:
@ -1008,6 +1029,7 @@ void SMESHGUI_AddQuadraticElementDlg::SelectionIntoArgument()
// function : displaySimulation() // function : displaySimulation()
// purpose : // purpose :
//================================================================================= //=================================================================================
void SMESHGUI_AddQuadraticElementDlg::displaySimulation() void SMESHGUI_AddQuadraticElementDlg::displaySimulation()
{ {
if ( IsValid() ) if ( IsValid() )
@ -1068,6 +1090,7 @@ void SMESHGUI_AddQuadraticElementDlg::displaySimulation()
// function : SetCurrentSelection() // function : SetCurrentSelection()
// purpose : // purpose :
//================================================================================= //=================================================================================
void SMESHGUI_AddQuadraticElementDlg::SetCurrentSelection() void SMESHGUI_AddQuadraticElementDlg::SetCurrentSelection()
{ {
QPushButton* send = (QPushButton*)sender(); QPushButton* send = (QPushButton*)sender();
@ -1091,6 +1114,7 @@ void SMESHGUI_AddQuadraticElementDlg::SetCurrentSelection()
// function : DeactivateActiveDialog() // function : DeactivateActiveDialog()
// purpose : // purpose :
//================================================================================= //=================================================================================
void SMESHGUI_AddQuadraticElementDlg::DeactivateActiveDialog() void SMESHGUI_AddQuadraticElementDlg::DeactivateActiveDialog()
{ {
if (GroupConstructors->isEnabled()) { if (GroupConstructors->isEnabled()) {
@ -1107,6 +1131,7 @@ void SMESHGUI_AddQuadraticElementDlg::DeactivateActiveDialog()
// function : ActivateThisDialog() // function : ActivateThisDialog()
// purpose : // purpose :
//================================================================================= //=================================================================================
void SMESHGUI_AddQuadraticElementDlg::ActivateThisDialog() void SMESHGUI_AddQuadraticElementDlg::ActivateThisDialog()
{ {
/* Emit a signal to deactivate the active dialog */ /* Emit a signal to deactivate the active dialog */
@ -1127,6 +1152,7 @@ void SMESHGUI_AddQuadraticElementDlg::ActivateThisDialog()
// function : enterEvent() // function : enterEvent()
// purpose : // purpose :
//================================================================================= //=================================================================================
void SMESHGUI_AddQuadraticElementDlg::enterEvent (QEvent*) void SMESHGUI_AddQuadraticElementDlg::enterEvent (QEvent*)
{ {
if (GroupConstructors->isEnabled()) if (GroupConstructors->isEnabled())
@ -1138,6 +1164,7 @@ void SMESHGUI_AddQuadraticElementDlg::enterEvent (QEvent*)
// function : onReverse() // function : onReverse()
// purpose : // purpose :
//================================================================================= //=================================================================================
void SMESHGUI_AddQuadraticElementDlg::onReverse (int state) void SMESHGUI_AddQuadraticElementDlg::onReverse (int state)
{ {
mySimulation->SetVisibility(false); mySimulation->SetVisibility(false);
@ -1145,11 +1172,11 @@ void SMESHGUI_AddQuadraticElementDlg::onReverse (int state)
updateButtons(); updateButtons();
} }
//================================================================================= //=================================================================================
// function : IsValid() // function : IsValid()
// purpose : // purpose :
//================================================================================= //=================================================================================
bool SMESHGUI_AddQuadraticElementDlg::IsValid() bool SMESHGUI_AddQuadraticElementDlg::IsValid()
{ {
SMDS_Mesh* aMesh = 0; SMDS_Mesh* aMesh = 0;
@ -1196,6 +1223,7 @@ bool SMESHGUI_AddQuadraticElementDlg::IsValid()
// function : UpdateTable() // function : UpdateTable()
// purpose : // purpose :
//================================================================================= //=================================================================================
void SMESHGUI_AddQuadraticElementDlg::UpdateTable( bool theConersValidity ) void SMESHGUI_AddQuadraticElementDlg::UpdateTable( bool theConersValidity )
{ {
QStringList aListCorners = myCornerNodes->text().split(" ", QString::SkipEmptyParts); QStringList aListCorners = myCornerNodes->text().split(" ", QString::SkipEmptyParts);
@ -1217,6 +1245,7 @@ void SMESHGUI_AddQuadraticElementDlg::UpdateTable( bool theConersValidity )
aLastColIds = LastEdgeIds; aLastColIds = LastEdgeIds;
break; break;
case SMDSEntity_Quad_Triangle: case SMDSEntity_Quad_Triangle:
case SMDSEntity_BiQuad_Triangle:
aFirstColIds = FirstTriangleIds; aFirstColIds = FirstTriangleIds;
aLastColIds = LastTriangleIds; aLastColIds = LastTriangleIds;
break; break;
@ -1262,11 +1291,11 @@ void SMESHGUI_AddQuadraticElementDlg::UpdateTable( bool theConersValidity )
} }
} }
//================================================================================= //=================================================================================
// function : onTableActivate() // function : onTableActivate()
// purpose : // purpose :
//================================================================================= //=================================================================================
void SMESHGUI_AddQuadraticElementDlg::onCellDoubleClicked( int theRow, int theCol ) void SMESHGUI_AddQuadraticElementDlg::onCellDoubleClicked( int theRow, int theCol )
{ {
myCurrentLineEdit = 0; myCurrentLineEdit = 0;
@ -1274,11 +1303,11 @@ void SMESHGUI_AddQuadraticElementDlg::onCellDoubleClicked( int theRow, int theCo
updateButtons(); updateButtons();
} }
//================================================================================= //=================================================================================
// function : onCellTextChange() // function : onCellTextChange()
// purpose : // purpose :
//================================================================================= //=================================================================================
void SMESHGUI_AddQuadraticElementDlg::onCellTextChange(int theRow, int theCol) void SMESHGUI_AddQuadraticElementDlg::onCellTextChange(int theRow, int theCol)
{ {
myCurrentLineEdit = 0; myCurrentLineEdit = 0;
@ -1290,6 +1319,7 @@ void SMESHGUI_AddQuadraticElementDlg::onCellTextChange(int theRow, int theCol)
// function : keyPressEvent() // function : keyPressEvent()
// purpose : // purpose :
//================================================================================= //=================================================================================
void SMESHGUI_AddQuadraticElementDlg::keyPressEvent( QKeyEvent* e ) void SMESHGUI_AddQuadraticElementDlg::keyPressEvent( QKeyEvent* e )
{ {
QDialog::keyPressEvent( e ); QDialog::keyPressEvent( e );
@ -1302,6 +1332,11 @@ void SMESHGUI_AddQuadraticElementDlg::keyPressEvent( QKeyEvent* e )
} }
} }
//=======================================================================
//function : updateButtons
//purpose :
//=======================================================================
void SMESHGUI_AddQuadraticElementDlg::updateButtons() void SMESHGUI_AddQuadraticElementDlg::updateButtons()
{ {
bool valid = IsValid(); bool valid = IsValid();
@ -1313,6 +1348,7 @@ void SMESHGUI_AddQuadraticElementDlg::updateButtons()
// function : isValid // function : isValid
// purpose : // purpose :
//================================================================================= //=================================================================================
bool SMESHGUI_AddQuadraticElementDlg::isValid() bool SMESHGUI_AddQuadraticElementDlg::isValid()
{ {
if( GroupGroups->isChecked() && ComboBox_GroupName->currentText().isEmpty() ) { if( GroupGroups->isChecked() && ComboBox_GroupName->currentText().isEmpty() ) {

View File

@ -136,7 +136,7 @@ private slots:
void onCellDoubleClicked( int, int ); void onCellDoubleClicked( int, int );
void ClickOnOk(); void ClickOnOk();
void ClickOnApply(); bool ClickOnApply();
void ClickOnHelp(); void ClickOnHelp();
void SetCurrentSelection(); void SetCurrentSelection();
void SelectionIntoArgument(); void SelectionIntoArgument();

View 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 ] ); nbElemOfType[SMDSEntity_Quad_Hexa ] );
bool hasQuad = ( nbElemOfType[SMDSEntity_Quad_Edge ] || bool hasQuad = ( nbElemOfType[SMDSEntity_Quad_Edge ] ||
@ -356,9 +359,9 @@ SMESHGUI_ConvToQuadOp::DestinationMesh( const SMESH::SMESH_IDSource_var& idSourc
int tgtType = 0; int tgtType = 0;
if ( hasBiQuad ) if ( hasBiQuad )
tgtType |= ( Quadratic | Linear ); tgtType |= ( Quadratic | Linear );
if ( hasLinStruct ) if ( hasLinBiQuad )
tgtType |= ( BiQuadratic | Quadratic ); tgtType |= ( BiQuadratic | Quadratic );
if ( hasQuadStruct ) if ( hasQuadBiQuad )
tgtType |= ( BiQuadratic | Linear ); tgtType |= ( BiQuadratic | Linear );
if ( hasQuad ) if ( hasQuad )
tgtType |= Linear; tgtType |= Linear;

View 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 bool thePoly,
const int theNbNodes ) 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 == 3 ) return VTK_TRIANGLE;
else if ( theNbNodes == 4 ) return VTK_QUAD; else if ( theNbNodes == 4 ) return VTK_QUAD;
else if ( theNbNodes == 6 ) return VTK_QUADRATIC_TRIANGLE; 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 == 8 ) return VTK_QUADRATIC_QUAD;
else if ( theNbNodes == 9 ) return VTK_BIQUADRATIC_QUAD; else if ( theNbNodes == 9 ) return VTK_BIQUADRATIC_QUAD;
else return VTK_EMPTY_CELL; else return VTK_EMPTY_CELL;

View File

@ -491,16 +491,16 @@ void SMESHGUI_MeshInfo::showInfo( SMESH::SMESH_IDSource_ptr obj )
myWidgets[i1D][iTotal] ->setProperty( "text", QString::number( nbEdges ) ); myWidgets[i1D][iTotal] ->setProperty( "text", QString::number( nbEdges ) );
myWidgets[i1D][iLinear] ->setProperty( "text", QString::number( info[SMDSEntity_Edge] ) ); myWidgets[i1D][iLinear] ->setProperty( "text", QString::number( info[SMDSEntity_Edge] ) );
myWidgets[i1D][iQuadratic]->setProperty( "text", QString::number( info[SMDSEntity_Quad_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 nbQuadrangles = info[SMDSEntity_Quadrangle] + info[SMDSEntity_Quad_Quadrangle] + info[SMDSEntity_BiQuad_Quadrangle];
long nb2DLinear = info[SMDSEntity_Triangle] + info[SMDSEntity_Quadrangle] + info[SMDSEntity_Polygon]; 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][iTotal] ->setProperty( "text", QString::number( nb2DLinear + nb2DQuadratic ) );
myWidgets[i2D][iLinear] ->setProperty( "text", QString::number( nb2DLinear ) ); myWidgets[i2D][iLinear] ->setProperty( "text", QString::number( nb2DLinear ) );
myWidgets[i2D][iQuadratic] ->setProperty( "text", QString::number( nb2DQuadratic ) ); myWidgets[i2D][iQuadratic] ->setProperty( "text", QString::number( nb2DQuadratic ) );
myWidgets[i2DTriangles][iTotal] ->setProperty( "text", QString::number( nbTriangles ) ); myWidgets[i2DTriangles][iTotal] ->setProperty( "text", QString::number( nbTriangles ) );
myWidgets[i2DTriangles][iLinear] ->setProperty( "text", QString::number( info[SMDSEntity_Triangle] ) ); 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][iTotal] ->setProperty( "text", QString::number( nbQuadrangles ) );
myWidgets[i2DQuadrangles][iLinear] ->setProperty( "text", QString::number( info[SMDSEntity_Quadrangle] ) ); 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][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; SMESH::Controls::NumericalFunctorPtr afunctor;
if ( !e ) return; if ( !e ) return;
// element ID && type // Element ID && Type
QString stype; QString stype;
switch( e->GetType() ) { switch( e->GetType() ) {
case SMDSAbs_0DElement: 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 ) ); myInfo->append( QString( "<b>%1 #%2</b>" ).arg( stype ).arg( id ) );
// separator // separator
myInfo->append( "" ); myInfo->append( "" );
// geometry type
// Geometry type
QString gtype; QString gtype;
switch( e->GetEntityType() ) { switch( e->GetEntityType() ) {
case SMDSEntity_Triangle: case SMDSEntity_Triangle:
case SMDSEntity_Quad_Triangle: case SMDSEntity_Quad_Triangle:
case SMDSEntity_BiQuad_Triangle:
gtype = SMESHGUI_ElemInfo::tr( "TRIANGLE" ); break; gtype = SMESHGUI_ElemInfo::tr( "TRIANGLE" ); break;
case SMDSEntity_Quadrangle: case SMDSEntity_Quadrangle:
case SMDSEntity_Quad_Quadrangle: case SMDSEntity_Quad_Quadrangle:
@ -1264,23 +1266,19 @@ void SMESHGUI_SimpleElemInfo::information( const QList<long>& ids )
} }
if ( !gtype.isEmpty() ) if ( !gtype.isEmpty() )
myInfo->append( QString( "<b>%1:</b> %2" ).arg( SMESHGUI_ElemInfo::tr( "TYPE" ) ).arg( gtype ) ); 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() )); myInfo->append( QString( "<b>%1:</b> %2" ).arg( SMESHGUI_ElemInfo::tr( "BALL_DIAMETER" ) ).arg( ball->GetDiameter() ));
} }
// separator // separator
myInfo->append( "" ); myInfo->append( "" );
// connectivity
// Connectivity
SMDS_ElemIteratorPtr nodeIt = e->nodesIterator(); SMDS_ElemIteratorPtr nodeIt = e->nodesIterator();
for ( int idx = 1; nodeIt->more(); idx++ ) { for ( int idx = 1; nodeIt->more(); idx++ ) {
const SMDS_MeshNode* node = static_cast<const SMDS_MeshNode*>( nodeIt->next() ); const SMDS_MeshNode* node = static_cast<const SMDS_MeshNode*>( nodeIt->next() );
@ -1314,27 +1312,28 @@ void SMESHGUI_SimpleElemInfo::information( const QList<long>& ids )
} }
// separator // separator
myInfo->append( "" ); myInfo->append( "" );
//controls
// Controls
myInfo->append( QString( "<b>%1:</b>" ).arg( SMESHGUI_ElemInfo::tr( "CONTROLS" ) ) ); myInfo->append( QString( "<b>%1:</b>" ).arg( SMESHGUI_ElemInfo::tr( "CONTROLS" ) ) );
//Length //Length
if ( e->GetType() == SMDSAbs_Edge ) { if ( e->GetType() == SMDSAbs_Edge ) {
afunctor.reset( new SMESH::Controls::Length() ); afunctor.reset( new SMESH::Controls::Length() );
afunctor->SetMesh( actor()->GetObject()->GetMesh() ); afunctor->SetMesh( actor()->GetObject()->GetMesh() );
afunctor->SetPrecision( cprecision ); afunctor->SetPrecision( cprecision );
myInfo->append( QString( "- <b>%1:</b> %2" ).arg( tr( "LENGTH_EDGES" ) ).arg( afunctor->GetValue( id ) ) ); myInfo->append( QString( "- <b>%1:</b> %2" ).arg( tr( "LENGTH_EDGES" ) ).arg( afunctor->GetValue( id ) ) );
} }
if( e->GetType() == SMDSAbs_Face ) { if( e->GetType() == SMDSAbs_Face ) {
//Area //Area
afunctor.reset( new SMESH::Controls::Area() ); afunctor.reset( new SMESH::Controls::Area() );
afunctor->SetMesh( actor()->GetObject()->GetMesh() ); afunctor->SetMesh( actor()->GetObject()->GetMesh() );
afunctor->SetPrecision( cprecision ); afunctor->SetPrecision( cprecision );
myInfo->append( QString( "- <b>%1:</b> %2" ).arg( tr( "AREA_ELEMENTS" ) ).arg( afunctor->GetValue( id ) ) ); myInfo->append( QString( "- <b>%1:</b> %2" ).arg( tr( "AREA_ELEMENTS" ) ).arg( afunctor->GetValue( id ) ) );
//Taper //Taper
afunctor.reset( new SMESH::Controls::Taper() ); afunctor.reset( new SMESH::Controls::Taper() );
afunctor->SetMesh( actor()->GetObject()->GetMesh() ); afunctor->SetMesh( actor()->GetObject()->GetMesh() );
afunctor->SetPrecision( cprecision ); afunctor->SetPrecision( cprecision );
myInfo->append( QString( "- <b>%1:</b> %2" ).arg( tr( "TAPER_ELEMENTS" ) ).arg( afunctor->GetValue( id ) ) ); myInfo->append( QString( "- <b>%1:</b> %2" ).arg( tr( "TAPER_ELEMENTS" ) ).arg( afunctor->GetValue( id ) ) );
//AspectRatio2D //AspectRatio2D
afunctor.reset( new SMESH::Controls::AspectRatio() ); afunctor.reset( new SMESH::Controls::AspectRatio() );
afunctor->SetMesh( actor()->GetObject()->GetMesh() ); afunctor->SetMesh( actor()->GetObject()->GetMesh() );
myInfo->append( QString( "- <b>%1:</b> %2" ).arg( tr( "ASPECTRATIO_ELEMENTS" ) ).arg( afunctor->GetValue( id ) ) ); 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() ); afunctor->SetMesh( actor()->GetObject()->GetMesh() );
myInfo->append( QString( "- <b>%1:</b> %2" ).arg( tr( "MAX_ELEMENT_LENGTH_3D" ) ).arg( afunctor->GetValue( id ) ) ); 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 ) { if ( e->GetType() >= SMDSAbs_Edge && e->GetType() <= SMDSAbs_Volume ) {
SMESH::SMESH_Mesh_ptr aMesh = actor()->GetObject()->GetMeshServer(); SMESH::SMESH_Mesh_ptr aMesh = actor()->GetObject()->GetMeshServer();
if ( !CORBA::is_nil( aMesh ) ) { 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(); SMESH::SMESH_Mesh_ptr aMesh = actor()->GetObject()->GetMeshServer();
if ( !CORBA::is_nil( aMesh ) ) { if ( !CORBA::is_nil( aMesh ) ) {
SMESH::ListOfGroups_var groups = aMesh->GetGroups(); SMESH::ListOfGroups_var groups = aMesh->GetGroups();
@ -1721,18 +1728,12 @@ void SMESHGUI_TreeElemInfo::information( const QList<long>& ids )
// element ID && type // element ID && type
QString stype; QString stype;
switch( e->GetType() ) { switch( e->GetType() ) {
case SMDSAbs_0DElement: case SMDSAbs_0DElement: stype = SMESHGUI_ElemInfo::tr( "0D_ELEMENT" ); break;
stype = SMESHGUI_ElemInfo::tr( "0D_ELEMENT" ); break; case SMDSAbs_Ball: stype = SMESHGUI_ElemInfo::tr( "BALL" ); break;
case SMDSAbs_Ball: case SMDSAbs_Edge: stype = SMESHGUI_ElemInfo::tr( "EDGE" ); break;
stype = SMESHGUI_ElemInfo::tr( "BALL" ); break; case SMDSAbs_Face: stype = SMESHGUI_ElemInfo::tr( "FACE" ); break;
case SMDSAbs_Edge: case SMDSAbs_Volume: stype = SMESHGUI_ElemInfo::tr( "VOLUME" ); break;
stype = SMESHGUI_ElemInfo::tr( "EDGE" ); break; default:;
case SMDSAbs_Face:
stype = SMESHGUI_ElemInfo::tr( "FACE" ); break;
case SMDSAbs_Volume:
stype = SMESHGUI_ElemInfo::tr( "VOLUME" ); break;
default:
break;
} }
if ( stype.isEmpty() ) return; if ( stype.isEmpty() ) return;
QTreeWidgetItem* elemItem = createItem( 0, Bold | All ); QTreeWidgetItem* elemItem = createItem( 0, Bold | All );
@ -1743,6 +1744,7 @@ void SMESHGUI_TreeElemInfo::information( const QList<long>& ids )
switch( e->GetEntityType() ) { switch( e->GetEntityType() ) {
case SMDSEntity_Triangle: case SMDSEntity_Triangle:
case SMDSEntity_Quad_Triangle: case SMDSEntity_Quad_Triangle:
case SMDSEntity_BiQuad_Triangle:
gtype = SMESHGUI_ElemInfo::tr( "TRIANGLE" ); break; gtype = SMESHGUI_ElemInfo::tr( "TRIANGLE" ); break;
case SMDSEntity_Quadrangle: case SMDSEntity_Quadrangle:
case SMDSEntity_Quad_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( 0, SMESHGUI_ElemInfo::tr( "TYPE" ) );
typeItem->setText( 1, gtype ); typeItem->setText( 1, gtype );
} }
// quadratic flag and gravity center (any element except 0D) // quadratic flag (for edges, faces and volumes)
if ( e->GetEntityType() > SMDSEntity_0D && e->GetEntityType() < SMDSEntity_Ball ) { if ( e->GetType() >= SMDSAbs_Edge && e->GetType() <= SMDSAbs_Volume ) {
// quadratic flag // quadratic flag
QTreeWidgetItem* quadItem = createItem( elemItem, Bold ); QTreeWidgetItem* quadItem = createItem( elemItem, Bold );
quadItem->setText( 0, SMESHGUI_ElemInfo::tr( "QUADRATIC" ) ); quadItem->setText( 0, SMESHGUI_ElemInfo::tr( "QUADRATIC" ) );
quadItem->setText( 1, e->IsQuadratic() ? SMESHGUI_ElemInfo::tr( "YES" ) : SMESHGUI_ElemInfo::tr( "NO" ) ); 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 )) { if ( const SMDS_BallElement* ball = dynamic_cast<const SMDS_BallElement*>( e )) {
// ball diameter // ball diameter
@ -1931,7 +1920,7 @@ void SMESHGUI_TreeElemInfo::information( const QList<long>& ids )
diamItem->setText( 1, QString( "%1" ).arg( afunctor->GetValue( id ) ) ); diamItem->setText( 1, QString( "%1" ).arg( afunctor->GetValue( id ) ) );
} }
if( e->GetType() == SMDSAbs_Volume ) { if( e->GetType() == SMDSAbs_Volume ) {
//AspectRatio3D //AspectRatio3D
afunctor.reset( new SMESH::Controls::AspectRatio3D() ); afunctor.reset( new SMESH::Controls::AspectRatio3D() );
afunctor->SetMesh( actor()->GetObject()->GetMesh() ); afunctor->SetMesh( actor()->GetObject()->GetMesh() );
QTreeWidgetItem* ratlItem3 = createItem( cntrItem, Bold ); QTreeWidgetItem* ratlItem3 = createItem( cntrItem, Bold );
@ -1943,16 +1932,30 @@ void SMESHGUI_TreeElemInfo::information( const QList<long>& ids )
QTreeWidgetItem* volItem = createItem( cntrItem, Bold ); QTreeWidgetItem* volItem = createItem( cntrItem, Bold );
volItem->setText( 0, tr( "VOLUME_3D_ELEMENTS" ) ); volItem->setText( 0, tr( "VOLUME_3D_ELEMENTS" ) );
volItem->setText( 1, QString( "%1" ).arg( afunctor->GetValue( id ) ) ); volItem->setText( 1, QString( "%1" ).arg( afunctor->GetValue( id ) ) );
//ElementDiameter3D //ElementDiameter3D
afunctor.reset( new SMESH::Controls::MaxElementLength3D() ); afunctor.reset( new SMESH::Controls::MaxElementLength3D() );
afunctor->SetMesh( actor()->GetObject()->GetMesh() ); afunctor->SetMesh( actor()->GetObject()->GetMesh() );
QTreeWidgetItem* diam3Item = createItem( cntrItem, Bold ); QTreeWidgetItem* diam3Item = createItem( cntrItem, Bold );
diam3Item->setText( 0, tr( "MAX_ELEMENT_LENGTH_3D" ) ); diam3Item->setText( 0, tr( "MAX_ELEMENT_LENGTH_3D" ) );
diam3Item->setText( 1, QString( "%1" ).arg( afunctor->GetValue( id ) ) ); 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 ) ) { if ( !CORBA::is_nil( aMesh ) ) {
SMESH::ElementPosition pos = aMesh->GetElementPosition( id ); SMESH::ElementPosition pos = aMesh->GetElementPosition( id );
int shapeID = pos.shapeID; 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 ) ) { if ( !CORBA::is_nil( aMesh ) ) {
SMESH::ListOfGroups_var groups = aMesh->GetGroups(); SMESH::ListOfGroups_var groups = aMesh->GetGroups();
QTreeWidgetItem* groupsItem = 0; QTreeWidgetItem* groupsItem = 0;

View File

@ -403,6 +403,7 @@ void SMESHGUI_MeshInfosBox::SetMeshInfo(const SMESH::long_array& theInfo)
// faces // faces
myNbFace ->setText( QString("%1").arg( theInfo[SMDSEntity_Triangle] + myNbFace ->setText( QString("%1").arg( theInfo[SMDSEntity_Triangle] +
theInfo[SMDSEntity_Quad_Triangle] + theInfo[SMDSEntity_Quad_Triangle] +
theInfo[SMDSEntity_BiQuad_Triangle] +
theInfo[SMDSEntity_Quadrangle] + theInfo[SMDSEntity_Quadrangle] +
theInfo[SMDSEntity_Quad_Quadrangle] + theInfo[SMDSEntity_Quad_Quadrangle] +
theInfo[SMDSEntity_BiQuad_Quadrangle] + theInfo[SMDSEntity_BiQuad_Quadrangle] +
@ -441,9 +442,11 @@ void SMESHGUI_MeshInfosBox::SetMeshInfo(const SMESH::long_array& theInfo)
{ {
// triangles // triangles
myNbTrai ->setText( QString("%1").arg( theInfo[SMDSEntity_Triangle] + 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 // quadrangles
myNbQuad ->setText( QString("%1").arg( theInfo[SMDSEntity_Quadrangle] + myNbQuad ->setText( QString("%1").arg( theInfo[SMDSEntity_Quadrangle] +
theInfo[SMDSEntity_Quad_Quadrangle] + theInfo[SMDSEntity_Quad_Quadrangle] +

View File

@ -215,6 +215,10 @@
<source>ICON_DLG_QUADRATIC_TRIANGLE</source> <source>ICON_DLG_QUADRATIC_TRIANGLE</source>
<translation>mesh_quad_triangle.png</translation> <translation>mesh_quad_triangle.png</translation>
</message> </message>
<message>
<source>ICON_DLG_BIQUADRATIC_TRIANGLE</source>
<translation>mesh_biquad_triangle.png</translation>
</message>
<message> <message>
<source>ICON_DLG_REM_ELEMENT</source> <source>ICON_DLG_REM_ELEMENT</source>
<translation>mesh_rem_element.png</translation> <translation>mesh_rem_element.png</translation>