52609: Geometric progression works wrong with "Reversed edges" option used + Propagation

+ BUG: Lying on Geom filetr works wrong with Geom Group
+ BUG: Too long opening of Mesh Info dlg of a small sub-mesh in a large mesh
This commit is contained in:
eap 2015-02-03 13:43:25 +03:00
parent 53393c4445
commit 51b0f28786
3 changed files with 36 additions and 32 deletions

View File

@ -4087,39 +4087,39 @@ bool ElementsOnShape::IsSatisfy (long elemId)
if ( !elem || myClassifiers.empty() )
return false;
for ( size_t i = 0; i < myClassifiers.size(); ++i )
bool isSatisfy = myAllNodesFlag, isNodeOut;
gp_XYZ centerXYZ (0, 0, 0);
SMDS_ElemIteratorPtr aNodeItr = elem->nodesIterator();
while (aNodeItr->more() && (isSatisfy == myAllNodesFlag))
{
SMDS_ElemIteratorPtr aNodeItr = elem->nodesIterator();
bool isSatisfy = myAllNodesFlag, isNodeOut;
gp_XYZ centerXYZ (0, 0, 0);
SMESH_TNodeXYZ aPnt( aNodeItr->next() );
centerXYZ += aPnt;
while (aNodeItr->more() && (isSatisfy == myAllNodesFlag))
isNodeOut = true;
if ( !getNodeIsOut( aPnt._node, isNodeOut ))
{
const SMDS_MeshNode* n = (const SMDS_MeshNode*) aNodeItr->next();
if ( !getNodeIsOut( n, isNodeOut ))
{
SMESH_TNodeXYZ aPnt( n );
centerXYZ += aPnt;
for ( size_t i = 0; i < myClassifiers.size() && isNodeOut; ++i )
isNodeOut = myClassifiers[i]->IsOut( aPnt );
setNodeIsOut( n, isNodeOut );
}
isSatisfy = !isNodeOut;
}
// Check the center point for volumes MantisBug 0020168
if (isSatisfy &&
myAllNodesFlag &&
myClassifiers[i]->ShapeType() == TopAbs_SOLID)
{
centerXYZ /= elem->NbNodes();
isSatisfy = ! myClassifiers[i]->IsOut( centerXYZ );
setNodeIsOut( aPnt._node, isNodeOut );
}
if ( isSatisfy )
return true;
isSatisfy = !isNodeOut;
}
return false;
// Check the center point for volumes MantisBug 0020168
if (isSatisfy &&
myAllNodesFlag &&
myClassifiers[0]->ShapeType() == TopAbs_SOLID)
{
centerXYZ /= elem->NbNodes();
isSatisfy = false;
for ( size_t i = 0; i < myClassifiers.size() && !isSatisfy; ++i )
isSatisfy = ! myClassifiers[i]->IsOut( centerXYZ );
}
return isSatisfy;
}
TopAbs_ShapeEnum ElementsOnShape::TClassifier::ShapeType() const

View File

@ -3340,7 +3340,8 @@ void SMESHGUI_CtrlInfo::showInfo( SMESH::SMESH_IDSource_ptr obj )
// free nodes
computeFreeNodesInfo();
// double nodes
computeDoubleNodesInfo();
if ( Max( (int)mesh->NbNodes(), (int)mesh->NbElements() ) <= ctrlLimit )
computeDoubleNodesInfo();
}
else {
myButtons[0]->setEnabled( true );

View File

@ -968,13 +968,13 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh,
{
if ( Abs( param - Un ) < 0.2 * Abs( param - theParams.back() ))
{
compensateError( a1, eltSize, U1, Un, theLength, theC3d, theParams );
compensateError( a1, Abs(eltSize), U1, Un, theLength, theC3d, theParams );
}
else if ( Abs( Un - theParams.back() ) <
0.2 * Abs( theParams.back() - *(--theParams.rbegin())))
0.2 * Abs( theParams.back() - *(++theParams.rbegin())))
{
theParams.pop_back();
compensateError( a1, an, U1, Un, theLength, theC3d, theParams );
compensateError( a1, Abs(an), U1, Un, theLength, theC3d, theParams );
}
}
if (theReverse) theParams.reverse(); // NPAL18025
@ -1170,10 +1170,13 @@ bool StdMeshers_Regular_1D::Compute(SMESH_Mesh & theMesh, const TopoDS_Shape & t
}
if ( !_mainEdge.IsNull() ) {
// take into account reversing the edge the hypothesis is propagated from
// (_mainEdge.Orientation() marks mutual orientation of EDGEs in propagation chain)
reversed = ( _mainEdge.Orientation() == TopAbs_REVERSED );
int mainID = meshDS->ShapeToIndex(_mainEdge);
if ( std::find( _revEdgesIDs.begin(), _revEdgesIDs.end(), mainID) != _revEdgesIDs.end())
reversed = !reversed;
if ( !_isPropagOfDistribution ) {
int mainID = meshDS->ShapeToIndex(_mainEdge);
if ( std::find( _revEdgesIDs.begin(), _revEdgesIDs.end(), mainID) != _revEdgesIDs.end())
reversed = !reversed;
}
}
// take into account this edge reversing
if ( std::find( _revEdgesIDs.begin(), _revEdgesIDs.end(), shapeID) != _revEdgesIDs.end())