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
This commit is contained in:
eap 2015-08-20 19:23:10 +03:00
parent 87c954b31c
commit 9493563cbc
3 changed files with 20 additions and 17 deletions

View File

@ -5011,7 +5011,7 @@ void SMESH_MeshEditor::makeWalls (TNodeOfNodeListMap & mapNewNodes,
el = e; el = e;
nbInitElems += elemSet.count(el); nbInitElems += elemSet.count(el);
} }
if ( nbInitElems < 2 ) { if ( nbInitElems == 1 ) {
bool NotCreateEdge = el && el->IsMediumNode(node); bool NotCreateEdge = el && el->IsMediumNode(node);
if(!NotCreateEdge) { if(!NotCreateEdge) {
vector<TNodeOfNodeListMapItr> newNodesItVec( 1, nList ); vector<TNodeOfNodeListMapItr> newNodesItVec( 1, nList );
@ -7244,19 +7244,17 @@ int SMESH_MeshEditor::SimplifyFace (const vector<const SMDS_MeshNode *>& faceNod
set<const SMDS_MeshNode*> nodeSet; set<const SMDS_MeshNode*> nodeSet;
// get simple seq of nodes // get simple seq of nodes
//const SMDS_MeshNode* simpleNodes[ nbNodes ];
vector<const SMDS_MeshNode*> simpleNodes( nbNodes ); vector<const SMDS_MeshNode*> simpleNodes( nbNodes );
int iSimple = 0, nbUnique = 0; int iSimple = 0;
simpleNodes[iSimple++] = faceNodes[0]; simpleNodes[iSimple++] = faceNodes[0];
nbUnique++;
for (int iCur = 1; iCur < nbNodes; iCur++) { for (int iCur = 1; iCur < nbNodes; iCur++) {
if (faceNodes[iCur] != simpleNodes[iSimple - 1]) { if (faceNodes[iCur] != simpleNodes[iSimple - 1]) {
simpleNodes[iSimple++] = faceNodes[iCur]; simpleNodes[iSimple++] = faceNodes[iCur];
if (nodeSet.insert( faceNodes[iCur] ).second) nodeSet.insert( faceNodes[iCur] );
nbUnique++;
} }
} }
int nbUnique = nodeSet.size();
int nbSimple = iSimple; int nbSimple = iSimple;
if (simpleNodes[nbSimple - 1] == simpleNodes[0]) { if (simpleNodes[nbSimple - 1] == simpleNodes[0]) {
nbSimple--; nbSimple--;
@ -7456,6 +7454,8 @@ void SMESH_MeshEditor::MergeNodes (TListOfListOfNodes & theGroupsOfNodes)
( SMDS_MeshCell::interlacedSmdsOrder( SMDSEntity_Quad_Polygon, ( SMDS_MeshCell::interlacedSmdsOrder( SMDSEntity_Quad_Polygon,
nbNewNodes ), face_nodes ); nbNewNodes ), face_nodes );
} }
elemType.SetPoly(( nbNewNodes / ( elemType.myIsQuad + 1 ) > 4 ));
SMDS_MeshElement* newElem = AddElement( face_nodes, elemType ); SMDS_MeshElement* newElem = AddElement( face_nodes, elemType );
if ( aShapeId ) if ( aShapeId )
aMesh->SetMeshElementOnShape(newElem, aShapeId); aMesh->SetMeshElementOnShape(newElem, aShapeId);
@ -7472,9 +7472,9 @@ void SMESH_MeshEditor::MergeNodes (TListOfListOfNodes & theGroupsOfNodes)
} }
else { else {
// each face has to be analyzed in order to check volume validity // each face has to be analyzed in order to check volume validity
const SMDS_VtkVolume* aPolyedre = const SMDS_VtkVolume* aPolyedre = dynamic_cast<const SMDS_VtkVolume*>( elem );
dynamic_cast<const SMDS_VtkVolume*>( elem ); if (aPolyedre)
if (aPolyedre) { {
int nbFaces = aPolyedre->NbFaces(); int nbFaces = aPolyedre->NbFaces();
vector<const SMDS_MeshNode *> poly_nodes; vector<const SMDS_MeshNode *> poly_nodes;
@ -7502,7 +7502,6 @@ void SMESH_MeshEditor::MergeNodes (TListOfListOfNodes & theGroupsOfNodes)
if (quantities.size() > 3) if (quantities.size() > 3)
{ {
//aMesh->ChangePolyhedronNodes(elem, poly_nodes, quantities);
const SMDS_MeshElement* newElem = const SMDS_MeshElement* newElem =
aMesh->AddPolyhedralVolume(poly_nodes, quantities); aMesh->AddPolyhedralVolume(poly_nodes, quantities);
myLastCreatedElems.Append(newElem); myLastCreatedElems.Append(newElem);

View File

@ -487,7 +487,7 @@ namespace SMESH
//======================================================================= //=======================================================================
SMESHGUI_ComputeDlg::SMESHGUI_ComputeDlg( QWidget* parent, bool ForEval ) 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()); QVBoxLayout* aDlgLay = new QVBoxLayout (mainFrame());
aDlgLay->setMargin( 0 ); aDlgLay->setMargin( 0 );
@ -1482,6 +1482,7 @@ QTableWidget* SMESHGUI_BaseComputeOp::table()
SMESHGUI_ComputeOp::SMESHGUI_ComputeOp() SMESHGUI_ComputeOp::SMESHGUI_ComputeOp()
: SMESHGUI_BaseComputeOp() : SMESHGUI_BaseComputeOp()
{ {
myHelpFileName = "constructing_meshes_page.html#compute_anchor";
} }
@ -1551,7 +1552,6 @@ SMESHGUI_PrecomputeOp::SMESHGUI_PrecomputeOp()
myActiveDlg( 0 ), myActiveDlg( 0 ),
myPreviewDisplayer( 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() void SMESHGUI_PrecomputeOp::startOperation()
{ {
myHelpFileName = "constructing_meshes_page.html#preview_anchor"; // other anchor onCompute()
if ( !myDlg ) if ( !myDlg )
{ {
myDlg = new SMESHGUI_PrecomputeDlg( desktop() ); myDlg = new SMESHGUI_PrecomputeDlg( desktop() );
@ -1778,6 +1780,7 @@ void SMESHGUI_PrecomputeOp::onCompute()
myOrderMgr->SetMeshOrder(); myOrderMgr->SetMeshOrder();
myMapShapeId.clear(); myMapShapeId.clear();
myActiveDlg = computeDlg(); myActiveDlg = computeDlg();
myHelpFileName = "constructing_meshes_page.html#compute_anchor";
computeMesh(); computeMesh();
} }
@ -1850,19 +1853,19 @@ void SMESHGUI_PrecomputeOp::onPreview()
if (myOrderMgr && myOrderMgr->IsOrderChanged()) if (myOrderMgr && myOrderMgr->IsOrderChanged())
myOrderMgr->SetMeshOrder(); myOrderMgr->SetMeshOrder();
// Compute preview of mesh, // Compute preview of mesh,
// i.e. compute mesh till indicated dimension // i.e. compute mesh till indicated dimension
int dim = myDlg->getPreviewMode(); int dim = myDlg->getPreviewMode();
SMESH::MemoryReserve aMemoryReserve; SMESH::MemoryReserve aMemoryReserve;
SMESH::compute_error_array_var aCompErrors; SMESH::compute_error_array_var aCompErrors;
QString aHypErrors; QString aHypErrors;
bool computeFailed = true, memoryLack = false; bool computeFailed = true, memoryLack = false;
SMESHGUI_ComputeDlg* aCompDlg = computeDlg(); SMESHGUI_ComputeDlg* aCompDlg = computeDlg();
aCompDlg->myMeshName->setText( aMeshSObj->GetName().c_str() ); aCompDlg->myMeshName->setText( aMeshSObj->GetName().c_str() );
SMESHGUI* gui = getSMESHGUI(); SMESHGUI* gui = getSMESHGUI();
SMESH::SMESH_Gen_var gen = gui->GetSMESHGen(); SMESH::SMESH_Gen_var gen = gui->GetSMESHGen();
@ -2045,6 +2048,7 @@ SMESHGUI_MeshOrderBox* SMESHGUI_PrecomputeDlg::getMeshOrderBox() const
SMESHGUI_EvaluateOp::SMESHGUI_EvaluateOp() SMESHGUI_EvaluateOp::SMESHGUI_EvaluateOp()
: SMESHGUI_BaseComputeOp() : SMESHGUI_BaseComputeOp()
{ {
myHelpFileName = "constructing_meshes_page.html#evaluate_anchor";
} }

View File

@ -569,7 +569,7 @@ void SMESHGUI_CreatePatternDlg::onSelectionDone()
{ {
try { try {
SALOME_ListIO aList; SALOME_ListIO aList;
mySelectionMgr->selectedObjects( aList, SVTK_Viewer::Type() ); mySelectionMgr->selectedObjects( aList );
if ( aList.Extent() != 1 ) if ( aList.Extent() != 1 )
return; return;