Salome HOME
52976: Find Elements by Point - All does not find Ball element
authoreap <eap@opencascade.com>
Thu, 17 Mar 2016 18:47:21 +0000 (21:47 +0300)
committereap <eap@opencascade.com>
Thu, 17 Mar 2016 18:47:21 +0000 (21:47 +0300)
+ minor changes in sample scripts

doc/salome/examples/defining_hypotheses_ex05.py
doc/salome/examples/defining_hypotheses_ex07.py
src/SMESHUtils/SMESH_MeshAlgos.cxx

index d2b98f1cc695fbed5ab83aff66c6e793bf1e403b..204496ce039b7803cfda6d7611052b4ce996b094 100644 (file)
@@ -37,7 +37,7 @@ algo.NumberOfSegments(20)
 # assign triangulation algorithm
 algo = tria_mesh.Triangle()
 
-# apply "Max Element Area" hypothesis to each triangle
+# assign "Max Element Area" hypothesis
 algo.MaxElementArea(100)
 
 # compute the mesh
index c2dc2cfb080f4c8c935de053f65422220e92216b..1630a9047e757f61e3c2b606c565c7de857f12f9 100644 (file)
@@ -24,12 +24,13 @@ tria = smesh.Mesh(face1, "Face : triangle 2D mesh")
 
 # Define 1D meshing
 algo1D = tria.Segment()
-algo1D.NumberOfSegments(2)
+algo1D.LocalLength(3.)
 
 # create and assign the algorithm for 2D meshing with triangles
 algo2D = tria.Triangle()
 
-# create and assign "LengthFromEdges" hypothesis to build triangles based on the length of the edges taken from the wire
+# create and assign "LengthFromEdges" hypothesis to build triangles with
+# linear size close to the length of the segments generated on the face wires (3.)
 algo2D.LengthFromEdges()
 
 # compute the mesh
index a897decd65c3ec05780c8b345736a69277861033..985e4a7ae8690b1726d59a710a50ceba2bae9401 100644 (file)
@@ -1259,7 +1259,7 @@ bool SMESH_MeshAlgos::IsOut( const SMDS_MeshElement* element, const gp_Pnt& poin
   // Node or 0D element -------------------------------------------------------------------------
   {
     gp_Vec n2p ( xyz[0], point );
-    return n2p.SquareMagnitude() <= tol * tol;
+    return n2p.SquareMagnitude() > tol * tol;
   }
   return true;
 }