From 9493563cbc59acba2b9b036bb22fb184f5be946d Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 20 Aug 2015 19:23:10 +0300 Subject: [PATCH] 23138: EDF SMESH Regression: New behavior with ExtrusionSweepObject IPAL52830: "Mesh computation fails" and "Evaluate" dialogs do not have [Help] button IPAL52782: Invalid polygon after merge --- src/SMESH/SMESH_MeshEditor.cxx | 19 +++++++++---------- src/SMESHGUI/SMESHGUI_ComputeDlg.cxx | 16 ++++++++++------ src/SMESHGUI/SMESHGUI_CreatePatternDlg.cxx | 2 +- 3 files changed, 20 insertions(+), 17 deletions(-) diff --git a/src/SMESH/SMESH_MeshEditor.cxx b/src/SMESH/SMESH_MeshEditor.cxx index ae309699d..42ce46b79 100644 --- a/src/SMESH/SMESH_MeshEditor.cxx +++ b/src/SMESH/SMESH_MeshEditor.cxx @@ -5011,7 +5011,7 @@ void SMESH_MeshEditor::makeWalls (TNodeOfNodeListMap & mapNewNodes, el = e; nbInitElems += elemSet.count(el); } - if ( nbInitElems < 2 ) { + if ( nbInitElems == 1 ) { bool NotCreateEdge = el && el->IsMediumNode(node); if(!NotCreateEdge) { vector newNodesItVec( 1, nList ); @@ -7244,19 +7244,17 @@ int SMESH_MeshEditor::SimplifyFace (const vector& faceNod set nodeSet; // get simple seq of nodes - //const SMDS_MeshNode* simpleNodes[ nbNodes ]; vector simpleNodes( nbNodes ); - int iSimple = 0, nbUnique = 0; + int iSimple = 0; simpleNodes[iSimple++] = faceNodes[0]; - nbUnique++; for (int iCur = 1; iCur < nbNodes; iCur++) { if (faceNodes[iCur] != simpleNodes[iSimple - 1]) { simpleNodes[iSimple++] = faceNodes[iCur]; - if (nodeSet.insert( faceNodes[iCur] ).second) - nbUnique++; + nodeSet.insert( faceNodes[iCur] ); } } + int nbUnique = nodeSet.size(); int nbSimple = iSimple; if (simpleNodes[nbSimple - 1] == simpleNodes[0]) { nbSimple--; @@ -7456,6 +7454,8 @@ void SMESH_MeshEditor::MergeNodes (TListOfListOfNodes & theGroupsOfNodes) ( SMDS_MeshCell::interlacedSmdsOrder( SMDSEntity_Quad_Polygon, nbNewNodes ), face_nodes ); } + elemType.SetPoly(( nbNewNodes / ( elemType.myIsQuad + 1 ) > 4 )); + SMDS_MeshElement* newElem = AddElement( face_nodes, elemType ); if ( aShapeId ) aMesh->SetMeshElementOnShape(newElem, aShapeId); @@ -7472,9 +7472,9 @@ void SMESH_MeshEditor::MergeNodes (TListOfListOfNodes & theGroupsOfNodes) } else { // each face has to be analyzed in order to check volume validity - const SMDS_VtkVolume* aPolyedre = - dynamic_cast( elem ); - if (aPolyedre) { + const SMDS_VtkVolume* aPolyedre = dynamic_cast( elem ); + if (aPolyedre) + { int nbFaces = aPolyedre->NbFaces(); vector poly_nodes; @@ -7502,7 +7502,6 @@ void SMESH_MeshEditor::MergeNodes (TListOfListOfNodes & theGroupsOfNodes) if (quantities.size() > 3) { - //aMesh->ChangePolyhedronNodes(elem, poly_nodes, quantities); const SMDS_MeshElement* newElem = aMesh->AddPolyhedralVolume(poly_nodes, quantities); myLastCreatedElems.Append(newElem); diff --git a/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx b/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx index b774599d4..875eb675d 100644 --- a/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx @@ -487,7 +487,7 @@ namespace SMESH //======================================================================= SMESHGUI_ComputeDlg::SMESHGUI_ComputeDlg( QWidget* parent, bool ForEval ) - : SMESHGUI_Dialog( parent, false, true, Close/* | Help*/ ) + : SMESHGUI_Dialog( parent, false, true, Close | Help ) { QVBoxLayout* aDlgLay = new QVBoxLayout (mainFrame()); aDlgLay->setMargin( 0 ); @@ -1482,6 +1482,7 @@ QTableWidget* SMESHGUI_BaseComputeOp::table() SMESHGUI_ComputeOp::SMESHGUI_ComputeOp() : SMESHGUI_BaseComputeOp() { + myHelpFileName = "constructing_meshes_page.html#compute_anchor"; } @@ -1551,7 +1552,6 @@ SMESHGUI_PrecomputeOp::SMESHGUI_PrecomputeOp() myActiveDlg( 0 ), myPreviewDisplayer( 0 ) { - myHelpFileName = "constructing_meshes_page.html#preview_mesh_anchor"; } //================================================================================ @@ -1592,6 +1592,8 @@ LightApp_Dialog* SMESHGUI_PrecomputeOp::dlg() const void SMESHGUI_PrecomputeOp::startOperation() { + myHelpFileName = "constructing_meshes_page.html#preview_anchor"; // other anchor onCompute() + if ( !myDlg ) { myDlg = new SMESHGUI_PrecomputeDlg( desktop() ); @@ -1778,6 +1780,7 @@ void SMESHGUI_PrecomputeOp::onCompute() myOrderMgr->SetMeshOrder(); myMapShapeId.clear(); myActiveDlg = computeDlg(); + myHelpFileName = "constructing_meshes_page.html#compute_anchor"; computeMesh(); } @@ -1850,19 +1853,19 @@ void SMESHGUI_PrecomputeOp::onPreview() if (myOrderMgr && myOrderMgr->IsOrderChanged()) myOrderMgr->SetMeshOrder(); - // Compute preview of mesh, + // Compute preview of mesh, // i.e. compute mesh till indicated dimension int dim = myDlg->getPreviewMode(); - + SMESH::MemoryReserve aMemoryReserve; - + SMESH::compute_error_array_var aCompErrors; QString aHypErrors; bool computeFailed = true, memoryLack = false; SMESHGUI_ComputeDlg* aCompDlg = computeDlg(); - aCompDlg->myMeshName->setText( aMeshSObj->GetName().c_str() ); + aCompDlg->myMeshName->setText( aMeshSObj->GetName().c_str() ); SMESHGUI* gui = getSMESHGUI(); SMESH::SMESH_Gen_var gen = gui->GetSMESHGen(); @@ -2045,6 +2048,7 @@ SMESHGUI_MeshOrderBox* SMESHGUI_PrecomputeDlg::getMeshOrderBox() const SMESHGUI_EvaluateOp::SMESHGUI_EvaluateOp() : SMESHGUI_BaseComputeOp() { + myHelpFileName = "constructing_meshes_page.html#evaluate_anchor"; } diff --git a/src/SMESHGUI/SMESHGUI_CreatePatternDlg.cxx b/src/SMESHGUI/SMESHGUI_CreatePatternDlg.cxx index f0aa90dcb..47c2f8eec 100755 --- a/src/SMESHGUI/SMESHGUI_CreatePatternDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_CreatePatternDlg.cxx @@ -569,7 +569,7 @@ void SMESHGUI_CreatePatternDlg::onSelectionDone() { try { SALOME_ListIO aList; - mySelectionMgr->selectedObjects( aList, SVTK_Viewer::Type() ); + mySelectionMgr->selectedObjects( aList ); if ( aList.Extent() != 1 ) return; -- 2.30.2