Quality Info: tolerance change does not influence on Nb double nodes

This commit is contained in:
eap 2019-04-09 19:11:56 +03:00
parent 8a0ae20732
commit b8917880e4
3 changed files with 24 additions and 5 deletions

View File

@ -2436,6 +2436,15 @@ SMDSAbs_ElementType CoincidentNodes::GetType() const
return SMDSAbs_Node; return SMDSAbs_Node;
} }
void CoincidentNodes::SetTolerance( const double theToler )
{
if ( myToler != theToler )
{
SetMesh(0);
myToler = theToler;
}
}
void CoincidentNodes::SetMesh( const SMDS_Mesh* theMesh ) void CoincidentNodes::SetMesh( const SMDS_Mesh* theMesh )
{ {
myMeshModifTracer.SetMesh( theMesh ); myMeshModifTracer.SetMesh( theMesh );
@ -4897,6 +4906,8 @@ void BelongToGeom::SetMesh( const SMDS_Mesh* theMesh )
myMeshDS = dynamic_cast<const SMESHDS_Mesh*>(theMesh); myMeshDS = dynamic_cast<const SMESHDS_Mesh*>(theMesh);
init(); init();
} }
if ( myElementsOnShapePtr )
myElementsOnShapePtr->SetMesh( myMeshDS );
} }
void BelongToGeom::SetGeom( const TopoDS_Shape& theShape ) void BelongToGeom::SetGeom( const TopoDS_Shape& theShape )
@ -5073,6 +5084,8 @@ void LyingOnGeom::SetMesh( const SMDS_Mesh* theMesh )
myMeshDS = dynamic_cast<const SMESHDS_Mesh*>(theMesh); myMeshDS = dynamic_cast<const SMESHDS_Mesh*>(theMesh);
init(); init();
} }
if ( myElementsOnShapePtr )
myElementsOnShapePtr->SetMesh( myMeshDS );
} }
void LyingOnGeom::SetGeom( const TopoDS_Shape& theShape ) void LyingOnGeom::SetGeom( const TopoDS_Shape& theShape )

View File

@ -419,7 +419,7 @@ namespace SMESH{
virtual bool IsSatisfy( long theElementId ); virtual bool IsSatisfy( long theElementId );
virtual SMDSAbs_ElementType GetType() const; virtual SMDSAbs_ElementType GetType() const;
void SetTolerance (const double theToler) { myToler = theToler; } void SetTolerance (const double theToler);
double GetTolerance () const { return myToler; } double GetTolerance () const { return myToler; }
private: private:
@ -819,7 +819,7 @@ namespace SMESH{
~ManifoldPart(); ~ManifoldPart();
//virtual Predicate* clone() const { return new ManifoldPart( *this ); } //virtual Predicate* clone() const { return new ManifoldPart( *this ); }
virtual void SetMesh( const SMDS_Mesh* theMesh ); virtual void SetMesh( const SMDS_Mesh* theMesh );
// inoke when all parameters already set // invoke when all parameters already set
virtual bool IsSatisfy( long theElementId ); virtual bool IsSatisfy( long theElementId );
virtual SMDSAbs_ElementType GetType() const; virtual SMDSAbs_ElementType GetType() const;

View File

@ -3911,9 +3911,15 @@ void SMESHGUI_CtrlInfo::clearInternal()
void SMESHGUI_CtrlInfo::setTolerance( double theTolerance ) void SMESHGUI_CtrlInfo::setTolerance( double theTolerance )
{ {
//SMESH::long_array_var anElems = getElementsByType( SMESH::NODE ); myButtons[2]->setEnabled( true );
myButtons[1]->setEnabled( true ); myWidgets[3]->setText("");
myWidgets[2]->setText(""); for ( int i = 0; i < myPredicates.count(); ++i )
if ( myPredicates[i]->GetFunctorType() == SMESH::FT_EqualNodes )
{
SMESH::EqualNodes_var functor = SMESH::EqualNodes::_narrow( myPredicates[i] );
if ( !functor->_is_nil() )
functor->SetTolerance( theTolerance );
}
} }
#ifndef DISABLE_PLOT2DVIEWER #ifndef DISABLE_PLOT2DVIEWER