mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-25 17:00:34 +05:00
Replace shape in Mesh object
This commit is contained in:
parent
26999fa04d
commit
00b30e0d6c
@ -347,6 +347,12 @@ module SMESH
|
||||
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
|
||||
*/
|
||||
|
@ -86,6 +86,9 @@ class SMESH_EXPORT SMESH_Mesh
|
||||
* \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.
|
||||
*/
|
||||
|
@ -254,6 +254,22 @@ GEOM::GEOM_Object_ptr SMESH_Mesh_i::GetShapeToMesh()
|
||||
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
|
||||
|
@ -74,6 +74,9 @@ public:
|
||||
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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user