mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-12 01:30:34 +05:00
#19919 [CEA] Group of Edges reported as empty
Clear shapes-cash in GEOMClient also for sub-meshes objects.
This commit is contained in:
parent
951dd4234e
commit
338d12a959
@ -2058,12 +2058,12 @@ void SMESH_Mesh_i::ReplaceShape(GEOM::GEOM_Object_ptr theNewGeom)
|
|||||||
TopoDS_Shape S = _impl->GetShapeToMesh();
|
TopoDS_Shape S = _impl->GetShapeToMesh();
|
||||||
GEOM_Client* geomClient = _gen_i->GetShapeReader();
|
GEOM_Client* geomClient = _gen_i->GetShapeReader();
|
||||||
TCollection_AsciiString aIOR;
|
TCollection_AsciiString aIOR;
|
||||||
CORBA::String_var ior;
|
|
||||||
if ( geomClient->Find( S, aIOR ))
|
if ( geomClient->Find( S, aIOR ))
|
||||||
geomClient->RemoveShapeFromBuffer( aIOR );
|
geomClient->RemoveShapeFromBuffer( aIOR );
|
||||||
|
|
||||||
// clear buffer also for sub-groups
|
// clear buffer also for sub-groups
|
||||||
const std::set<SMESHDS_GroupBase*>& groups = _impl->GetMeshDS()->GetGroups();
|
SMESHDS_Mesh* meshDS = _impl->GetMeshDS();
|
||||||
|
const std::set<SMESHDS_GroupBase*>& groups = meshDS->GetGroups();
|
||||||
std::set<SMESHDS_GroupBase*>::const_iterator g = groups.begin();
|
std::set<SMESHDS_GroupBase*>::const_iterator g = groups.begin();
|
||||||
for (; g != groups.end(); ++g)
|
for (; g != groups.end(); ++g)
|
||||||
if (const SMESHDS_GroupOnGeom* group = dynamic_cast<SMESHDS_GroupOnGeom*>(*g))
|
if (const SMESHDS_GroupOnGeom* group = dynamic_cast<SMESHDS_GroupOnGeom*>(*g))
|
||||||
@ -2073,12 +2073,21 @@ void SMESH_Mesh_i::ReplaceShape(GEOM::GEOM_Object_ptr theNewGeom)
|
|||||||
geomClient->RemoveShapeFromBuffer( aIOR );
|
geomClient->RemoveShapeFromBuffer( aIOR );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// clear buffer also for sub-meshes
|
||||||
|
std::map<int, SMESH_subMesh_i*>::const_iterator aSubMeshIter = _mapSubMesh_i.cbegin();
|
||||||
|
for(; aSubMeshIter != _mapSubMesh_i.cend(); aSubMeshIter++) {
|
||||||
|
int aShapeID = aSubMeshIter->first;
|
||||||
|
const TopoDS_Shape& aSubShape = meshDS->IndexToShape(aShapeID);
|
||||||
|
TCollection_AsciiString aShapeIOR;
|
||||||
|
if ( geomClient->Find( aSubShape, aShapeIOR ))
|
||||||
|
geomClient->RemoveShapeFromBuffer( aShapeIOR );
|
||||||
|
}
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int shapeID, fromID, toID; // indices of elements of a sub-mesh
|
int shapeID, fromID, toID; // indices of elements of a sub-mesh
|
||||||
} TRange;
|
} TRange;
|
||||||
std::vector< TRange > elemRanges, nodeRanges; // elements of sub-meshes
|
std::vector< TRange > elemRanges, nodeRanges; // elements of sub-meshes
|
||||||
std::vector< SMDS_PositionPtr > positions; // node positions
|
std::vector< SMDS_PositionPtr > positions; // node positions
|
||||||
SMESHDS_Mesh* meshDS = _impl->GetMeshDS();
|
|
||||||
if ( !geomChanged )
|
if ( !geomChanged )
|
||||||
{
|
{
|
||||||
// store positions of elements on geometry
|
// store positions of elements on geometry
|
||||||
|
Loading…
Reference in New Issue
Block a user