From: eap Date: Thu, 17 Mar 2016 18:47:21 +0000 (+0300) Subject: 52976: Find Elements by Point - All does not find Ball element X-Git-Tag: V7_8_0a2~4^2~11 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4ed74ad3da0e1ddd1d6ac5891a8202e0831abcb5;p=modules%2Fsmesh.git 52976: Find Elements by Point - All does not find Ball element + minor changes in sample scripts --- diff --git a/doc/salome/examples/defining_hypotheses_ex05.py b/doc/salome/examples/defining_hypotheses_ex05.py index d2b98f1cc..204496ce0 100644 --- a/doc/salome/examples/defining_hypotheses_ex05.py +++ b/doc/salome/examples/defining_hypotheses_ex05.py @@ -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 diff --git a/doc/salome/examples/defining_hypotheses_ex07.py b/doc/salome/examples/defining_hypotheses_ex07.py index c2dc2cfb0..1630a9047 100644 --- a/doc/salome/examples/defining_hypotheses_ex07.py +++ b/doc/salome/examples/defining_hypotheses_ex07.py @@ -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 diff --git a/src/SMESHUtils/SMESH_MeshAlgos.cxx b/src/SMESHUtils/SMESH_MeshAlgos.cxx index a897decd6..985e4a7ae 100644 --- a/src/SMESHUtils/SMESH_MeshAlgos.cxx +++ b/src/SMESHUtils/SMESH_MeshAlgos.cxx @@ -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; }