-// 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
{
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_ptr 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 );
}
}
}
- 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] );