mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-13 02:00:34 +05:00
0020145: EDF 666 SMESH: Modifications of GEOM groups are not taken into account
enable Load() in case if meshed geom group has changed
This commit is contained in:
parent
a16572377f
commit
8a18d05e3b
@ -1395,6 +1395,8 @@ CORBA::Boolean SMESH_Gen_i::Compute( SMESH::SMESH_Mesh_ptr theMesh,
|
|||||||
SMESH_Mesh_i* meshServant = dynamic_cast<SMESH_Mesh_i*>( GetServant( theMesh ).in() );
|
SMESH_Mesh_i* meshServant = dynamic_cast<SMESH_Mesh_i*>( GetServant( theMesh ).in() );
|
||||||
ASSERT( meshServant );
|
ASSERT( meshServant );
|
||||||
if ( meshServant ) {
|
if ( meshServant ) {
|
||||||
|
// NPAL16168: "geometrical group edition from a submesh don't modifiy mesh computation"
|
||||||
|
meshServant->CheckGeomGroupModif();
|
||||||
// get local TopoDS_Shape
|
// get local TopoDS_Shape
|
||||||
TopoDS_Shape myLocShape;
|
TopoDS_Shape myLocShape;
|
||||||
if(theMesh->HasShapeToMesh())
|
if(theMesh->HasShapeToMesh())
|
||||||
@ -3750,8 +3752,13 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent,
|
|||||||
{
|
{
|
||||||
int smID = smIDs[ i ];
|
int smID = smIDs[ i ];
|
||||||
if ( smID == 0 ) continue;
|
if ( smID == 0 ) continue;
|
||||||
ASSERT( smID <= maxID );
|
|
||||||
const SMDS_MeshElement* elem = *iE;
|
const SMDS_MeshElement* elem = *iE;
|
||||||
|
if( smID >= maxID ) {
|
||||||
|
// corresponding subshape no longer exists: maybe geom group has been edited
|
||||||
|
if ( myNewMeshImpl->HasShapeToMesh() )
|
||||||
|
mySMESHDSMesh->RemoveElement( elem );
|
||||||
|
continue;
|
||||||
|
}
|
||||||
// get or create submesh
|
// get or create submesh
|
||||||
SMESHDS_SubMesh* & sm = subMeshes[ smID ];
|
SMESHDS_SubMesh* & sm = subMeshes[ smID ];
|
||||||
if ( ! sm ) {
|
if ( ! sm ) {
|
||||||
@ -3856,28 +3863,28 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent,
|
|||||||
for ( int iNode = 0; iNode < nbNodes; iNode++ )
|
for ( int iNode = 0; iNode < nbNodes; iNode++ )
|
||||||
{
|
{
|
||||||
const SMDS_MeshNode* node = mySMESHDSMesh->FindNode( aNodeIDs[ iNode ]);
|
const SMDS_MeshNode* node = mySMESHDSMesh->FindNode( aNodeIDs[ iNode ]);
|
||||||
ASSERT( node );
|
if ( !node ) continue; // maybe removed while Loading() if geometry changed
|
||||||
SMDS_PositionPtr aPos = node->GetPosition();
|
SMDS_PositionPtr aPos = node->GetPosition();
|
||||||
ASSERT( aPos )
|
ASSERT( aPos );
|
||||||
if ( onFace ) {
|
if ( onFace ) {
|
||||||
// ASSERT( aPos->GetTypeOfPosition() == SMDS_TOP_FACE );-- issue 20182
|
// ASSERT( aPos->GetTypeOfPosition() == SMDS_TOP_FACE );-- issue 20182
|
||||||
// -- Most probably a bad study was saved when there were
|
// -- Most probably a bad study was saved when there were
|
||||||
// not fixed bugs in SMDS_MeshInfo
|
// not fixed bugs in SMDS_MeshInfo
|
||||||
if ( aPos->GetTypeOfPosition() == SMDS_TOP_FACE ) {
|
if ( aPos->GetTypeOfPosition() == SMDS_TOP_FACE ) {
|
||||||
SMDS_FacePosition* fPos = const_cast<SMDS_FacePosition*>
|
SMDS_FacePosition* fPos = const_cast<SMDS_FacePosition*>
|
||||||
( static_cast<const SMDS_FacePosition*>( aPos.get() ));
|
( static_cast<const SMDS_FacePosition*>( aPos.get() ));
|
||||||
fPos->SetUParameter( aUPos[ iNode ]);
|
fPos->SetUParameter( aUPos[ iNode ]);
|
||||||
fPos->SetVParameter( aVPos[ iNode ]);
|
fPos->SetVParameter( aVPos[ iNode ]);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else {
|
}
|
||||||
// ASSERT( aPos->GetTypeOfPosition() == SMDS_TOP_EDGE );-- issue 20182
|
else {
|
||||||
if ( aPos->GetTypeOfPosition() == SMDS_TOP_EDGE ) {
|
// ASSERT( aPos->GetTypeOfPosition() == SMDS_TOP_EDGE );-- issue 20182
|
||||||
SMDS_EdgePosition* fPos = const_cast<SMDS_EdgePosition*>
|
if ( aPos->GetTypeOfPosition() == SMDS_TOP_EDGE ) {
|
||||||
( static_cast<const SMDS_EdgePosition*>( aPos.get() ));
|
SMDS_EdgePosition* fPos = const_cast<SMDS_EdgePosition*>
|
||||||
fPos->SetUParameter( aUPos[ iNode ]);
|
( static_cast<const SMDS_EdgePosition*>( aPos.get() ));
|
||||||
}
|
fPos->SetUParameter( aUPos[ iNode ]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( aEids ) delete [] aEids;
|
if ( aEids ) delete [] aEids;
|
||||||
|
Loading…
Reference in New Issue
Block a user