mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-02-15 19:33:06 +05:00
0021406: EDF 1975 NETGENPLUGIN: Submesh hypothesis not taken into account
In compute, apply GLOBAL algo that !NeedDescretBoundary() and SupportSubmeshes() after LOCAL algos of such kind
This commit is contained in:
parent
3a1c4018e3
commit
17e8b29aa5
@ -128,6 +128,7 @@ bool SMESH_Gen::Compute(SMESH_Mesh & aMesh,
|
|||||||
|
|
||||||
const bool includeSelf = true;
|
const bool includeSelf = true;
|
||||||
const bool complexShapeFirst = true;
|
const bool complexShapeFirst = true;
|
||||||
|
const int globalAlgoDim = 100;
|
||||||
|
|
||||||
SMESH_subMeshIteratorPtr smIt;
|
SMESH_subMeshIteratorPtr smIt;
|
||||||
|
|
||||||
@ -214,20 +215,31 @@ bool SMESH_Gen::Compute(SMESH_Mesh & aMesh,
|
|||||||
if ( algo->SupportSubmeshes() )
|
if ( algo->SupportSubmeshes() )
|
||||||
{
|
{
|
||||||
// reload sub-meshes from shDim2sm into smWithAlgoSupportingSubmeshes
|
// reload sub-meshes from shDim2sm into smWithAlgoSupportingSubmeshes
|
||||||
|
// so that more local algos to go first
|
||||||
if ( prevShapeDim != aShapeDim )
|
if ( prevShapeDim != aShapeDim )
|
||||||
{
|
{
|
||||||
prevShapeDim = aShapeDim;
|
prevShapeDim = aShapeDim;
|
||||||
for ( shDim2smIt = shDim2sm.rbegin(); shDim2smIt != shDim2sm.rend(); ++shDim2smIt )
|
for ( shDim2smIt = shDim2sm.rbegin(); shDim2smIt != shDim2sm.rend(); ++shDim2smIt )
|
||||||
|
if ( shDim2smIt->first == globalAlgoDim )
|
||||||
|
smWithAlgoSupportingSubmeshes.push_back( shDim2smIt->second );
|
||||||
|
else
|
||||||
smWithAlgoSupportingSubmeshes.push_front( shDim2smIt->second );
|
smWithAlgoSupportingSubmeshes.push_front( shDim2smIt->second );
|
||||||
shDim2sm.clear();
|
shDim2sm.clear();
|
||||||
}
|
}
|
||||||
// add smToCompute to shDim2sm map
|
// add smToCompute to shDim2sm map
|
||||||
|
if ( algoShape.IsSame( aMesh.GetShapeToMesh() ))
|
||||||
|
{
|
||||||
|
aShapeDim = globalAlgoDim; // to compute last
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
aShapeDim = GetShapeDim( algoShape );
|
aShapeDim = GetShapeDim( algoShape );
|
||||||
if ( algoShape.ShapeType() == TopAbs_COMPOUND )
|
if ( algoShape.ShapeType() == TopAbs_COMPOUND )
|
||||||
{
|
{
|
||||||
TopoDS_Iterator it( algoShape );
|
TopoDS_Iterator it( algoShape );
|
||||||
aShapeDim += GetShapeDim( it.Value() );
|
aShapeDim += GetShapeDim( it.Value() );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
shDim2sm.insert( make_pair( aShapeDim, smToCompute ));
|
shDim2sm.insert( make_pair( aShapeDim, smToCompute ));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -248,6 +260,9 @@ bool SMESH_Gen::Compute(SMESH_Mesh & aMesh,
|
|||||||
}
|
}
|
||||||
// reload sub-meshes from shDim2sm into smWithAlgoSupportingSubmeshes
|
// reload sub-meshes from shDim2sm into smWithAlgoSupportingSubmeshes
|
||||||
for ( shDim2smIt = shDim2sm.rbegin(); shDim2smIt != shDim2sm.rend(); ++shDim2smIt )
|
for ( shDim2smIt = shDim2sm.rbegin(); shDim2smIt != shDim2sm.rend(); ++shDim2smIt )
|
||||||
|
if ( shDim2smIt->first == globalAlgoDim )
|
||||||
|
smWithAlgoSupportingSubmeshes.push_back( shDim2smIt->second );
|
||||||
|
else
|
||||||
smWithAlgoSupportingSubmeshes.push_front( shDim2smIt->second );
|
smWithAlgoSupportingSubmeshes.push_front( shDim2smIt->second );
|
||||||
|
|
||||||
// ------------------------------------------------------------
|
// ------------------------------------------------------------
|
||||||
@ -289,7 +304,7 @@ bool SMESH_Gen::Compute(SMESH_Mesh & aMesh,
|
|||||||
SMESH_HypoFilter filter( SMESH_HypoFilter::IsAlgo() );
|
SMESH_HypoFilter filter( SMESH_HypoFilter::IsAlgo() );
|
||||||
filter
|
filter
|
||||||
.And( SMESH_HypoFilter::IsApplicableTo( aSubShape ))
|
.And( SMESH_HypoFilter::IsApplicableTo( aSubShape ))
|
||||||
.And( SMESH_HypoFilter::IsMoreLocalThan( algoShape ));
|
.And( SMESH_HypoFilter::IsMoreLocalThan( algoShape, aMesh.GetShapeToMesh() ));
|
||||||
|
|
||||||
if ( SMESH_Algo* subAlgo = (SMESH_Algo*) aMesh.GetHypothesis( aSubShape, filter, true )) {
|
if ( SMESH_Algo* subAlgo = (SMESH_Algo*) aMesh.GetHypothesis( aSubShape, filter, true )) {
|
||||||
SMESH_Hypothesis::Hypothesis_Status status;
|
SMESH_Hypothesis::Hypothesis_Status status;
|
||||||
@ -501,7 +516,7 @@ bool SMESH_Gen::Evaluate(SMESH_Mesh & aMesh,
|
|||||||
SMESH_HypoFilter filter( SMESH_HypoFilter::IsAlgo() );
|
SMESH_HypoFilter filter( SMESH_HypoFilter::IsAlgo() );
|
||||||
filter
|
filter
|
||||||
.And( SMESH_HypoFilter::IsApplicableTo( aSubShape ))
|
.And( SMESH_HypoFilter::IsApplicableTo( aSubShape ))
|
||||||
.And( SMESH_HypoFilter::IsMoreLocalThan( algoShape ));
|
.And( SMESH_HypoFilter::IsMoreLocalThan( algoShape, aMesh.GetShapeToMesh() ));
|
||||||
|
|
||||||
if ( SMESH_Algo* subAlgo = (SMESH_Algo*) aMesh.GetHypothesis( aSubShape, filter, true )) {
|
if ( SMESH_Algo* subAlgo = (SMESH_Algo*) aMesh.GetHypothesis( aSubShape, filter, true )) {
|
||||||
SMESH_Hypothesis::Hypothesis_Status status;
|
SMESH_Hypothesis::Hypothesis_Status status;
|
||||||
|
Loading…
Reference in New Issue
Block a user