mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-04-08 18:07:27 +05:00
Implementation of Groups support by the SHAPER-STUDY module
This commit is contained in:
parent
c2a62ff550
commit
2b3c553f4f
@ -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_wrap aGroupOp =
|
GEOM::GEOM_IGroupOperations_ptr aGroupOp =
|
||||||
_geomEngine->GetIGroupOperations();
|
_geomEngine->GetIGroupOperations();
|
||||||
ShapeType= (TopAbs_ShapeEnum)aGroupOp->GetType(aShape);
|
ShapeType= (TopAbs_ShapeEnum)aGroupOp->GetType(aShape);
|
||||||
}
|
}
|
||||||
|
@ -1064,7 +1064,7 @@ bool SMESHGUI_GroupDlg::onApply()
|
|||||||
if (geomGen->_is_nil())
|
if (geomGen->_is_nil())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
GEOM::GEOM_IGroupOperations_wrap op = geomGen->GetIGroupOperations();
|
GEOM::GEOM_IGroupOperations_ptr op = geomGen->GetIGroupOperations();
|
||||||
if (op->_is_nil())
|
if (op->_is_nil())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@ -1411,7 +1411,7 @@ void SMESHGUI_GroupDlg::onObjectSelectionChanged()
|
|||||||
// The main shape of the group
|
// The main shape of the group
|
||||||
GEOM::GEOM_Object_var aGroupMainShape;
|
GEOM::GEOM_Object_var aGroupMainShape;
|
||||||
if (aGeomGroup->GetType() == 37) {
|
if (aGeomGroup->GetType() == 37) {
|
||||||
GEOM::GEOM_IGroupOperations_wrap anOp =
|
GEOM::GEOM_IGroupOperations_ptr anOp =
|
||||||
SMESH::GetGEOMGen()->GetIGroupOperations();
|
SMESH::GetGEOMGen()->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
|
||||||
@ -2001,7 +2001,7 @@ void SMESHGUI_GroupDlg::onAdd()
|
|||||||
onListSelectionChanged();
|
onListSelectionChanged();
|
||||||
|
|
||||||
} else if (myCurrentLineEdit == myGeomGroupLine && myGeomObjects->length() == 1) {
|
} else if (myCurrentLineEdit == myGeomGroupLine && myGeomObjects->length() == 1) {
|
||||||
GEOM::GEOM_IGroupOperations_wrap aGroupOp =
|
GEOM::GEOM_IGroupOperations_ptr aGroupOp =
|
||||||
SMESH::GetGEOMGen()->GetIGroupOperations();
|
SMESH::GetGEOMGen()->GetIGroupOperations();
|
||||||
|
|
||||||
SMESH::ElementType aGroupType = SMESH::ALL;
|
SMESH::ElementType aGroupType = SMESH::ALL;
|
||||||
|
@ -224,7 +224,7 @@ static SMESH::ElementType elementType(GEOM::GEOM_Object_var geom)
|
|||||||
SMESH::GetGEOMGen()->GetIShapesOperations();
|
SMESH::GetGEOMGen()->GetIShapesOperations();
|
||||||
|
|
||||||
if ( geom->GetType() == 37 ) { // geom group
|
if ( geom->GetType() == 37 ) { // geom group
|
||||||
GEOM::GEOM_IGroupOperations_wrap aGroupOp =
|
GEOM::GEOM_IGroupOperations_ptr aGroupOp =
|
||||||
SMESH::GetGEOMGen()->GetIGroupOperations();
|
SMESH::GetGEOMGen()->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
|
||||||
|
@ -338,10 +338,10 @@ bool SMESHGUI_MeshOp::isSubshapeOk() const
|
|||||||
myDlg->selectedObject(SMESHGUI_MeshDlg::Geom, aGEOMs);
|
myDlg->selectedObject(SMESHGUI_MeshDlg::Geom, aGEOMs);
|
||||||
|
|
||||||
if (aGEOMs.count() > 0) {
|
if (aGEOMs.count() > 0) {
|
||||||
GEOM::GEOM_Gen_var geomGen = SMESH::GetGEOMGen();
|
GEOM::GEOM_Gen_var geomGen = mainGeom->GetGen();
|
||||||
if (geomGen->_is_nil()) return false;
|
if (geomGen->_is_nil()) return false;
|
||||||
|
|
||||||
GEOM::GEOM_IGroupOperations_wrap op = geomGen->GetIGroupOperations();
|
GEOM::GEOM_IGroupOperations_ptr op = geomGen->GetIGroupOperations();
|
||||||
if (op->_is_nil()) return false;
|
if (op->_is_nil()) return false;
|
||||||
|
|
||||||
// check all selected shapes
|
// check all selected shapes
|
||||||
@ -1856,7 +1856,7 @@ bool SMESHGUI_MeshOp::createSubMesh( QString& theMess, QStringList& theEntryList
|
|||||||
// create a GEOM group
|
// create a GEOM group
|
||||||
GEOM::GEOM_Gen_var geomGen = SMESH::GetGEOMGen();
|
GEOM::GEOM_Gen_var geomGen = SMESH::GetGEOMGen();
|
||||||
if (!geomGen->_is_nil()) {
|
if (!geomGen->_is_nil()) {
|
||||||
GEOM::GEOM_IGroupOperations_wrap op =
|
GEOM::GEOM_IGroupOperations_ptr op =
|
||||||
geomGen->GetIGroupOperations();
|
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
|
||||||
|
@ -362,7 +362,7 @@ void SMESHGUI_ShapeByMeshOp::commitOperation()
|
|||||||
}
|
}
|
||||||
else if (aNumberOfGO > 1)
|
else if (aNumberOfGO > 1)
|
||||||
{
|
{
|
||||||
GEOM::GEOM_IGroupOperations_wrap aGroupOp =
|
GEOM::GEOM_IGroupOperations_ptr aGroupOp =
|
||||||
geomGen->GetIGroupOperations();
|
geomGen->GetIGroupOperations();
|
||||||
if(aGroupOp->_is_nil())
|
if(aGroupOp->_is_nil())
|
||||||
return;
|
return;
|
||||||
|
@ -3190,7 +3190,7 @@ namespace // utils for CopyMeshWithGeom()
|
|||||||
{
|
{
|
||||||
int groupType = getShapeType( myNewMesh_i, newIndices[0] );
|
int groupType = getShapeType( myNewMesh_i, newIndices[0] );
|
||||||
|
|
||||||
GEOM::GEOM_IGroupOperations_wrap grOp = geomGen->GetIGroupOperations();
|
GEOM::GEOM_IGroupOperations_ptr 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();
|
||||||
|
@ -1999,7 +1999,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_wrap groupOp =
|
GEOM::GEOM_IGroupOperations_ptr groupOp =
|
||||||
geomGen->GetIGroupOperations();
|
geomGen->GetIGroupOperations();
|
||||||
GEOM::ListOfLong_var ids = groupOp->GetObjects( theGeomObj );
|
GEOM::ListOfLong_var ids = groupOp->GetObjects( theGeomObj );
|
||||||
|
|
||||||
@ -2058,7 +2058,7 @@ TopoDS_Shape SMESH_Mesh_i::newGroupShape( TGeomGroupData & groupData)
|
|||||||
// 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_wrap groupOp =
|
GEOM::GEOM_IGroupOperations_ptr groupOp =
|
||||||
geomGen->GetIGroupOperations();
|
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 )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user