mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-24 11:40:32 +05:00
Restore usage of GenericObject wraper ( _wrap )
This commit is contained in:
parent
dfcc0eb72b
commit
afef8ccaa7
@ -213,7 +213,7 @@ TopAbs_ShapeEnum GeomSelectionTools::entryToShapeType(std::string entry){
|
|||||||
// if the Geom Object is a group
|
// if the Geom Object is a group
|
||||||
if (aShape->GetType() == GEOM_GROUP){
|
if (aShape->GetType() == GEOM_GROUP){
|
||||||
// MESSAGE("It's a group");
|
// MESSAGE("It's a group");
|
||||||
GEOM::GEOM_IGroupOperations_ptr aGroupOp =
|
GEOM::GEOM_IGroupOperations_wrap aGroupOp =
|
||||||
_geomEngine->GetIGroupOperations();
|
_geomEngine->GetIGroupOperations();
|
||||||
ShapeType= (TopAbs_ShapeEnum)aGroupOp->GetType(aShape);
|
ShapeType= (TopAbs_ShapeEnum)aGroupOp->GetType(aShape);
|
||||||
}
|
}
|
||||||
|
@ -1063,7 +1063,7 @@ bool SMESHGUI_GroupDlg::onApply()
|
|||||||
if (geomGen->_is_nil())
|
if (geomGen->_is_nil())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
GEOM::GEOM_IGroupOperations_ptr op = geomGen->GetIGroupOperations();
|
GEOM::GEOM_IGroupOperations_wrap op = geomGen->GetIGroupOperations();
|
||||||
if (op->_is_nil())
|
if (op->_is_nil())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@ -1414,7 +1414,7 @@ void SMESHGUI_GroupDlg::onObjectSelectionChanged()
|
|||||||
GEOM::GEOM_Object_var aGroupMainShape;
|
GEOM::GEOM_Object_var aGroupMainShape;
|
||||||
if (aGeomGroup->GetType() == 37)
|
if (aGeomGroup->GetType() == 37)
|
||||||
{
|
{
|
||||||
GEOM::GEOM_IGroupOperations_ptr anOp =
|
GEOM::GEOM_IGroupOperations_wrap anOp =
|
||||||
SMESH::GetGEOMGen( aGeomGroup )->GetIGroupOperations();
|
SMESH::GetGEOMGen( aGeomGroup )->GetIGroupOperations();
|
||||||
aGroupMainShape = anOp->GetMainShape( aGeomGroup );
|
aGroupMainShape = anOp->GetMainShape( aGeomGroup );
|
||||||
// aGroupMainShape is an existing servant => GEOM_Object_var not GEOM_Object_wrap
|
// aGroupMainShape is an existing servant => GEOM_Object_var not GEOM_Object_wrap
|
||||||
@ -2012,7 +2012,7 @@ void SMESHGUI_GroupDlg::onAdd()
|
|||||||
}
|
}
|
||||||
else if ( myCurrentLineEdit == myGeomGroupLine && myGeomObjects->length() == 1 )
|
else if ( myCurrentLineEdit == myGeomGroupLine && myGeomObjects->length() == 1 )
|
||||||
{
|
{
|
||||||
GEOM::GEOM_IGroupOperations_ptr aGroupOp =
|
GEOM::GEOM_IGroupOperations_wrap aGroupOp =
|
||||||
SMESH::GetGEOMGen( myGeomObjects[0] )->GetIGroupOperations();
|
SMESH::GetGEOMGen( myGeomObjects[0] )->GetIGroupOperations();
|
||||||
|
|
||||||
SMESH::ElementType aGroupType = SMESH::ALL;
|
SMESH::ElementType aGroupType = SMESH::ALL;
|
||||||
|
@ -225,7 +225,7 @@ SMESH::ElementType SMESHGUI_GroupOnShapeOp::ElementType(GEOM::GEOM_Object_var ge
|
|||||||
|
|
||||||
if ( geom->GetType() == 37 ) // geom group
|
if ( geom->GetType() == 37 ) // geom group
|
||||||
{
|
{
|
||||||
GEOM::GEOM_IGroupOperations_ptr aGroupOp = geomGen->GetIGroupOperations();
|
GEOM::GEOM_IGroupOperations_wrap aGroupOp = geomGen->GetIGroupOperations();
|
||||||
if ( !aGroupOp->_is_nil() ) {
|
if ( !aGroupOp->_is_nil() ) {
|
||||||
// mainShape is an existing servant => GEOM_Object_var not GEOM_Object_wrap
|
// mainShape is an existing servant => GEOM_Object_var not GEOM_Object_wrap
|
||||||
GEOM::GEOM_Object_var mainShape = aGroupOp->GetMainShape( geom );
|
GEOM::GEOM_Object_var mainShape = aGroupOp->GetMainShape( geom );
|
||||||
|
@ -349,7 +349,7 @@ bool SMESHGUI_MeshOp::isSubshapeOk() const
|
|||||||
GEOM::GEOM_Gen_var geomGen = mainGeom->GetGen();
|
GEOM::GEOM_Gen_var geomGen = mainGeom->GetGen();
|
||||||
if (geomGen->_is_nil()) return false;
|
if (geomGen->_is_nil()) return false;
|
||||||
|
|
||||||
GEOM::GEOM_IGroupOperations_ptr op = geomGen->GetIGroupOperations();
|
GEOM::GEOM_IGroupOperations_wrap op = geomGen->GetIGroupOperations();
|
||||||
if (op->_is_nil()) return false;
|
if (op->_is_nil()) return false;
|
||||||
|
|
||||||
// check all selected shapes
|
// check all selected shapes
|
||||||
@ -2140,7 +2140,7 @@ bool SMESHGUI_MeshOp::createSubMesh( QString& theMess, QStringList& theEntryList
|
|||||||
// create a GEOM group
|
// create a GEOM group
|
||||||
GEOM::GEOM_Gen_var geomGen = mainGeom->GetGen();
|
GEOM::GEOM_Gen_var geomGen = mainGeom->GetGen();
|
||||||
if ( !geomGen->_is_nil() ) {
|
if ( !geomGen->_is_nil() ) {
|
||||||
GEOM::GEOM_IGroupOperations_ptr op = geomGen->GetIGroupOperations();
|
GEOM::GEOM_IGroupOperations_wrap op = geomGen->GetIGroupOperations();
|
||||||
if ( !op->_is_nil() )
|
if ( !op->_is_nil() )
|
||||||
{
|
{
|
||||||
// check and add all selected GEOM objects: they must be
|
// check and add all selected GEOM objects: they must be
|
||||||
|
@ -360,7 +360,7 @@ void SMESHGUI_ShapeByMeshOp::commitOperation()
|
|||||||
}
|
}
|
||||||
else if (aNumberOfGO > 1)
|
else if (aNumberOfGO > 1)
|
||||||
{
|
{
|
||||||
GEOM::GEOM_IGroupOperations_ptr aGroupOp = geomGen->GetIGroupOperations();
|
GEOM::GEOM_IGroupOperations_wrap aGroupOp = geomGen->GetIGroupOperations();
|
||||||
if ( aGroupOp->_is_nil() )
|
if ( aGroupOp->_is_nil() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -3296,7 +3296,7 @@ namespace // utils for CopyMeshWithGeom()
|
|||||||
{
|
{
|
||||||
int groupType = getShapeType( myNewMesh_i, newIndices[0] );
|
int groupType = getShapeType( myNewMesh_i, newIndices[0] );
|
||||||
|
|
||||||
GEOM::GEOM_IGroupOperations_ptr grOp = geomGen->GetIGroupOperations();
|
GEOM::GEOM_IGroupOperations_wrap grOp = geomGen->GetIGroupOperations();
|
||||||
newShape = grOp->CreateGroup( mainShapeNew, groupType );
|
newShape = grOp->CreateGroup( mainShapeNew, groupType );
|
||||||
|
|
||||||
GEOM::ListOfLong_var newIndicesList = new GEOM::ListOfLong();
|
GEOM::ListOfLong_var newIndicesList = new GEOM::ListOfLong();
|
||||||
|
@ -2029,7 +2029,7 @@ void SMESH_Mesh_i::addGeomGroupData(GEOM::GEOM_Object_ptr theGeomObj,
|
|||||||
return;
|
return;
|
||||||
// group indices
|
// group indices
|
||||||
GEOM::GEOM_Gen_var geomGen = _gen_i->GetGeomEngine( theGeomObj );
|
GEOM::GEOM_Gen_var geomGen = _gen_i->GetGeomEngine( theGeomObj );
|
||||||
GEOM::GEOM_IGroupOperations_ptr groupOp = geomGen->GetIGroupOperations();
|
GEOM::GEOM_IGroupOperations_wrap groupOp = geomGen->GetIGroupOperations();
|
||||||
GEOM::ListOfLong_var ids = groupOp->GetObjects( theGeomObj );
|
GEOM::ListOfLong_var ids = groupOp->GetObjects( theGeomObj );
|
||||||
|
|
||||||
// store data
|
// store data
|
||||||
@ -2105,7 +2105,7 @@ TopoDS_Shape SMESH_Mesh_i::newGroupShape( TGeomGroupData & groupData, int how )
|
|||||||
// get indices of group items
|
// get indices of group items
|
||||||
set<int> curIndices;
|
set<int> curIndices;
|
||||||
GEOM::GEOM_Gen_var geomGen = _gen_i->GetGeomEngine( geomGroup );
|
GEOM::GEOM_Gen_var geomGen = _gen_i->GetGeomEngine( geomGroup );
|
||||||
GEOM::GEOM_IGroupOperations_ptr groupOp = geomGen->GetIGroupOperations();
|
GEOM::GEOM_IGroupOperations_wrap groupOp = geomGen->GetIGroupOperations();
|
||||||
GEOM::ListOfLong_var ids = groupOp->GetObjects( geomGroup );
|
GEOM::ListOfLong_var ids = groupOp->GetObjects( geomGroup );
|
||||||
for ( CORBA::ULong i = 0; i < ids->length(); ++i )
|
for ( CORBA::ULong i = 0; i < ids->length(); ++i )
|
||||||
curIndices.insert( ids[i] );
|
curIndices.insert( ids[i] );
|
||||||
|
Loading…
Reference in New Issue
Block a user