PAL13330( When mesh generation does not success, trace where )

+  GEOM::GEOM_Object_ptr GetSubShape (GEOM::GEOM_Object_ptr theMainShape,
+                                     long                  theID)
This commit is contained in:
eap 2007-04-10 14:08:35 +00:00
parent b803a6ab4f
commit a68d1c0471
2 changed files with 17 additions and 0 deletions

View File

@ -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();
}
}

View File

@ -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