-// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2019 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//================================================================================
/*!
- * \brief slot to enable/diable [Apply]
+ * \brief slot to enable/disable [Apply]
*/
//================================================================================
: SMESHGUI_SelectionOp(ActorSelection),
myDlg( 0 )
{
- myHelpFileName = "create_groups_from_geometry_page.html";
+ myHelpFileName = "create_groups_from_geometry.html";
}
SMESHGUI_GroupOnShapeOp::~SMESHGUI_GroupOnShapeOp()
*/
//================================================================================
-static SMESH::ElementType elementType(GEOM::GEOM_Object_var geom)
+SMESH::ElementType SMESHGUI_GroupOnShapeOp::ElementType(GEOM::GEOM_Object_var geom)
{
if ( !geom->_is_nil() ) {
switch ( geom->GetShapeType() ) {
- case GEOM::VERTEX: return SMESH::NODE;
+ case GEOM::VERTEX: return SMESH::ELEM0D; // NODE; -- 0023613
case GEOM::EDGE: return SMESH::EDGE;
case GEOM::WIRE: return SMESH::EDGE;
case GEOM::FACE: return SMESH::FACE;
case GEOM::COMPOUND: break;
default: return SMESH::ALL;
}
- GEOM::GEOM_IShapesOperations_wrap aShapeOp =
- SMESH::GetGEOMGen()->GetIShapesOperations();
+ GEOM::GEOM_Gen_var geomGen = SMESH::GetGEOMGen( geom );
+ GEOM::GEOM_IShapesOperations_wrap aShapeOp = geomGen->GetIShapesOperations();
- if ( geom->GetType() == 37 ) { // geom group
- GEOM::GEOM_IGroupOperations_wrap aGroupOp =
- SMESH::GetGEOMGen()->GetIGroupOperations();
+ if ( geom->GetType() == 37 ) // geom group
+ {
+ GEOM::GEOM_IGroupOperations_wrap aGroupOp = geomGen->GetIGroupOperations();
if ( !aGroupOp->_is_nil() ) {
// mainShape is an existing servant => GEOM_Object_var not GEOM_Object_wrap
GEOM::GEOM_Object_var mainShape = aGroupOp->GetMainShape( geom );
GEOM::ListOfLong_var ids = aGroupOp->GetObjects( geom );
if ( ids->length() && !mainShape->_is_nil() && !aShapeOp->_is_nil() ) {
GEOM::GEOM_Object_wrap member = aShapeOp->GetSubShape( mainShape, ids[0] );
- return elementType( member );
+ return ElementType( member );
}
}
}
- else if ( !aShapeOp->_is_nil() ) { // just a compoud shape
+ else if ( !aShapeOp->_is_nil() ) // just a compoud shape
+ {
GEOM::ListOfLong_var ids = aShapeOp->SubShapeAllIDs( geom, GEOM::SHAPE, false );
if ( ids->length() ) {
GEOM::GEOM_Object_wrap member = aShapeOp->GetSubShape( geom, ids[0] );
- return elementType( member );
+ return ElementType( member );
}
}
}
if ( geom->_is_nil() ) continue;
// group type
- SMESH::ElementType elemType = isNode ? SMESH::NODE : elementType( geom );
+ SMESH::ElementType elemType = isNode ? SMESH::NODE : ElementType( geom );
if ( elemType == SMESH::ALL )
continue;
myNodeGeoIDs = goodIds;
}
- // enable/diable Apply, which can change at selection
+ // enable/disable Apply, which can change at selection
myDlg->updateButtons();
}