0022488: EDF 2781 SMESH: Faces of an internal submesh can't be selected with the viscous layer

This commit is contained in:
eap 2014-02-14 16:10:27 +04:00
parent 86aa8ad014
commit 5b8d7b95e3

View File

@ -744,23 +744,23 @@ QString StdMeshersGUI_StdHypothesisCreator::storeParams() const
h->SetEdges( idsWg->GetListOfIDs(), params[3].myValue.toInt() ); h->SetEdges( idsWg->GetListOfIDs(), params[3].myValue.toInt() );
} }
} }
else if( hypType()=="QuadrangleParams" ) // else if( hypType()=="QuadrangleParams" )
{ // {
StdMeshers::StdMeshers_QuadrangleParams_var h = // StdMeshers::StdMeshers_QuadrangleParams_var h =
StdMeshers::StdMeshers_QuadrangleParams::_narrow( hypothesis() ); // StdMeshers::StdMeshers_QuadrangleParams::_narrow( hypothesis() );
StdMeshersGUI_SubShapeSelectorWdg* w1 = // StdMeshersGUI_SubShapeSelectorWdg* w1 =
widget< StdMeshersGUI_SubShapeSelectorWdg >( 0 ); // widget< StdMeshersGUI_SubShapeSelectorWdg >( 0 );
StdMeshersGUI_QuadrangleParamWdg* w2 = // StdMeshersGUI_QuadrangleParamWdg* w2 =
widget< StdMeshersGUI_QuadrangleParamWdg >( 1 ); // widget< StdMeshersGUI_QuadrangleParamWdg >( 1 );
if (w1 && w2) { // if (w1 && w2) {
if (w1->GetListSize() > 0) { // if (w1->GetListSize() > 0) {
h->SetTriaVertex(w1->GetListOfIDs()[0]); // getlist must be called once // h->SetTriaVertex(w1->GetListOfIDs()[0]); // getlist must be called once
const char * entry = w1->GetMainShapeEntry(); // const char * entry = w1->GetMainShapeEntry();
h->SetObjectEntry(entry); // h->SetObjectEntry(entry);
} // }
h->SetQuadType(StdMeshers::QuadType(w2->GetType())); // h->SetQuadType(StdMeshers::QuadType(w2->GetType()));
} // }
} // }
} }
return valueStr; return valueStr;
} }
@ -1242,6 +1242,7 @@ bool StdMeshersGUI_StdHypothesisCreator::stdParams( ListOfStdParams& p ) const
customWidgets()->append (0); customWidgets()->append (0);
QString aMainEntry = SMESHGUI_GenericHypothesisCreator::getMainShapeEntry(); QString aMainEntry = SMESHGUI_GenericHypothesisCreator::getMainShapeEntry();
QString aSubEntry = SMESHGUI_GenericHypothesisCreator::getShapeEntry();
if ( !aMainEntry.isEmpty() ) if ( !aMainEntry.isEmpty() )
{ {
item.myName = tr( "TO_IGNORE_FACES_OR_NOT" ); item.myName = tr( "TO_IGNORE_FACES_OR_NOT" );
@ -1262,8 +1263,8 @@ bool StdMeshersGUI_StdHypothesisCreator::stdParams( ListOfStdParams& p ) const
StdMeshersGUI_SubShapeSelectorWdg* idsWg = StdMeshersGUI_SubShapeSelectorWdg* idsWg =
new StdMeshersGUI_SubShapeSelectorWdg(0,TopAbs_FACE); new StdMeshersGUI_SubShapeSelectorWdg(0,TopAbs_FACE);
idsWg->SetGeomShapeEntry( aMainEntry );
idsWg->SetMainShapeEntry( aMainEntry ); idsWg->SetMainShapeEntry( aMainEntry );
idsWg->SetGeomShapeEntry( aSubEntry.isEmpty() ? aMainEntry : aSubEntry );
idsWg->SetListOfIDs( h->GetFaces() ); idsWg->SetListOfIDs( h->GetFaces() );
idsWg->showPreview( true ); idsWg->showPreview( true );
customWidgets()->append ( idsWg ); customWidgets()->append ( idsWg );
@ -1293,6 +1294,7 @@ bool StdMeshersGUI_StdHypothesisCreator::stdParams( ListOfStdParams& p ) const
customWidgets()->append (0); customWidgets()->append (0);
QString aMainEntry = SMESHGUI_GenericHypothesisCreator::getMainShapeEntry(); QString aMainEntry = SMESHGUI_GenericHypothesisCreator::getMainShapeEntry();
QString aSubEntry = SMESHGUI_GenericHypothesisCreator::getShapeEntry();
if ( !aMainEntry.isEmpty() ) if ( !aMainEntry.isEmpty() )
{ {
item.myName = tr("TO_IGNORE_EDGES_OR_NOT"); item.myName = tr("TO_IGNORE_EDGES_OR_NOT");
@ -1313,53 +1315,53 @@ bool StdMeshersGUI_StdHypothesisCreator::stdParams( ListOfStdParams& p ) const
StdMeshersGUI_SubShapeSelectorWdg* idsWg = StdMeshersGUI_SubShapeSelectorWdg* idsWg =
new StdMeshersGUI_SubShapeSelectorWdg(0,TopAbs_EDGE); new StdMeshersGUI_SubShapeSelectorWdg(0,TopAbs_EDGE);
idsWg->SetGeomShapeEntry( aMainEntry );
idsWg->SetMainShapeEntry( aMainEntry ); idsWg->SetMainShapeEntry( aMainEntry );
idsWg->SetGeomShapeEntry( aSubEntry.isEmpty() ? aMainEntry : aSubEntry );
idsWg->SetListOfIDs( h->GetEdges() ); idsWg->SetListOfIDs( h->GetEdges() );
idsWg->showPreview( true ); idsWg->showPreview( true );
customWidgets()->append ( idsWg ); customWidgets()->append ( idsWg );
} }
} }
else if (hypType() == "QuadrangleParams") // else if (hypType() == "QuadrangleParams")
{ // {
StdMeshers::StdMeshers_QuadrangleParams_var h = // StdMeshers::StdMeshers_QuadrangleParams_var h =
StdMeshers::StdMeshers_QuadrangleParams::_narrow(hyp); // StdMeshers::StdMeshers_QuadrangleParams::_narrow(hyp);
item.myName = tr("SMESH_BASE_VERTEX"); // item.myName = tr("SMESH_BASE_VERTEX");
p.append(item); // p.append(item);
StdMeshersGUI_SubShapeSelectorWdg* aDirectionWidget = // StdMeshersGUI_SubShapeSelectorWdg* aDirectionWidget =
new StdMeshersGUI_SubShapeSelectorWdg(0, TopAbs_VERTEX); // new StdMeshersGUI_SubShapeSelectorWdg(0, TopAbs_VERTEX);
aDirectionWidget->SetMaxSize(1); // aDirectionWidget->SetMaxSize(1);
QString anEntry = SMESHGUI_GenericHypothesisCreator::getShapeEntry(); // QString anEntry = SMESHGUI_GenericHypothesisCreator::getShapeEntry();
QString aMainEntry = SMESHGUI_GenericHypothesisCreator::getMainShapeEntry(); // QString aMainEntry = SMESHGUI_GenericHypothesisCreator::getMainShapeEntry();
if (anEntry == "") // if (anEntry == "")
anEntry = h->GetObjectEntry(); // anEntry = h->GetObjectEntry();
aDirectionWidget->SetGeomShapeEntry(anEntry); // aDirectionWidget->SetGeomShapeEntry(anEntry);
aDirectionWidget->SetMainShapeEntry(aMainEntry); // aDirectionWidget->SetMainShapeEntry(aMainEntry);
if (!isCreation()) { // if (!isCreation()) {
SMESH::long_array_var aVec = new SMESH::long_array; // SMESH::long_array_var aVec = new SMESH::long_array;
int vertID = h->GetTriaVertex(); // int vertID = h->GetTriaVertex();
if (vertID > 0) { // if (vertID > 0) {
aVec->length(1); // aVec->length(1);
aVec[0] = vertID; // aVec[0] = vertID;
aDirectionWidget->SetListOfIDs(aVec); // aDirectionWidget->SetListOfIDs(aVec);
} // }
} // }
aDirectionWidget->showPreview(true); // aDirectionWidget->showPreview(true);
item.myName = tr("SMESH_QUAD_TYPE"); // item.myName = tr("SMESH_QUAD_TYPE");
p.append(item); // p.append(item);
StdMeshersGUI_QuadrangleParamWdg* aTypeWidget = // StdMeshersGUI_QuadrangleParamWdg* aTypeWidget =
new StdMeshersGUI_QuadrangleParamWdg(); // new StdMeshersGUI_QuadrangleParamWdg();
if (!isCreation()) { // if (!isCreation()) {
aTypeWidget->SetType(int(h->GetQuadType())); // aTypeWidget->SetType(int(h->GetQuadType()));
} // }
customWidgets()->append(aDirectionWidget); // customWidgets()->append(aDirectionWidget);
customWidgets()->append(aTypeWidget); // customWidgets()->append(aTypeWidget);
} // }
else else
res = false; res = false;
return res; return res;
@ -1591,13 +1593,11 @@ bool StdMeshersGUI_StdHypothesisCreator::getParamFromCustomWidget( StdParam & pa
param.myValue = w->GetValue(); param.myValue = w->GetValue();
return true; return true;
} }
if ( widget->inherits( "StdMeshersGUI_QuadrangleParamWdg" )) // if ( widget->inherits( "StdMeshersGUI_QuadrangleParamWdg" ))
{ // {
//const StdMeshersGUI_QuadrangleParamWdg * w = // param.myValue = "QuadType";
// static_cast<const StdMeshersGUI_QuadrangleParamWdg*>( widget ); // return true;
param.myValue = "QuadType"; // }
return true;
}
if ( widget->inherits( "StdMeshersGUI_FixedPointsParamWdg" )) if ( widget->inherits( "StdMeshersGUI_FixedPointsParamWdg" ))
{ {
const StdMeshersGUI_FixedPointsParamWdg * w = const StdMeshersGUI_FixedPointsParamWdg * w =