Salome HOME
Quality Info: tolerance change does not influence on Nb double nodes
authoreap <eap@opencascade.com>
Tue, 9 Apr 2019 16:11:56 +0000 (19:11 +0300)
committereap <eap@opencascade.com>
Tue, 9 Apr 2019 16:11:56 +0000 (19:11 +0300)
src/Controls/SMESH_Controls.cxx
src/Controls/SMESH_ControlsDef.hxx
src/SMESHGUI/SMESHGUI_MeshInfo.cxx

index c40f590a4fed869fa867f32befd168cb20606039..06c40dae2ad9c8b21d5ec8098df9528899d990c8 100644 (file)
@@ -2436,6 +2436,15 @@ SMDSAbs_ElementType CoincidentNodes::GetType() const
   return SMDSAbs_Node;
 }
 
+void CoincidentNodes::SetTolerance( const double theToler )
+{
+  if ( myToler != theToler )
+  {
+    SetMesh(0);
+    myToler = theToler;
+  }
+}
+
 void CoincidentNodes::SetMesh( const SMDS_Mesh* theMesh )
 {
   myMeshModifTracer.SetMesh( theMesh );
@@ -4897,6 +4906,8 @@ void BelongToGeom::SetMesh( const SMDS_Mesh* theMesh )
     myMeshDS = dynamic_cast<const SMESHDS_Mesh*>(theMesh);
     init();
   }
+  if ( myElementsOnShapePtr )
+    myElementsOnShapePtr->SetMesh( myMeshDS );
 }
 
 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);
     init();
   }
+  if ( myElementsOnShapePtr )
+    myElementsOnShapePtr->SetMesh( myMeshDS );
 }
 
 void LyingOnGeom::SetGeom( const TopoDS_Shape& theShape )
index 1d412b4ba032c3ba9b8762a8d20e0c38b7cf11a4..907157598c1f78aae0510a8411375546a586bf78 100644 (file)
@@ -419,7 +419,7 @@ namespace SMESH{
       virtual bool IsSatisfy( long theElementId );
       virtual SMDSAbs_ElementType GetType() const;
 
-      void SetTolerance (const double theToler)  { myToler = theToler; }
+      void SetTolerance (const double theToler);
       double GetTolerance () const { return myToler; }
 
     private:
@@ -819,7 +819,7 @@ namespace SMESH{
       ~ManifoldPart();
       //virtual Predicate* clone() const { return new ManifoldPart( *this ); }
       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      SMDSAbs_ElementType GetType() const;
 
index 57b1c9343725927976d4a079f6b430a2e79d6ee4..fc5ac8b734201afe9f1f53bd999c602df9598138 100644 (file)
@@ -3911,9 +3911,15 @@ void SMESHGUI_CtrlInfo::clearInternal()
 
 void SMESHGUI_CtrlInfo::setTolerance( double theTolerance )
 {
-  //SMESH::long_array_var anElems = getElementsByType( SMESH::NODE );
-  myButtons[1]->setEnabled( true );
-  myWidgets[2]->setText("");
+  myButtons[2]->setEnabled( true );
+  myWidgets[3]->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