mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-28 14:20:34 +05:00
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:
parent
53393c4445
commit
51b0f28786
@ -4087,22 +4087,23 @@ bool ElementsOnShape::IsSatisfy (long elemId)
|
|||||||
if ( !elem || myClassifiers.empty() )
|
if ( !elem || myClassifiers.empty() )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
for ( size_t i = 0; i < myClassifiers.size(); ++i )
|
|
||||||
{
|
|
||||||
SMDS_ElemIteratorPtr aNodeItr = elem->nodesIterator();
|
|
||||||
bool isSatisfy = myAllNodesFlag, isNodeOut;
|
bool isSatisfy = myAllNodesFlag, isNodeOut;
|
||||||
|
|
||||||
gp_XYZ centerXYZ (0, 0, 0);
|
gp_XYZ centerXYZ (0, 0, 0);
|
||||||
|
|
||||||
|
SMDS_ElemIteratorPtr aNodeItr = elem->nodesIterator();
|
||||||
while (aNodeItr->more() && (isSatisfy == myAllNodesFlag))
|
while (aNodeItr->more() && (isSatisfy == myAllNodesFlag))
|
||||||
{
|
{
|
||||||
const SMDS_MeshNode* n = (const SMDS_MeshNode*) aNodeItr->next();
|
SMESH_TNodeXYZ aPnt( aNodeItr->next() );
|
||||||
if ( !getNodeIsOut( n, isNodeOut ))
|
|
||||||
{
|
|
||||||
SMESH_TNodeXYZ aPnt( n );
|
|
||||||
centerXYZ += aPnt;
|
centerXYZ += aPnt;
|
||||||
|
|
||||||
|
isNodeOut = true;
|
||||||
|
if ( !getNodeIsOut( aPnt._node, isNodeOut ))
|
||||||
|
{
|
||||||
|
for ( size_t i = 0; i < myClassifiers.size() && isNodeOut; ++i )
|
||||||
isNodeOut = myClassifiers[i]->IsOut( aPnt );
|
isNodeOut = myClassifiers[i]->IsOut( aPnt );
|
||||||
setNodeIsOut( n, isNodeOut );
|
|
||||||
|
setNodeIsOut( aPnt._node, isNodeOut );
|
||||||
}
|
}
|
||||||
isSatisfy = !isNodeOut;
|
isSatisfy = !isNodeOut;
|
||||||
}
|
}
|
||||||
@ -4110,16 +4111,15 @@ bool ElementsOnShape::IsSatisfy (long elemId)
|
|||||||
// Check the center point for volumes MantisBug 0020168
|
// Check the center point for volumes MantisBug 0020168
|
||||||
if (isSatisfy &&
|
if (isSatisfy &&
|
||||||
myAllNodesFlag &&
|
myAllNodesFlag &&
|
||||||
myClassifiers[i]->ShapeType() == TopAbs_SOLID)
|
myClassifiers[0]->ShapeType() == TopAbs_SOLID)
|
||||||
{
|
{
|
||||||
centerXYZ /= elem->NbNodes();
|
centerXYZ /= elem->NbNodes();
|
||||||
|
isSatisfy = false;
|
||||||
|
for ( size_t i = 0; i < myClassifiers.size() && !isSatisfy; ++i )
|
||||||
isSatisfy = ! myClassifiers[i]->IsOut( centerXYZ );
|
isSatisfy = ! myClassifiers[i]->IsOut( centerXYZ );
|
||||||
}
|
}
|
||||||
if ( isSatisfy )
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
return isSatisfy;
|
||||||
}
|
}
|
||||||
|
|
||||||
TopAbs_ShapeEnum ElementsOnShape::TClassifier::ShapeType() const
|
TopAbs_ShapeEnum ElementsOnShape::TClassifier::ShapeType() const
|
||||||
|
@ -3340,6 +3340,7 @@ void SMESHGUI_CtrlInfo::showInfo( SMESH::SMESH_IDSource_ptr obj )
|
|||||||
// free nodes
|
// free nodes
|
||||||
computeFreeNodesInfo();
|
computeFreeNodesInfo();
|
||||||
// double nodes
|
// double nodes
|
||||||
|
if ( Max( (int)mesh->NbNodes(), (int)mesh->NbElements() ) <= ctrlLimit )
|
||||||
computeDoubleNodesInfo();
|
computeDoubleNodesInfo();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -968,13 +968,13 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh,
|
|||||||
{
|
{
|
||||||
if ( Abs( param - Un ) < 0.2 * Abs( param - theParams.back() ))
|
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() ) <
|
else if ( Abs( Un - theParams.back() ) <
|
||||||
0.2 * Abs( theParams.back() - *(--theParams.rbegin())))
|
0.2 * Abs( theParams.back() - *(++theParams.rbegin())))
|
||||||
{
|
{
|
||||||
theParams.pop_back();
|
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
|
if (theReverse) theParams.reverse(); // NPAL18025
|
||||||
@ -1170,11 +1170,14 @@ bool StdMeshers_Regular_1D::Compute(SMESH_Mesh & theMesh, const TopoDS_Shape & t
|
|||||||
}
|
}
|
||||||
if ( !_mainEdge.IsNull() ) {
|
if ( !_mainEdge.IsNull() ) {
|
||||||
// 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)
|
||||||
reversed = ( _mainEdge.Orientation() == TopAbs_REVERSED );
|
reversed = ( _mainEdge.Orientation() == TopAbs_REVERSED );
|
||||||
|
if ( !_isPropagOfDistribution ) {
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// take into account this edge reversing
|
// take into account this edge reversing
|
||||||
if ( std::find( _revEdgesIDs.begin(), _revEdgesIDs.end(), shapeID) != _revEdgesIDs.end())
|
if ( std::find( _revEdgesIDs.begin(), _revEdgesIDs.end(), shapeID) != _revEdgesIDs.end())
|
||||||
reversed = !reversed;
|
reversed = !reversed;
|
||||||
|
Loading…
Reference in New Issue
Block a user