return aShapeObj._retn();
}
+//================================================================================
+/*!
+* \brief Replaces a shape in the mesh
+*/
+//================================================================================
+void SMESH_Mesh_i::ReplaceShape(GEOM::GEOM_Object_ptr theNewGeom)
+ throw (SALOME::SALOME_Exception)
+{
+ TopoDS_Shape S = _impl->GetMeshDS()->ShapeToMesh();
+ GEOM_Client* geomClient = _gen_i->GetShapeReader();
+ TCollection_AsciiString aIOR;
+ if (geomClient->Find(S, aIOR)) {
+ geomClient->RemoveShapeFromBuffer(aIOR);
+ }
+ _impl->UndefShapeToMesh();
+ SetShape(theNewGeom);
+}
+
//================================================================================
/*!
* \brief Return false if the mesh is not yet fully loaded from the study file
return;
// group indices
GEOM::GEOM_Gen_var geomGen = _gen_i->GetGeomEngine( theGeomObj );
- GEOM::GEOM_IGroupOperations_wrap groupOp =
+ GEOM::GEOM_IGroupOperations_ptr groupOp =
geomGen->GetIGroupOperations();
GEOM::ListOfLong_var ids = groupOp->GetObjects( theGeomObj );
// get indices of group items
set<int> curIndices;
GEOM::GEOM_Gen_var geomGen = _gen_i->GetGeomEngine( geomGroup );
- GEOM::GEOM_IGroupOperations_wrap groupOp =
+ GEOM::GEOM_IGroupOperations_ptr groupOp =
geomGen->GetIGroupOperations();
GEOM::ListOfLong_var ids = groupOp->GetObjects( geomGroup );
for ( CORBA::ULong i = 0; i < ids->length(); ++i )