Salome HOME
Quality Info: tolerance change does not influence on Nb double nodes
[modules/smesh.git] / src / Controls / SMESH_Controls.cxx
index a6fa8eead63326fec7116eb71a35ca58fb24c728..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 );
@@ -4642,17 +4651,15 @@ void ElementsOnShape::Classifier::Init( const TopoDS_Shape& theShape,
     else
     {
       Bnd_Box box;
-      BRepBndLib::Add( myShape, box );
       if ( myShape.ShapeType() == TopAbs_FACE )
       {
         BRepAdaptor_Surface SA( TopoDS::Face( myShape ), /*useBoundaries=*/false );
         if ( SA.GetType() == GeomAbs_BSplineSurface )
-        {
-          box.SetVoid();
           BRepBndLib::AddOptimal( myShape, box,
                                   /*useTriangulation=*/true, /*useShapeTolerance=*/true );
-        }
       }
+      if ( box.IsVoid() )
+        BRepBndLib::Add( myShape, box );
       myBox.Clear();
       myBox.Add( box.CornerMin() );
       myBox.Add( box.CornerMax() );
@@ -4899,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 )
@@ -5075,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 )