mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-03-01 10:05:37 +05:00
fix check that submeshes are computed if !algo->OnlyUnaryInput()
This commit is contained in:
parent
048254931e
commit
70f7bf5c7d
@ -1312,9 +1312,14 @@ bool SMESH_subMesh::ComputeStateEngine(int event)
|
|||||||
SetAlgoState(MISSING_HYP);
|
SetAlgoState(MISSING_HYP);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
TopoDS_Shape shape = _subShape;
|
||||||
// check submeshes needed
|
// check submeshes needed
|
||||||
if (_father->HasShapeToMesh() ) {
|
if (_father->HasShapeToMesh() ) {
|
||||||
bool subComputed = SubMeshesComputed();
|
bool subComputed = false;
|
||||||
|
if (!algo->OnlyUnaryInput())
|
||||||
|
shape = GetCollection( gen, algo, subComputed );
|
||||||
|
else
|
||||||
|
subComputed = SubMeshesComputed();
|
||||||
ret = ( algo->NeedDescretBoundary() ? subComputed :
|
ret = ( algo->NeedDescretBoundary() ? subComputed :
|
||||||
( !subComputed || _father->IsNotConformAllowed() ));
|
( !subComputed || _father->IsNotConformAllowed() ));
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
@ -1332,7 +1337,6 @@ bool SMESH_subMesh::ComputeStateEngine(int event)
|
|||||||
ret = false;
|
ret = false;
|
||||||
_computeState = FAILED_TO_COMPUTE;
|
_computeState = FAILED_TO_COMPUTE;
|
||||||
_computeError = SMESH_ComputeError::New(COMPERR_OK,"",algo);
|
_computeError = SMESH_ComputeError::New(COMPERR_OK,"",algo);
|
||||||
TopoDS_Shape shape = _subShape;
|
|
||||||
try {
|
try {
|
||||||
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
|
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
|
||||||
OCC_CATCH_SIGNALS;
|
OCC_CATCH_SIGNALS;
|
||||||
@ -1349,9 +1353,6 @@ bool SMESH_subMesh::ComputeStateEngine(int event)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!algo->OnlyUnaryInput()) {
|
|
||||||
shape = GetCollection( gen, algo );
|
|
||||||
}
|
|
||||||
ret = algo->Compute((*_father), shape);
|
ret = algo->Compute((*_father), shape);
|
||||||
}
|
}
|
||||||
if ( !ret )
|
if ( !ret )
|
||||||
@ -1508,6 +1509,9 @@ bool SMESH_subMesh::ComputeStateEngine(int event)
|
|||||||
switch (event)
|
switch (event)
|
||||||
{
|
{
|
||||||
case MODIF_ALGO_STATE:
|
case MODIF_ALGO_STATE:
|
||||||
|
algo = gen->GetAlgo((*_father), _subShape);
|
||||||
|
if (algo && !algo->NeedDescretBoundary())
|
||||||
|
CleanDependsOn(); // clean sub-meshes with event CLEAN
|
||||||
if (_algoState == HYP_OK)
|
if (_algoState == HYP_OK)
|
||||||
_computeState = READY_TO_COMPUTE;
|
_computeState = READY_TO_COMPUTE;
|
||||||
else
|
else
|
||||||
@ -1780,10 +1784,14 @@ void SMESH_subMesh::RemoveSubMeshElementsAndNodes()
|
|||||||
// meshed at once along with _subShape
|
// meshed at once along with _subShape
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
TopoDS_Shape SMESH_subMesh::GetCollection(SMESH_Gen * theGen, SMESH_Algo* theAlgo)
|
TopoDS_Shape SMESH_subMesh::GetCollection(SMESH_Gen * theGen,
|
||||||
|
SMESH_Algo* theAlgo,
|
||||||
|
bool & theSubComputed)
|
||||||
{
|
{
|
||||||
MESSAGE("SMESH_subMesh::GetCollection");
|
MESSAGE("SMESH_subMesh::GetCollection");
|
||||||
|
|
||||||
|
theSubComputed = SubMeshesComputed();
|
||||||
|
|
||||||
TopoDS_Shape mainShape = _father->GetMeshDS()->ShapeToMesh();
|
TopoDS_Shape mainShape = _father->GetMeshDS()->ShapeToMesh();
|
||||||
|
|
||||||
if ( mainShape.IsSame( _subShape ))
|
if ( mainShape.IsSame( _subShape ))
|
||||||
@ -1815,6 +1823,8 @@ TopoDS_Shape SMESH_subMesh::GetCollection(SMESH_Gen * theGen, SMESH_Algo* theAlg
|
|||||||
if (anAlgo == theAlgo &&
|
if (anAlgo == theAlgo &&
|
||||||
anAlgo->GetUsedHypothesis( *_father, S, ignoreAuxiliaryHyps ) == aUsedHyp)
|
anAlgo->GetUsedHypothesis( *_father, S, ignoreAuxiliaryHyps ) == aUsedHyp)
|
||||||
aBuilder.Add( aCompound, S );
|
aBuilder.Add( aCompound, S );
|
||||||
|
if ( !subMesh->SubMeshesComputed() )
|
||||||
|
theSubComputed = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -241,7 +241,9 @@ protected:
|
|||||||
* \brief Return a shape containing all sub-shapes of the MainShape that can be
|
* \brief Return a shape containing all sub-shapes of the MainShape that can be
|
||||||
* meshed at once along with _subShape
|
* meshed at once along with _subShape
|
||||||
*/
|
*/
|
||||||
TopoDS_Shape GetCollection(SMESH_Gen * theGen, SMESH_Algo* theAlgo);
|
TopoDS_Shape GetCollection(SMESH_Gen * theGen,
|
||||||
|
SMESH_Algo* theAlgo,
|
||||||
|
bool & theSubComputed);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Apply theAlgo to all subshapes in theCollection
|
* \brief Apply theAlgo to all subshapes in theCollection
|
||||||
|
Loading…
Reference in New Issue
Block a user