mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-04-08 18:07:27 +05:00
Improve ReplaceShape interface
This commit is contained in:
parent
00b30e0d6c
commit
c2a62ff550
@ -350,7 +350,7 @@ module SMESH
|
|||||||
/*!
|
/*!
|
||||||
* Replaces a shape in the mesh
|
* Replaces a shape in the mesh
|
||||||
*/
|
*/
|
||||||
void ReplaceShape(in GEOM::GEOM_Object theNewGeom, in GEOM::GEOM_Object theOldGeom)
|
void ReplaceShape(in GEOM::GEOM_Object theNewGeom)
|
||||||
raises (SALOME::SALOME_Exception);
|
raises (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -259,13 +259,15 @@ GEOM::GEOM_Object_ptr SMESH_Mesh_i::GetShapeToMesh()
|
|||||||
* \brief Replaces a shape in the mesh
|
* \brief Replaces a shape in the mesh
|
||||||
*/
|
*/
|
||||||
//================================================================================
|
//================================================================================
|
||||||
void SMESH_Mesh_i::ReplaceShape(GEOM::GEOM_Object_ptr theNewGeom, GEOM::GEOM_Object_ptr theOldGeom)
|
void SMESH_Mesh_i::ReplaceShape(GEOM::GEOM_Object_ptr theNewGeom)
|
||||||
throw (SALOME::SALOME_Exception)
|
throw (SALOME::SALOME_Exception)
|
||||||
{
|
{
|
||||||
|
TopoDS_Shape S = _impl->GetMeshDS()->ShapeToMesh();
|
||||||
GEOM_Client* geomClient = _gen_i->GetShapeReader();
|
GEOM_Client* geomClient = _gen_i->GetShapeReader();
|
||||||
GEOM::GEOM_Gen_var geomGen = _gen_i->GetGeomEngine(theOldGeom);
|
TCollection_AsciiString aIOR;
|
||||||
CORBA::String_var groupIOR = geomGen->GetStringFromIOR(theOldGeom);
|
if (geomClient->Find(S, aIOR)) {
|
||||||
geomClient->RemoveShapeFromBuffer(groupIOR.in());
|
geomClient->RemoveShapeFromBuffer(aIOR);
|
||||||
|
}
|
||||||
_impl->UndefShapeToMesh();
|
_impl->UndefShapeToMesh();
|
||||||
SetShape(theNewGeom);
|
SetShape(theNewGeom);
|
||||||
}
|
}
|
||||||
|
@ -74,7 +74,7 @@ public:
|
|||||||
GEOM::GEOM_Object_ptr GetShapeToMesh()
|
GEOM::GEOM_Object_ptr GetShapeToMesh()
|
||||||
throw (SALOME::SALOME_Exception);
|
throw (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
virtual void ReplaceShape(GEOM::GEOM_Object_ptr theNewGeom, GEOM::GEOM_Object_ptr theOldGeom)
|
virtual void ReplaceShape(GEOM::GEOM_Object_ptr theNewGeom)
|
||||||
throw (SALOME::SALOME_Exception);
|
throw (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
CORBA::Boolean IsLoaded()
|
CORBA::Boolean IsLoaded()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user