mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-27 09:50:34 +05:00
Fix regression of Propagation of Distribution
smesh/3D_mesh_HEXA3D_03/D0
This commit is contained in:
parent
7211ec8d0e
commit
845b5221ba
@ -50,8 +50,8 @@
|
|||||||
#include "StdMeshers_SegmentLengthAroundVertex.hxx"
|
#include "StdMeshers_SegmentLengthAroundVertex.hxx"
|
||||||
#include "StdMeshers_StartEndLength.hxx"
|
#include "StdMeshers_StartEndLength.hxx"
|
||||||
|
|
||||||
#include "Utils_SALOME_Exception.hxx"
|
#include <Utils_SALOME_Exception.hxx>
|
||||||
#include "utilities.h"
|
#include <utilities.h>
|
||||||
|
|
||||||
#include <BRepAdaptor_Curve.hxx>
|
#include <BRepAdaptor_Curve.hxx>
|
||||||
#include <BRep_Tool.hxx>
|
#include <BRep_Tool.hxx>
|
||||||
@ -126,6 +126,7 @@ bool StdMeshers_Regular_1D::CheckHypothesis( SMESH_Mesh& aMesh,
|
|||||||
_quadraticMesh = false;
|
_quadraticMesh = false;
|
||||||
_onlyUnaryInput = true;
|
_onlyUnaryInput = true;
|
||||||
|
|
||||||
|
// check propagation in a redefined GetUsedHypothesis()
|
||||||
const list <const SMESHDS_Hypothesis * > & hyps =
|
const list <const SMESHDS_Hypothesis * > & hyps =
|
||||||
GetUsedHypothesis(aMesh, aShape, /*ignoreAuxiliaryHyps=*/false);
|
GetUsedHypothesis(aMesh, aShape, /*ignoreAuxiliaryHyps=*/false);
|
||||||
|
|
||||||
@ -156,7 +157,11 @@ bool StdMeshers_Regular_1D::CheckHypothesis( SMESH_Mesh& aMesh,
|
|||||||
|
|
||||||
string hypName = theHyp->GetName();
|
string hypName = theHyp->GetName();
|
||||||
|
|
||||||
if ( hypName == "LocalLength" )
|
if ( !_mainEdge.IsNull() && _hypType == DISTRIB_PROPAGATION )
|
||||||
|
{
|
||||||
|
aStatus = SMESH_Hypothesis::HYP_OK;
|
||||||
|
}
|
||||||
|
else if ( hypName == "LocalLength" )
|
||||||
{
|
{
|
||||||
const StdMeshers_LocalLength * hyp =
|
const StdMeshers_LocalLength * hyp =
|
||||||
dynamic_cast <const StdMeshers_LocalLength * >(theHyp);
|
dynamic_cast <const StdMeshers_LocalLength * >(theHyp);
|
||||||
@ -294,10 +299,6 @@ bool StdMeshers_Regular_1D::CheckHypothesis( SMESH_Mesh& aMesh,
|
|||||||
_hypType = MAX_LENGTH;
|
_hypType = MAX_LENGTH;
|
||||||
aStatus = SMESH_Hypothesis::HYP_OK;
|
aStatus = SMESH_Hypothesis::HYP_OK;
|
||||||
}
|
}
|
||||||
else if ( !_mainEdge.IsNull() && _hypType == DISTRIB_PROPAGATION ) // !!! before "Adaptive1D"
|
|
||||||
{
|
|
||||||
aStatus = SMESH_Hypothesis::HYP_OK;
|
|
||||||
}
|
|
||||||
else if ( hypName == "Adaptive1D" )
|
else if ( hypName == "Adaptive1D" )
|
||||||
{
|
{
|
||||||
_adaptiveHyp = dynamic_cast < const StdMeshers_Adaptive1D* >(theHyp);
|
_adaptiveHyp = dynamic_cast < const StdMeshers_Adaptive1D* >(theHyp);
|
||||||
@ -390,6 +391,7 @@ static bool computeParamByFunc(Adaptor3d_Curve& C3d,
|
|||||||
}
|
}
|
||||||
if ( theReverse )
|
if ( theReverse )
|
||||||
theParams.reverse();
|
theParams.reverse();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1282,7 +1284,7 @@ bool StdMeshers_Regular_1D::Compute(SMESH_Mesh & theMesh, const TopoDS_Shape & t
|
|||||||
|
|
||||||
bool StdMeshers_Regular_1D::Evaluate(SMESH_Mesh & theMesh,
|
bool StdMeshers_Regular_1D::Evaluate(SMESH_Mesh & theMesh,
|
||||||
const TopoDS_Shape & theShape,
|
const TopoDS_Shape & theShape,
|
||||||
MapShapeNbElems& aResMap)
|
MapShapeNbElems& theResMap)
|
||||||
{
|
{
|
||||||
if ( _hypType == NONE )
|
if ( _hypType == NONE )
|
||||||
return false;
|
return false;
|
||||||
@ -1290,7 +1292,7 @@ bool StdMeshers_Regular_1D::Evaluate(SMESH_Mesh & theMesh,
|
|||||||
if ( _hypType == ADAPTIVE )
|
if ( _hypType == ADAPTIVE )
|
||||||
{
|
{
|
||||||
_adaptiveHyp->GetAlgo()->InitComputeError();
|
_adaptiveHyp->GetAlgo()->InitComputeError();
|
||||||
_adaptiveHyp->GetAlgo()->Evaluate( theMesh, theShape, aResMap );
|
_adaptiveHyp->GetAlgo()->Evaluate( theMesh, theShape, theResMap );
|
||||||
return error( _adaptiveHyp->GetAlgo()->GetComputeError() );
|
return error( _adaptiveHyp->GetAlgo()->GetComputeError() );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1315,7 +1317,7 @@ bool StdMeshers_Regular_1D::Evaluate(SMESH_Mesh & theMesh,
|
|||||||
BRepAdaptor_Curve C3d( E );
|
BRepAdaptor_Curve C3d( E );
|
||||||
if ( ! computeInternalParameters( theMesh, C3d, length, f, l, params, false, true )) {
|
if ( ! computeInternalParameters( theMesh, C3d, length, f, l, params, false, true )) {
|
||||||
SMESH_subMesh * sm = theMesh.GetSubMesh(theShape);
|
SMESH_subMesh * sm = theMesh.GetSubMesh(theShape);
|
||||||
aResMap.insert(std::make_pair(sm,aVec));
|
theResMap.insert(std::make_pair(sm,aVec));
|
||||||
SMESH_ComputeErrorPtr& smError = sm->GetComputeError();
|
SMESH_ComputeErrorPtr& smError = sm->GetComputeError();
|
||||||
smError.reset( new SMESH_ComputeError(COMPERR_ALGO_FAILED,"Submesh can not be evaluated",this));
|
smError.reset( new SMESH_ComputeError(COMPERR_ALGO_FAILED,"Submesh can not be evaluated",this));
|
||||||
return false;
|
return false;
|
||||||
@ -1345,7 +1347,7 @@ bool StdMeshers_Regular_1D::Evaluate(SMESH_Mesh & theMesh,
|
|||||||
}
|
}
|
||||||
|
|
||||||
SMESH_subMesh * sm = theMesh.GetSubMesh( theShape );
|
SMESH_subMesh * sm = theMesh.GetSubMesh( theShape );
|
||||||
aResMap.insert(std::make_pair(sm,aVec));
|
theResMap.insert( std::make_pair( sm, aVec ));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user