0022091: [CEA 760] Regression on test test check_mesh_stability.py

+  void SetIgnoreMediumNodes(bool toIgnore);
This commit is contained in:
eap 2013-02-06 13:04:40 +00:00
parent 5ea0315b7f
commit 9016043d99
2 changed files with 37 additions and 2 deletions

View File

@ -611,6 +611,33 @@ void StdMeshers_FaceSide::Reverse()
}
}
//=======================================================================
//function : SetIgnoreMediumNodes
//purpose : Make ignore medium nodes
//=======================================================================
void StdMeshers_FaceSide::SetIgnoreMediumNodes(bool toIgnore)
{
if ( myIgnoreMediumNodes != toIgnore )
{
myIgnoreMediumNodes = toIgnore;
if ( !myPoints.empty() )
{
UVPtStructVec newPoints;
newPoints.reserve( myPoints.size()/2 + 1 );
for ( size_t i = 0; i < myPoints.size(); i += 2 )
newPoints.push_back( myPoints[i] );
myPoints.swap( newPoints );
}
else
{
NbPoints( /*update=*/true );
}
}
}
//=======================================================================
//function : NbPoints
//purpose : Return nb nodes on edges and vertices (+1 to be == GetUVPtStruct().size() )
@ -649,6 +676,7 @@ int StdMeshers_FaceSide::NbPoints(const bool update) const
nbN -= sm->NbElements();
}
me->myNbPonits += nbN;
me->myNbSegments += sm->NbElements();
}
}
TopoDS_Vertex v1 = SMESH_MesherHelper::IthVertex( 1, Edge( NbEdges()-1 ));
@ -669,7 +697,7 @@ int StdMeshers_FaceSide::NbPoints(const bool update) const
int StdMeshers_FaceSide::NbSegments(const bool update) const
{
return Max( 0, NbPoints( update ) - 1 );
return NbPoints( update ), myNbSegments;
}
//================================================================================

View File

@ -101,6 +101,11 @@ public:
* \brief Change orientation of side geometry
*/
void Reverse();
/*!
* \brief Make ignore medium nodes
*/
void SetIgnoreMediumNodes(bool toIgnore);
/*!
* \brief Return nb nodes on edges and vertices (+1 to be == GetUVPtStruct().size() ).
* Call it with update == true if mesh of this side can be recomputed
@ -121,6 +126,7 @@ public:
* \brief Return true if there are vertices without nodes
*/
bool MissVertexNode() const { return myMissingVertexNodes; }
/*!
* \brief Return detailed data on nodes
* \param isXConst - true if normalized parameter X is constant
@ -143,6 +149,7 @@ public:
* For a closed side, the 1st point repeats at end
*/
std::vector<const SMDS_MeshNode*> GetOrderedNodes() const;
/*!
* \brief Return edge and parameter on edge by normalized parameter
*/