mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-12 17:50:34 +05:00
Method ::createMesh() is corrected for bug PAL12652.
(Creation of meshes for few GeomEntry is implemented).
This commit is contained in:
parent
06890db430
commit
337b491aaf
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user