mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-18 08:50:33 +05:00
IPAL22173 TC6.2.0: "Netgen1D-2D" algorithm doesn't work on "flight_solid.brep"
Treate a case where a valid mesh is computed anyhow while the algo reports errors
This commit is contained in:
parent
49b0d94452
commit
eec523867a
@ -349,6 +349,8 @@ namespace SMESH
|
|||||||
if ( strlen(comment) == 0 )
|
if ( strlen(comment) == 0 )
|
||||||
text = QObject::tr("COMPERR_ALGO_FAILED");
|
text = QObject::tr("COMPERR_ALGO_FAILED");
|
||||||
break;
|
break;
|
||||||
|
case SMESH::COMPERR_WARNING:
|
||||||
|
return comment ? QString(comment) : QObject::tr("COMPERR_UNKNOWN");
|
||||||
default:
|
default:
|
||||||
text = QString("#%1").arg( -errCode );
|
text = QString("#%1").arg( -errCode );
|
||||||
}
|
}
|
||||||
@ -535,10 +537,11 @@ QFrame* SMESHGUI_ComputeDlg::createMainFrame (QWidget* theParent, bool ForEval)
|
|||||||
// Computation errors
|
// Computation errors
|
||||||
|
|
||||||
myCompErrorGroup = new QGroupBox(tr("ERRORS"), aFrame);
|
myCompErrorGroup = new QGroupBox(tr("ERRORS"), aFrame);
|
||||||
myTable = new QTableWidget( 1, NB_COLUMNS, myCompErrorGroup);
|
myWarningLabel = new QLabel(QString("<b>%1</b>").arg(tr("COMPUTE_WARNING")), myCompErrorGroup);
|
||||||
myShowBtn = new QPushButton(tr("SHOW_SHAPE"), myCompErrorGroup);
|
myTable = new QTableWidget( 1, NB_COLUMNS, myCompErrorGroup);
|
||||||
myPublishBtn = new QPushButton(tr("PUBLISH_SHAPE"), myCompErrorGroup);
|
myShowBtn = new QPushButton(tr("SHOW_SHAPE"), myCompErrorGroup);
|
||||||
myBadMeshBtn = new QPushButton(tr("SHOW_BAD_MESH"), myCompErrorGroup);
|
myPublishBtn = new QPushButton(tr("PUBLISH_SHAPE"), myCompErrorGroup);
|
||||||
|
myBadMeshBtn = new QPushButton(tr("SHOW_BAD_MESH"), myCompErrorGroup);
|
||||||
|
|
||||||
//myTable->setReadOnly( true ); // VSR: check
|
//myTable->setReadOnly( true ); // VSR: check
|
||||||
myTable->setEditTriggers( QAbstractItemView::NoEditTriggers );
|
myTable->setEditTriggers( QAbstractItemView::NoEditTriggers );
|
||||||
@ -560,11 +563,12 @@ QFrame* SMESHGUI_ComputeDlg::createMainFrame (QWidget* theParent, bool ForEval)
|
|||||||
QGridLayout* grpLayout = new QGridLayout(myCompErrorGroup);
|
QGridLayout* grpLayout = new QGridLayout(myCompErrorGroup);
|
||||||
grpLayout->setSpacing(SPACING);
|
grpLayout->setSpacing(SPACING);
|
||||||
grpLayout->setMargin(MARGIN);
|
grpLayout->setMargin(MARGIN);
|
||||||
grpLayout->addWidget( myTable, 0, 0, 4, 1 );
|
grpLayout->addWidget( myWarningLabel, 0, 0 );
|
||||||
grpLayout->addWidget( myShowBtn, 0, 1 );
|
grpLayout->addWidget( myTable, 1, 0, 4, 1 );
|
||||||
grpLayout->addWidget( myPublishBtn, 1, 1 );
|
grpLayout->addWidget( myShowBtn, 1, 1 );
|
||||||
grpLayout->addWidget( myBadMeshBtn, 2, 1 );
|
grpLayout->addWidget( myPublishBtn, 2, 1 );
|
||||||
grpLayout->setRowStretch( 3, 1 );
|
grpLayout->addWidget( myBadMeshBtn, 3, 1 );
|
||||||
|
grpLayout->setRowStretch( 4, 1 );
|
||||||
|
|
||||||
// Hypothesis definition errors
|
// Hypothesis definition errors
|
||||||
|
|
||||||
@ -941,26 +945,44 @@ void SMESHGUI_BaseComputeOp::showComputeResult( const bool theMemoryLack,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
QTableWidget* tbl = aCompDlg->myTable;
|
bool onlyWarnings = !theNoCompError; // == valid mesh computed but there are errors reported
|
||||||
SMESH::long_array_var aRes = myMesh->GetMeshInfo();
|
for ( int i = 0; i < theCompErrors->length() && onlyWarnings; ++i )
|
||||||
aCompDlg->myBriefInfo->SetMeshInfo( aRes );
|
onlyWarnings = ( theCompErrors[ i ].code == SMESH::COMPERR_WARNING );
|
||||||
aCompDlg->myBriefInfo->show();
|
|
||||||
aCompDlg->myFullInfo->hide();
|
|
||||||
|
|
||||||
|
// full or brief mesh info
|
||||||
|
SMESH::long_array_var aRes = myMesh->GetMeshInfo();
|
||||||
|
if ( onlyWarnings ) {
|
||||||
|
aCompDlg->myFullInfo->SetMeshInfo( aRes );
|
||||||
|
aCompDlg->myFullInfo->show();
|
||||||
|
aCompDlg->myBriefInfo->hide();
|
||||||
|
} else {
|
||||||
|
aCompDlg->myBriefInfo->SetMeshInfo( aRes );
|
||||||
|
aCompDlg->myBriefInfo->show();
|
||||||
|
aCompDlg->myFullInfo->hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
// pbs of hypo dfinitions
|
||||||
if ( theNoHypoError ) {
|
if ( theNoHypoError ) {
|
||||||
aCompDlg->myHypErrorGroup->hide();
|
aCompDlg->myHypErrorGroup->hide();
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
aCompDlg->myHypErrorGroup->show();
|
aCompDlg->myHypErrorGroup->show();
|
||||||
aCompDlg->myHypErrorLabel->setText( theHypErrors );
|
aCompDlg->myHypErrorLabel->setText( theHypErrors );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( theNoCompError ) {
|
// table of errors
|
||||||
|
if ( theNoCompError )
|
||||||
|
{
|
||||||
aCompDlg->myCompErrorGroup->hide();
|
aCompDlg->myCompErrorGroup->hide();
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
aCompDlg->myCompErrorGroup->show();
|
aCompDlg->myCompErrorGroup->show();
|
||||||
|
|
||||||
|
if ( onlyWarnings )
|
||||||
|
aCompDlg->myWarningLabel->show();
|
||||||
|
else
|
||||||
|
aCompDlg->myWarningLabel->hide();
|
||||||
|
|
||||||
if ( !hasShape ) {
|
if ( !hasShape ) {
|
||||||
aCompDlg->myPublishBtn->hide();
|
aCompDlg->myPublishBtn->hide();
|
||||||
aCompDlg->myShowBtn->hide();
|
aCompDlg->myShowBtn->hide();
|
||||||
@ -971,6 +993,7 @@ void SMESHGUI_BaseComputeOp::showComputeResult( const bool theMemoryLack,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// fill table of errors
|
// fill table of errors
|
||||||
|
QTableWidget* tbl = aCompDlg->myTable;
|
||||||
tbl->setRowCount( theCompErrors->length() );
|
tbl->setRowCount( theCompErrors->length() );
|
||||||
if ( !hasShape ) tbl->hideColumn( COL_SHAPE );
|
if ( !hasShape ) tbl->hideColumn( COL_SHAPE );
|
||||||
else tbl->showColumn( COL_SHAPE );
|
else tbl->showColumn( COL_SHAPE );
|
||||||
|
@ -221,6 +221,7 @@ protected:
|
|||||||
QGroupBox* myCompErrorGroup;
|
QGroupBox* myCompErrorGroup;
|
||||||
QGroupBox* myHypErrorGroup;
|
QGroupBox* myHypErrorGroup;
|
||||||
QLabel* myHypErrorLabel;
|
QLabel* myHypErrorLabel;
|
||||||
|
QLabel* myWarningLabel;
|
||||||
QTableWidget* myTable;
|
QTableWidget* myTable;
|
||||||
QPushButton* myShowBtn;
|
QPushButton* myShowBtn;
|
||||||
QPushButton* myPublishBtn;
|
QPushButton* myPublishBtn;
|
||||||
|
@ -99,6 +99,10 @@
|
|||||||
<source>COMPERR_STD_EXCEPTION</source>
|
<source>COMPERR_STD_EXCEPTION</source>
|
||||||
<translation>std::exception</translation>
|
<translation>std::exception</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>COMPERR_UNKNOWN</source>
|
||||||
|
<translation>Unknown error</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>SMESH_GEOM</source>
|
<source>SMESH_GEOM</source>
|
||||||
<translation>Geometry</translation>
|
<translation>Geometry</translation>
|
||||||
@ -3848,6 +3852,10 @@ Please, create VTK viewer and try again</translation>
|
|||||||
<source>MEMORY_LACK</source>
|
<source>MEMORY_LACK</source>
|
||||||
<translation>Memory allocation problem</translation>
|
<translation>Memory allocation problem</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>COMPUTE_WARNING</source>
|
||||||
|
<translation>The mesh seems to be OK but there are some errors reported</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>PUBLISH_SHAPE</source>
|
<source>PUBLISH_SHAPE</source>
|
||||||
<translation>Publish SubShape</translation>
|
<translation>Publish SubShape</translation>
|
||||||
|
Loading…
Reference in New Issue
Block a user