GEOM::GEOM_Object GetShapeToMesh()
raises (SALOME::SALOME_Exception);
+ /*!
+ * Replaces a shape in the mesh
+ */
+ void ReplaceShape(in GEOM::GEOM_Object theNewGeom, in GEOM::GEOM_Object theOldGeom)
+ raises (SALOME::SALOME_Exception);
+
/*!
* Return false if the mesh is not yet fully loaded from the study file
*/
* \brief Return true if there is a geometry to be meshed, not PseudoShape()
*/
bool HasShapeToMesh() const { return _isShapeToMesh; }
+
+ void UndefShapeToMesh() { _isShapeToMesh = false; }
+
/*!
* \brief Return diagonal size of bounding box of shape to mesh.
*/
return aShapeObj._retn();
}
+//================================================================================
+/*!
+* \brief Replaces a shape in the mesh
+*/
+//================================================================================
+void SMESH_Mesh_i::ReplaceShape(GEOM::GEOM_Object_ptr theNewGeom, GEOM::GEOM_Object_ptr theOldGeom)
+ throw (SALOME::SALOME_Exception)
+{
+ GEOM_Client* geomClient = _gen_i->GetShapeReader();
+ GEOM::GEOM_Gen_var geomGen = _gen_i->GetGeomEngine(theOldGeom);
+ CORBA::String_var groupIOR = geomGen->GetStringFromIOR(theOldGeom);
+ geomClient->RemoveShapeFromBuffer(groupIOR.in());
+ _impl->UndefShapeToMesh();
+ SetShape(theNewGeom);
+}
+
//================================================================================
/*!
* \brief Return false if the mesh is not yet fully loaded from the study file
GEOM::GEOM_Object_ptr GetShapeToMesh()
throw (SALOME::SALOME_Exception);
+ virtual void ReplaceShape(GEOM::GEOM_Object_ptr theNewGeom, GEOM::GEOM_Object_ptr theOldGeom)
+ throw (SALOME::SALOME_Exception);
+
CORBA::Boolean IsLoaded()
throw (SALOME::SALOME_Exception);