mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-28 02:10:35 +05:00
IPAL53872: Projection of Node Distribution does not work with Adaptive hypothesis
This commit is contained in:
parent
b6e8c17211
commit
92bb7ceb6e
@ -294,6 +294,10 @@ 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);
|
||||||
@ -672,7 +676,7 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh,
|
|||||||
|
|
||||||
// Propagation Of Distribution
|
// Propagation Of Distribution
|
||||||
//
|
//
|
||||||
if ( !_mainEdge.IsNull() && _isPropagOfDistribution )
|
if ( !_mainEdge.IsNull() && _hypType == DISTRIB_PROPAGATION )
|
||||||
{
|
{
|
||||||
TopoDS_Edge mainEdge = TopoDS::Edge( _mainEdge ); // should not be a reference!
|
TopoDS_Edge mainEdge = TopoDS::Edge( _mainEdge ); // should not be a reference!
|
||||||
_gen->Compute( theMesh, mainEdge, SMESH_Gen::SHAPE_ONLY_UPWARD );
|
_gen->Compute( theMesh, mainEdge, SMESH_Gen::SHAPE_ONLY_UPWARD );
|
||||||
@ -1164,7 +1168,7 @@ bool StdMeshers_Regular_1D::Compute(SMESH_Mesh & theMesh, const TopoDS_Shape & t
|
|||||||
// take into account reversing the edge the hypothesis is propagated from
|
// take into account reversing the edge the hypothesis is propagated from
|
||||||
// (_mainEdge.Orientation() marks mutual orientation of EDGEs in propagation chain)
|
// (_mainEdge.Orientation() marks mutual orientation of EDGEs in propagation chain)
|
||||||
reversed = ( _mainEdge.Orientation() == TopAbs_REVERSED );
|
reversed = ( _mainEdge.Orientation() == TopAbs_REVERSED );
|
||||||
if ( !_isPropagOfDistribution ) {
|
if ( _hypType != DISTRIB_PROPAGATION ) {
|
||||||
int mainID = meshDS->ShapeToIndex(_mainEdge);
|
int mainID = meshDS->ShapeToIndex(_mainEdge);
|
||||||
if ( std::find( _revEdgesIDs.begin(), _revEdgesIDs.end(), mainID) != _revEdgesIDs.end())
|
if ( std::find( _revEdgesIDs.begin(), _revEdgesIDs.end(), mainID) != _revEdgesIDs.end())
|
||||||
reversed = !reversed;
|
reversed = !reversed;
|
||||||
@ -1370,10 +1374,13 @@ StdMeshers_Regular_1D::GetUsedHypothesis(SMESH_Mesh & aMesh,
|
|||||||
if (nbHyp == 0 && aShape.ShapeType() == TopAbs_EDGE)
|
if (nbHyp == 0 && aShape.ShapeType() == TopAbs_EDGE)
|
||||||
{
|
{
|
||||||
// Check, if propagated from some other edge
|
// Check, if propagated from some other edge
|
||||||
|
bool isPropagOfDistribution = false;
|
||||||
_mainEdge = StdMeshers_Propagation::GetPropagationSource( aMesh, aShape,
|
_mainEdge = StdMeshers_Propagation::GetPropagationSource( aMesh, aShape,
|
||||||
_isPropagOfDistribution );
|
isPropagOfDistribution );
|
||||||
if ( !_mainEdge.IsNull() )
|
if ( !_mainEdge.IsNull() )
|
||||||
{
|
{
|
||||||
|
if ( isPropagOfDistribution )
|
||||||
|
_hypType = DISTRIB_PROPAGATION;
|
||||||
// Propagation of 1D hypothesis from <aMainEdge> on this edge;
|
// Propagation of 1D hypothesis from <aMainEdge> on this edge;
|
||||||
// get non-auxiliary assigned to _mainEdge
|
// get non-auxiliary assigned to _mainEdge
|
||||||
nbHyp = aMesh.GetHypotheses( _mainEdge, *compatibleFilter, _usedHypList, true );
|
nbHyp = aMesh.GetHypotheses( _mainEdge, *compatibleFilter, _usedHypList, true );
|
||||||
|
@ -104,7 +104,7 @@ protected:
|
|||||||
StdMeshers_SegmentLengthAroundVertex* getVertexHyp(SMESH_Mesh & theMesh,
|
StdMeshers_SegmentLengthAroundVertex* getVertexHyp(SMESH_Mesh & theMesh,
|
||||||
const TopoDS_Vertex & theV);
|
const TopoDS_Vertex & theV);
|
||||||
|
|
||||||
enum HypothesisType { LOCAL_LENGTH, MAX_LENGTH, NB_SEGMENTS, BEG_END_LENGTH, DEFLECTION, ARITHMETIC_1D, FIXED_POINTS_1D, ADAPTIVE, GEOMETRIC_1D, NONE };
|
enum HypothesisType { LOCAL_LENGTH, MAX_LENGTH, NB_SEGMENTS, BEG_END_LENGTH, DEFLECTION, ARITHMETIC_1D, FIXED_POINTS_1D, ADAPTIVE, GEOMETRIC_1D, DISTRIB_PROPAGATION, NONE };
|
||||||
|
|
||||||
enum ValueIndex {
|
enum ValueIndex {
|
||||||
SCALE_FACTOR_IND = 0,
|
SCALE_FACTOR_IND = 0,
|
||||||
@ -142,7 +142,6 @@ protected:
|
|||||||
// a source of propagated hypothesis, is set by CheckHypothesis()
|
// a source of propagated hypothesis, is set by CheckHypothesis()
|
||||||
// always called before Compute()
|
// always called before Compute()
|
||||||
TopoDS_Shape _mainEdge;
|
TopoDS_Shape _mainEdge;
|
||||||
bool _isPropagOfDistribution;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user