From 43ce5a9126b4f313e2f199fa920d8876defc2d6b Mon Sep 17 00:00:00 2001 From: eap Date: Fri, 15 May 2015 21:20:14 +0300 Subject: [PATCH] IPAL13978: Problem of updating SubMeshes on Face and Compound in Object Browser after compute of mesh Fix a bug that icons updated starting from the 4th child of mesh object IPAL13023: To correct alignment for output of "Dump()" functionality. --- src/SMESH/SMESH_Mesh.cxx | 14 +++++++------- src/SMESHGUI/SMESHGUI_Utils.cxx | 4 +++- src/SMESH_I/SMESH_Mesh_i.cxx | 4 ++++ 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/SMESH/SMESH_Mesh.cxx b/src/SMESH/SMESH_Mesh.cxx index 94b1b7a72..4b3444adf 100644 --- a/src/SMESH/SMESH_Mesh.cxx +++ b/src/SMESH/SMESH_Mesh.cxx @@ -2116,11 +2116,11 @@ ostream& SMESH_Mesh::Dump(ostream& save) { int clause = 0; save << "========================== Dump contents of mesh ==========================" << endl << endl; - save << ++clause << ") Total number of nodes: \t" << NbNodes() << endl; - save << ++clause << ") Total number of edges: \t" << NbEdges() << endl; - save << ++clause << ") Total number of faces: \t" << NbFaces() << endl; - save << ++clause << ") Total number of polygons:\t" << NbPolygons() << endl; - save << ++clause << ") Total number of volumes:\t" << NbVolumes() << endl; + save << ++clause << ") Total number of nodes: \t" << NbNodes() << endl; + save << ++clause << ") Total number of edges: \t" << NbEdges() << endl; + save << ++clause << ") Total number of faces: \t" << NbFaces() << endl; + save << ++clause << ") Total number of polygons: \t" << NbPolygons() << endl; + save << ++clause << ") Total number of volumes: \t" << NbVolumes() << endl; save << ++clause << ") Total number of polyhedrons:\t" << NbPolyhedrons() << endl << endl; for ( int isQuadratic = 0; isQuadratic < 2; ++isQuadratic ) { @@ -2155,10 +2155,10 @@ ostream& SMESH_Mesh::Dump(ostream& save) int nb4 = NbTetras(order); int nb5 = NbPyramids(order); int nb6 = NbPrisms(order); - save << clause << ".1) Number of " << orderStr << " hexahedrons:\t" << nb8 << endl; + save << clause << ".1) Number of " << orderStr << " hexahedrons: \t" << nb8 << endl; save << clause << ".2) Number of " << orderStr << " tetrahedrons:\t" << nb4 << endl; save << clause << ".3) Number of " << orderStr << " prisms: \t" << nb6 << endl; - save << clause << ".4) Number of " << orderStr << " pyramids:\t" << nb5 << endl; + save << clause << ".4) Number of " << orderStr << " pyramids: \t" << nb5 << endl; if ( nb8 + nb4 + nb5 + nb6 != NbVolumes(order) ) { map myVolumesMap; SMDS_VolumeIteratorPtr itVolumes=_myMeshDS->volumesIterator(); diff --git a/src/SMESHGUI/SMESHGUI_Utils.cxx b/src/SMESHGUI/SMESHGUI_Utils.cxx index e49c5e691..72e29e737 100644 --- a/src/SMESHGUI/SMESHGUI_Utils.cxx +++ b/src/SMESHGUI/SMESHGUI_Utils.cxx @@ -300,7 +300,7 @@ namespace SMESH _PTR(ChildIterator) anIter = aStudy->NewChildIterator(theSObject); for (int i = 1; anIter->More(); anIter->Next(), i++) { _PTR(SObject) aSObj = anIter->Value(); - if (i >= 4) { + /*if (i >= 1)*/ { _PTR(ChildIterator) anIter1 = aStudy->NewChildIterator(aSObj); for ( ; anIter1->More(); anIter1->Next()) { @@ -311,6 +311,8 @@ namespace SMESH std::string entry = aSObj1->GetID(); int objType = SMESHGUI_Selection::type( entry.c_str(), aStudy ); + if ( objType == SMESH::HYPOTHESIS || objType == SMESH::ALGORITHM ) + continue; SMESH::SMESH_IDSource_var idSrc = SObjectToInterface( aSObj1 ); if ( !idSrc->_is_nil() ) diff --git a/src/SMESH_I/SMESH_Mesh_i.cxx b/src/SMESH_I/SMESH_Mesh_i.cxx index f777d3ae0..03420b0e4 100644 --- a/src/SMESH_I/SMESH_Mesh_i.cxx +++ b/src/SMESH_I/SMESH_Mesh_i.cxx @@ -1973,6 +1973,8 @@ void SMESH_Mesh_i::CheckGeomModif() GEOM::GEOM_Object_var mainGO = _gen_i->ShapeToGeomObject( _impl->GetShapeToMesh() ); //if ( mainGO->_is_nil() ) return; + // Update after group modification + if ( mainGO->_is_nil() || /* shape was removed from GEOM_Client by newGroupShape() called by other mesh (IPAL52735) */ mainGO->GetType() == GEOM_GROUP || @@ -1982,6 +1984,8 @@ void SMESH_Mesh_i::CheckGeomModif() return; } + // Update after shape transformation like Translate + GEOM_Client* geomClient = _gen_i->GetShapeReader(); if ( !geomClient ) return; GEOM::GEOM_Gen_var geomGen = _gen_i->GetGeomEngine(); -- 2.39.2