mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-26 09:20:34 +05:00
23416: [CEA 2033] Impossible to re-compute a mesh from an hdf
Optimize mesh loading in case of complex shape + a group on geometry (SMESHDS_GroupBase.cxx) + While MED export, create groups of all balls and 0D elements, if required (SMESH_Mesh.cxx) + Remember collapsed state of information on elements and nodes in Mesh Information dlg (SMESHGUI_MeshInfo)
This commit is contained in:
parent
c80762b0a1
commit
3957e28e35
@ -20,7 +20,6 @@
|
||||
# --- options ---
|
||||
# additional include directories
|
||||
INCLUDE_DIRECTORIES(
|
||||
${QT_INCLUDES}
|
||||
${KERNEL_INCLUDE_DIRS}
|
||||
${GUI_INCLUDE_DIRS}
|
||||
${MEDFILE_INCLUDE_DIRS}
|
||||
|
@ -1421,6 +1421,8 @@ void SMESH_Mesh::ExportMED(const char * file,
|
||||
myWriter.AddGroupOfEdges();
|
||||
myWriter.AddGroupOfFaces();
|
||||
myWriter.AddGroupOfVolumes();
|
||||
myWriter.AddGroupOf0DElems();
|
||||
myWriter.AddGroupOfBalls();
|
||||
}
|
||||
if ( theAllElemsToGroup )
|
||||
myWriter.AddAllToGroup();
|
||||
|
@ -124,6 +124,9 @@ int SMESHDS_GroupBase::Extent() const
|
||||
|
||||
bool SMESHDS_GroupBase::IsEmpty()
|
||||
{
|
||||
if ( myMesh->GetMeshInfo().NbElements( myType ) == 0 )
|
||||
// avoid long iteration over sub-meshes of a complex sub-mesh of a group on geometry
|
||||
return false;
|
||||
SMDS_ElemIteratorPtr it = GetElements();
|
||||
return ( !it || !it->more() );
|
||||
}
|
||||
|
@ -21,7 +21,6 @@
|
||||
# additional include directories
|
||||
INCLUDE_DIRECTORIES(
|
||||
${CAS_INCLUDE_DIRS}
|
||||
${QT_INCLUDES}
|
||||
${PYTHON_INCLUDE_DIRS}
|
||||
${VTK_INCLUDE_DIRS}
|
||||
${KERNEL_INCLUDE_DIRS}
|
||||
|
@ -467,10 +467,14 @@ namespace
|
||||
QObject::tr( "SMESH_BAD_MESH_SELECTION" ));
|
||||
return;
|
||||
}
|
||||
SMESH::SMESH_GroupBase_var aGroup = SMESH::SMESH_GroupBase::_narrow( aMeshItem );
|
||||
if ( aCheckWarn && !aGroup->_is_nil() ) {
|
||||
QMessageBox msgBox(SUIT_MessageBox::Warning,QObject::tr("SMESH_WRN_WARNING"),
|
||||
QObject::tr("SMESH_EXPORT_ONLY_GPOUP"),QMessageBox::StandardButton::NoButton, SMESHGUI::desktop());
|
||||
SMESH::SMESH_GroupBase_var aGroup = SMESH::SMESH_GroupBase::_narrow( aMeshItem );
|
||||
if ( aCheckWarn && !aGroup->_is_nil() )
|
||||
{
|
||||
QMessageBox msgBox(SUIT_MessageBox::Warning,
|
||||
QObject::tr("SMESH_WRN_WARNING"),
|
||||
QObject::tr("SMESH_EXPORT_ONLY_GPOUP"),
|
||||
QMessageBox::StandardButton::NoButton,
|
||||
SMESHGUI::desktop());
|
||||
QCheckBox dontShowCheckBox(QObject::tr("SMESH_WRN_SHOW_DLG_CHECKBOX"));
|
||||
msgBox.addButton(QMessageBox::Ok);
|
||||
msgBox.addButton(QMessageBox::Cancel);
|
||||
@ -481,12 +485,12 @@ namespace
|
||||
lt->addWidget(btnbox, lt->rowCount(), 0, lt->rowCount(), lt->columnCount());
|
||||
if(msgBox.exec() == QMessageBox::Ok)
|
||||
{
|
||||
if(dontShowCheckBox.checkState() == Qt::Checked)
|
||||
{
|
||||
if ( resMgr )
|
||||
resMgr->setValue( "SMESH", "show_warning", false);
|
||||
}
|
||||
aCheckWarn = false;
|
||||
if(dontShowCheckBox.checkState() == Qt::Checked)
|
||||
{
|
||||
if ( resMgr )
|
||||
resMgr->setValue( "SMESH", "show_warning", false);
|
||||
}
|
||||
aCheckWarn = false;
|
||||
}
|
||||
else
|
||||
return;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -242,9 +242,11 @@ protected:
|
||||
|
||||
private slots:
|
||||
void itemDoubleClicked( QTreeWidgetItem*, int );
|
||||
void saveExpanded( QTreeWidgetItem* );
|
||||
|
||||
private:
|
||||
QTreeWidgetItem* createItem( QTreeWidgetItem* = 0, int = 0 );
|
||||
QString expandedResource( QTreeWidgetItem* );
|
||||
|
||||
private:
|
||||
QTreeWidget* myInfo;
|
||||
|
@ -847,8 +847,8 @@ bool StdMeshers_ProjectionUtils::FindSubShapeAssociation(const TopoDS_Shape& the
|
||||
}
|
||||
// Associate shells
|
||||
//
|
||||
int nbFaces1 = SMESH_MesherHelper:: Count( shell1, TopAbs_FACE, 0 );
|
||||
int nbFaces2 = SMESH_MesherHelper:: Count( shell2, TopAbs_FACE, 0 );
|
||||
int nbFaces1 = SMESH_MesherHelper::Count( shell1, TopAbs_FACE, 0 );
|
||||
int nbFaces2 = SMESH_MesherHelper::Count( shell2, TopAbs_FACE, 0 );
|
||||
if ( nbFaces1 != nbFaces2 )
|
||||
RETURN_BAD_RESULT("Different nb of faces found for shells");
|
||||
if ( nbFaces1 > 0 ) {
|
||||
|
Loading…
Reference in New Issue
Block a user