From: eap Date: Tue, 10 Apr 2007 14:08:35 +0000 (+0000) Subject: PAL13330( When mesh generation does not success, trace where ) X-Git-Tag: V3_2_6pre4~26 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a68d1c0471e2eed5cfbff9d8e28d5fdfc9ffce8f;p=modules%2Fsmesh.git PAL13330( When mesh generation does not success, trace where ) + GEOM::GEOM_Object_ptr GetSubShape (GEOM::GEOM_Object_ptr theMainShape, + long theID) --- diff --git a/src/SMESHGUI/SMESHGUI_GEOMGenUtils.cxx b/src/SMESHGUI/SMESHGUI_GEOMGenUtils.cxx index 520499301..2537452c6 100644 --- a/src/SMESHGUI/SMESHGUI_GEOMGenUtils.cxx +++ b/src/SMESHGUI/SMESHGUI_GEOMGenUtils.cxx @@ -92,4 +92,18 @@ namespace SMESH { } return GEOM::GEOM_Object::_nil(); } + + GEOM::GEOM_Object_ptr GetSubShape (GEOM::GEOM_Object_ptr theMainShape, + long theID) + { + GEOM::GEOM_Gen_var geomGen = SMESH::GetGEOMGen(); + _PTR(Study) aStudy = SMESH::GetActiveStudyDocument(); + if (!aStudy || geomGen->_is_nil()) + return GEOM::GEOM_Object::_nil(); + GEOM::GEOM_IShapesOperations_var aShapesOp = geomGen->GetIShapesOperations(aStudy->StudyId()); + if (aShapesOp->_is_nil()) + return GEOM::GEOM_Object::_nil(); + GEOM::GEOM_Object_var subShape = aShapesOp->GetSubShape (theMainShape,theID); + return subShape._retn(); + } } diff --git a/src/SMESHGUI/SMESHGUI_GEOMGenUtils.h b/src/SMESHGUI/SMESHGUI_GEOMGenUtils.h index 76ff62407..cb42cc48b 100644 --- a/src/SMESHGUI/SMESHGUI_GEOMGenUtils.h +++ b/src/SMESHGUI/SMESHGUI_GEOMGenUtils.h @@ -34,6 +34,9 @@ namespace SMESH GEOM::GEOM_Object_var GetShapeOnMeshOrSubMesh (_PTR(SObject) theSObject); GEOM::GEOM_Object_ptr GetGeom (_PTR(SObject) theSO); + + GEOM::GEOM_Object_ptr GetSubShape (GEOM::GEOM_Object_ptr theMainShape, + long theID); } #endif