Method ::createMesh() is corrected for bug PAL12652.

(Creation of meshes for few GeomEntry is implemented).
This commit is contained in:
skl 2006-06-21 08:32:29 +00:00
parent 06890db430
commit 337b491aaf

View File

@ -1172,7 +1172,15 @@ bool SMESHGUI_MeshOp::createMesh( QString& theMess )
{ {
theMess = ""; theMess = "";
QString aGeomEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Geom ); //QString aGeomEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Geom );
//QString aGeomEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Geom );
QStringList aList;
myDlg->selectedObject( SMESHGUI_MeshDlg::Geom, aList );
QStringList::Iterator it = aList.begin();
for(; it!=aList.end(); it++) {
QString aGeomEntry = *it;
_PTR(SObject) pGeom = studyDS()->FindObjectID( aGeomEntry.latin1() ); _PTR(SObject) pGeom = studyDS()->FindObjectID( aGeomEntry.latin1() );
GEOM::GEOM_Object_var aGeomVar = GEOM::GEOM_Object_var aGeomVar =
GEOM::GEOM_Object::_narrow( _CAST( SObject,pGeom )->GetObject() ); GEOM::GEOM_Object::_narrow( _CAST( SObject,pGeom )->GetObject() );
@ -1191,16 +1199,13 @@ bool SMESHGUI_MeshOp::createMesh( QString& theMess )
if ( aMeshSO ) if ( aMeshSO )
SMESH::SetName( aMeshSO, myDlg->objectText( SMESHGUI_MeshDlg::Obj ).latin1() ); SMESH::SetName( aMeshSO, myDlg->objectText( SMESHGUI_MeshDlg::Obj ).latin1() );
for ( int aDim = SMESH::DIM_1D; aDim <= SMESH::DIM_3D; aDim++ ) for ( int aDim = SMESH::DIM_1D; aDim <= SMESH::DIM_3D; aDim++ ) {
{
if ( !isAccessibleDim( aDim )) continue; if ( !isAccessibleDim( aDim )) continue;
// assign hypotheses // assign hypotheses
for ( int aHypType = MainHyp; aHypType <= AddHyp; aHypType++ ) for ( int aHypType = MainHyp; aHypType <= AddHyp; aHypType++ ) {
{
int aHypIndex = currentHyp( aDim, aHypType ); int aHypIndex = currentHyp( aDim, aHypType );
if ( aHypIndex >= 0 && aHypIndex < myExistingHyps[ aDim ][ aHypType ].count() ) if ( aHypIndex >= 0 && aHypIndex < myExistingHyps[ aDim ][ aHypType ].count() ) {
{
SMESH::SMESH_Hypothesis_var aHypVar = myExistingHyps[ aDim ][ aHypType ][ aHypIndex ]; SMESH::SMESH_Hypothesis_var aHypVar = myExistingHyps[ aDim ][ aHypType ][ aHypIndex ];
if ( !aHypVar->_is_nil() ) if ( !aHypVar->_is_nil() )
SMESH::AddHypothesisOnMesh( aMeshVar, aHypVar ); SMESH::AddHypothesisOnMesh( aMeshVar, aHypVar );
@ -1211,6 +1216,8 @@ bool SMESHGUI_MeshOp::createMesh( QString& theMess )
if ( !anAlgoVar->_is_nil() ) if ( !anAlgoVar->_is_nil() )
SMESH::AddHypothesisOnMesh( aMeshVar, anAlgoVar ); SMESH::AddHypothesisOnMesh( aMeshVar, anAlgoVar );
} }
}
return true; return true;
} }