Salome HOME
NPAL14419 IMP: a filter predicate to find nodes/elements lying on any
authoreap <eap@opencascade.com>
Fri, 29 Dec 2006 11:04:52 +0000 (11:04 +0000)
committereap <eap@opencascade.com>
Fri, 29 Dec 2006 11:04:52 +0000 (11:04 +0000)
kind of geom surface needed
        in ElementsOnSurface, clear IDs if parameters change

src/Controls/SMESH_Controls.cxx

index 9ef5d00f57f64b3a7f7762791aa3926106882723..338519c3b73289fe70748324b89c6890d08c6a89 100644 (file)
@@ -2554,22 +2554,27 @@ SMDSAbs_ElementType ElementsOnSurface::GetType() const
 { return myType; }
 
 void ElementsOnSurface::SetTolerance( const double theToler )
-{ myToler = theToler; }
+{
+  if ( myToler != theToler )
+    myIds.Clear();
+  myToler = theToler;
+}
 
 double ElementsOnSurface::GetTolerance() const
 { return myToler; }
 
 void ElementsOnSurface::SetUseBoundaries( bool theUse )
 {
-  bool diff = ( myUseBoundaries != theUse );
-  myUseBoundaries = theUse;
-  if ( diff )
+  if ( myUseBoundaries != theUse ) {
+    myUseBoundaries = theUse;
     SetSurface( mySurf, myType );
+  }
 }
 
 void ElementsOnSurface::SetSurface( const TopoDS_Shape& theShape,
                                     const SMDSAbs_ElementType theType )
 {
+  myIds.Clear();
   myType = theType;
   mySurf.Nullify();
   if ( theShape.IsNull() || theShape.ShapeType() != TopAbs_FACE )