mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-29 22:40:34 +05:00
0021217: EDF SMESH: Submesh is not taken into account whith netgen 1d-2d
This commit is contained in:
parent
0943b1a66f
commit
7d37e871b2
@ -184,6 +184,14 @@ bool SMESH_Gen::Compute(SMESH_Mesh & aMesh,
|
|||||||
// and collect submeshes with algos that DO support submeshes
|
// and collect submeshes with algos that DO support submeshes
|
||||||
// -----------------------------------------------------------------
|
// -----------------------------------------------------------------
|
||||||
list< SMESH_subMesh* > smWithAlgoSupportingSubmeshes;
|
list< SMESH_subMesh* > smWithAlgoSupportingSubmeshes;
|
||||||
|
|
||||||
|
// map to sort sm with same dim algos according to dim of
|
||||||
|
// the shape the algo assigned to (issue 0021217)
|
||||||
|
multimap< int, SMESH_subMesh* > shDim2sm;
|
||||||
|
multimap< int, SMESH_subMesh* >::reverse_iterator shDim2smIt;
|
||||||
|
TopoDS_Shape algoShape;
|
||||||
|
int prevShapeDim = -1;
|
||||||
|
|
||||||
smIt = sm->getDependsOnIterator(includeSelf, complexShapeFirst);
|
smIt = sm->getDependsOnIterator(includeSelf, complexShapeFirst);
|
||||||
while ( smIt->more() )
|
while ( smIt->more() )
|
||||||
{
|
{
|
||||||
@ -192,18 +200,30 @@ bool SMESH_Gen::Compute(SMESH_Mesh & aMesh,
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
const TopoDS_Shape& aSubShape = smToCompute->GetSubShape();
|
const TopoDS_Shape& aSubShape = smToCompute->GetSubShape();
|
||||||
const int aShapeDim = GetShapeDim( aSubShape );
|
int aShapeDim = GetShapeDim( aSubShape );
|
||||||
if ( aShapeDim < 1 ) break;
|
if ( aShapeDim < 1 ) break;
|
||||||
|
|
||||||
// check for preview dimension limitations
|
// check for preview dimension limitations
|
||||||
if ( aShapesId && aShapeDim > (int)aDim )
|
if ( aShapesId && aShapeDim > (int)aDim )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
SMESH_Algo* algo = GetAlgo( aMesh, aSubShape );
|
SMESH_Algo* algo = GetAlgo( aMesh, aSubShape, &algoShape );
|
||||||
if ( algo && !algo->NeedDescretBoundary() )
|
if ( algo && !algo->NeedDescretBoundary() )
|
||||||
{
|
{
|
||||||
if ( algo->SupportSubmeshes() )
|
if ( algo->SupportSubmeshes() )
|
||||||
smWithAlgoSupportingSubmeshes.push_front( smToCompute );
|
{
|
||||||
|
// reload sub-meshes from shDim2sm into smWithAlgoSupportingSubmeshes
|
||||||
|
if ( prevShapeDim != aShapeDim )
|
||||||
|
{
|
||||||
|
prevShapeDim = aShapeDim;
|
||||||
|
for ( shDim2smIt = shDim2sm.rbegin(); shDim2smIt != shDim2sm.rend(); ++shDim2smIt )
|
||||||
|
smWithAlgoSupportingSubmeshes.push_front( shDim2smIt->second );
|
||||||
|
shDim2sm.clear();
|
||||||
|
}
|
||||||
|
// add smToCompute to shDim2sm map
|
||||||
|
aShapeDim = GetShapeDim( algoShape );
|
||||||
|
shDim2sm.insert( make_pair( aShapeDim, smToCompute ));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#ifdef WITH_SMESH_CANCEL_COMPUTE
|
#ifdef WITH_SMESH_CANCEL_COMPUTE
|
||||||
@ -220,6 +240,9 @@ bool SMESH_Gen::Compute(SMESH_Mesh & aMesh,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// reload sub-meshes from shDim2sm into smWithAlgoSupportingSubmeshes
|
||||||
|
for ( shDim2smIt = shDim2sm.rbegin(); shDim2smIt != shDim2sm.rend(); ++shDim2smIt )
|
||||||
|
smWithAlgoSupportingSubmeshes.push_front( shDim2smIt->second );
|
||||||
|
|
||||||
// ------------------------------------------------------------
|
// ------------------------------------------------------------
|
||||||
// sort list of submeshes according to mesh order
|
// sort list of submeshes according to mesh order
|
||||||
@ -239,7 +262,6 @@ bool SMESH_Gen::Compute(SMESH_Mesh & aMesh,
|
|||||||
sm = *subIt;
|
sm = *subIt;
|
||||||
|
|
||||||
// get a shape the algo is assigned to
|
// get a shape the algo is assigned to
|
||||||
TopoDS_Shape algoShape;
|
|
||||||
if ( !GetAlgo( aMesh, sm->GetSubShape(), & algoShape ))
|
if ( !GetAlgo( aMesh, sm->GetSubShape(), & algoShape ))
|
||||||
continue; // strange...
|
continue; // strange...
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user