mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-03-01 03:55:36 +05:00
19997: Compute does not work in script, ok in GUI
fix MakeComputed() for group projection
This commit is contained in:
parent
94e286c822
commit
f705b9c354
@ -3804,12 +3804,10 @@ static bool clearSubMesh( SMESH_Mesh* theMesh,
|
|||||||
bool removed = false;
|
bool removed = false;
|
||||||
if ( SMESH_subMesh * aSubMesh = theMesh->GetSubMeshContaining( theShape ))
|
if ( SMESH_subMesh * aSubMesh = theMesh->GetSubMeshContaining( theShape ))
|
||||||
{
|
{
|
||||||
if ( aSubMesh->GetSubMeshDS() ) {
|
removed = !aSubMesh->IsEmpty();
|
||||||
removed =
|
if ( removed )
|
||||||
aSubMesh->GetSubMeshDS()->NbElements() || aSubMesh->GetSubMeshDS()->NbNodes();
|
|
||||||
aSubMesh->ComputeStateEngine( SMESH_subMesh::CLEAN );
|
aSubMesh->ComputeStateEngine( SMESH_subMesh::CLEAN );
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else {
|
else {
|
||||||
SMESHDS_Mesh* aMeshDS = theMesh->GetMeshDS();
|
SMESHDS_Mesh* aMeshDS = theMesh->GetMeshDS();
|
||||||
if ( SMESHDS_SubMesh* aSubMeshDS = aMeshDS->MeshElements( theShape ))
|
if ( SMESHDS_SubMesh* aSubMeshDS = aMeshDS->MeshElements( theShape ))
|
||||||
|
@ -1635,7 +1635,17 @@ bool StdMeshers_ProjectionUtils::MakeComputed(SMESH_subMesh * sm, const int iter
|
|||||||
SMESH_Gen* gen = mesh->GetGen();
|
SMESH_Gen* gen = mesh->GetGen();
|
||||||
SMESH_Algo* algo = gen->GetAlgo( *mesh, sm->GetSubShape() );
|
SMESH_Algo* algo = gen->GetAlgo( *mesh, sm->GetSubShape() );
|
||||||
if ( !algo )
|
if ( !algo )
|
||||||
|
{
|
||||||
|
if ( sm->GetSubShape().ShapeType() != TopAbs_COMPOUND )
|
||||||
RETURN_BAD_RESULT("No algo assigned to submesh " << sm->GetId());
|
RETURN_BAD_RESULT("No algo assigned to submesh " << sm->GetId());
|
||||||
|
// group
|
||||||
|
bool computed = true;
|
||||||
|
for ( TopoDS_Iterator grMember( sm->GetSubShape() ); grMember.More(); grMember.Next())
|
||||||
|
if ( SMESH_subMesh* grSub = mesh->GetSubMesh( grMember.Value() ))
|
||||||
|
if ( !MakeComputed( grSub, iterationNb + 1 ))
|
||||||
|
computed = false;
|
||||||
|
return computed;
|
||||||
|
}
|
||||||
|
|
||||||
string algoType = algo->GetName();
|
string algoType = algo->GetName();
|
||||||
if ( algoType.substr(0, 11) != "Projection_")
|
if ( algoType.substr(0, 11) != "Projection_")
|
||||||
@ -1679,7 +1689,10 @@ bool StdMeshers_ProjectionUtils::MakeComputed(SMESH_subMesh * sm, const int iter
|
|||||||
if ( !srcMesh )
|
if ( !srcMesh )
|
||||||
srcMesh = mesh;
|
srcMesh = mesh;
|
||||||
|
|
||||||
return MakeComputed( srcMesh->GetSubMesh( srcShape ), iterationNb + 1 );
|
if ( MakeComputed( srcMesh->GetSubMesh( srcShape ), iterationNb + 1 ))
|
||||||
|
return gen->Compute( *mesh, sm->GetSubShape() );
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//================================================================================
|
//================================================================================
|
||||||
|
Loading…
Reference in New Issue
Block a user