mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-26 09:20:34 +05:00
52976: Find Elements by Point - All does not find Ball element
+ minor changes in sample scripts
This commit is contained in:
parent
1a82677a35
commit
4ed74ad3da
@ -37,7 +37,7 @@ algo.NumberOfSegments(20)
|
|||||||
# assign triangulation algorithm
|
# assign triangulation algorithm
|
||||||
algo = tria_mesh.Triangle()
|
algo = tria_mesh.Triangle()
|
||||||
|
|
||||||
# apply "Max Element Area" hypothesis to each triangle
|
# assign "Max Element Area" hypothesis
|
||||||
algo.MaxElementArea(100)
|
algo.MaxElementArea(100)
|
||||||
|
|
||||||
# compute the mesh
|
# compute the mesh
|
||||||
|
@ -24,12 +24,13 @@ tria = smesh.Mesh(face1, "Face : triangle 2D mesh")
|
|||||||
|
|
||||||
# Define 1D meshing
|
# Define 1D meshing
|
||||||
algo1D = tria.Segment()
|
algo1D = tria.Segment()
|
||||||
algo1D.NumberOfSegments(2)
|
algo1D.LocalLength(3.)
|
||||||
|
|
||||||
# create and assign the algorithm for 2D meshing with triangles
|
# create and assign the algorithm for 2D meshing with triangles
|
||||||
algo2D = tria.Triangle()
|
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()
|
algo2D.LengthFromEdges()
|
||||||
|
|
||||||
# compute the mesh
|
# compute the mesh
|
||||||
|
@ -1259,7 +1259,7 @@ bool SMESH_MeshAlgos::IsOut( const SMDS_MeshElement* element, const gp_Pnt& poin
|
|||||||
// Node or 0D element -------------------------------------------------------------------------
|
// Node or 0D element -------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
gp_Vec n2p ( xyz[0], point );
|
gp_Vec n2p ( xyz[0], point );
|
||||||
return n2p.SquareMagnitude() <= tol * tol;
|
return n2p.SquareMagnitude() > tol * tol;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user