From: eap Date: Mon, 11 Nov 2013 11:07:44 +0000 (+0000) Subject: 22355: EDF SMESH: New 1D hypothesis "Adaptive" X-Git-Tag: V7_3_0a1~83 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7b33bc39fd54725e6444d8814129c6fffd826617;p=modules%2Fsmesh.git 22355: EDF SMESH: New 1D hypothesis "Adaptive" --- diff --git a/doc/salome/examples/CMakeLists.txt b/doc/salome/examples/CMakeLists.txt index d8c4631f8..aefec539d 100644 --- a/doc/salome/examples/CMakeLists.txt +++ b/doc/salome/examples/CMakeLists.txt @@ -63,6 +63,7 @@ SET(GOOD_TESTS defining_hypotheses_ex14.py defining_hypotheses_ex15.py defining_hypotheses_ex16.py + defining_hypotheses_adaptive1d.py filters_ex01.py filters_ex03.py filters_ex04.py diff --git a/doc/salome/examples/defining_hypotheses_adaptive1d.py b/doc/salome/examples/defining_hypotheses_adaptive1d.py new file mode 100644 index 000000000..f53434a85 --- /dev/null +++ b/doc/salome/examples/defining_hypotheses_adaptive1d.py @@ -0,0 +1,30 @@ +import salome, math +salome.salome_init() +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) +from salome.smesh import smeshBuilder +smesh = smeshBuilder.New(salome.myStudy) + + +box = geompy.MakeBoxDXDYDZ( 100, 100, 100 ) +tool = geompy.MakeTranslation( box, 50, 0, 10 ) +axis = geompy.MakeVector( geompy.MakeVertex( 100, 0, 100 ),geompy.MakeVertex( 100, 10, 100 ),) +tool = geompy.Rotate( tool, axis, math.pi * 25 / 180. ) +shape = geompy.MakeCut( box, tool ) +cyl = geompy.MakeCylinder( geompy.MakeVertex( -10,5, 95 ), geompy.MakeVectorDXDYDZ(1,0,0), 2, 90) +shape = geompy.MakeCut( shape, cyl ) +tool = geompy.MakeBoxTwoPnt( geompy.MakeVertex( -10, 2, 15 ), geompy.MakeVertex( 90, 5, 16 )) +shape = geompy.MakeCut( shape, tool, theName="shape" ) + +# Parameters of Adaptive hypothesis. minSize and maxSize are such that they do not limit +# size of segments because size of geometrical features lies within [2.-100.] range, hence +# size of segments is defined by deflection parameter and size of geometrical features only. +minSize = 0.1 +maxSize = 200 +deflection = 0.05 + +mesh = smesh.Mesh( shape ) +mesh.Segment().Adaptive( minSize, maxSize, deflection ) +mesh.Triangle( smeshBuilder.NETGEN_2D ) +mesh.Compute() + diff --git a/doc/salome/gui/SMESH/images/adaptive1d.png b/doc/salome/gui/SMESH/images/adaptive1d.png new file mode 100644 index 000000000..8091c8d0e Binary files /dev/null and b/doc/salome/gui/SMESH/images/adaptive1d.png differ diff --git a/doc/salome/gui/SMESH/images/adaptive1d_sample_mesh.png b/doc/salome/gui/SMESH/images/adaptive1d_sample_mesh.png new file mode 100644 index 000000000..034207f2c Binary files /dev/null and b/doc/salome/gui/SMESH/images/adaptive1d_sample_mesh.png differ diff --git a/doc/salome/gui/SMESH/input/1d_meshing_hypo.doc b/doc/salome/gui/SMESH/input/1d_meshing_hypo.doc index 367a0d0b5..5deb1344a 100644 --- a/doc/salome/gui/SMESH/input/1d_meshing_hypo.doc +++ b/doc/salome/gui/SMESH/input/1d_meshing_hypo.doc @@ -4,6 +4,7 @@
+
+\anchor adaptive_1d_anchor +

Adaptive hypothesis

+ +Adaptive hypothesis allows to split edges into segments with a +length that depends on curvature of edges and faces and is limited +from up and down. In addition length of a segment depends on lengths +of adjacent segments (that can't differ more than twice) and on +distance to close geometrical entities (edges and faces) to avoid +creation of narrow 2D elements. + +\image html adaptive1d.png + +Min size parameter limits minimal segment size. Max size +parameter defines length of segments on stright edges. \b Deflection +parameter gives maximal distance of a segment from a curved edge. + +\image html adaptive1d_sample_mesh.png "A geometry and a mesh generated on this geometry using Adaptive hypothesis and Netgen 2D algorithm - the size of mesh segments reflects size of geometrical features" + +See Also a \ref tui_1d_adaptive "sample TUI Script" that +creates the mesh of the above image. +
\anchor arithmetic_1d_anchor

Arithmetic 1D hypothesis

@@ -26,7 +49,7 @@ The direction of the splitting is defined by the orientation of the underlying g "Reverse Edges" list box allows to specify the edges for which the splitting should be made in the direction opposing to their orientation. This list box is enabled only if the geometry object is selected for the meshing. In this case the user can select edges to be reversed either directly -picking them in the 3D viewer or by selecting the edges or groups of edges in the Object browser. +picking them in the 3D viewer or by selecting the edges or groups of edges in the Object Browser. \image html a-arithmetic1d.png @@ -117,7 +140,7 @@ The direction of the splitting is defined by the orientation of the underlying g "Reverse Edges" list box allows to specify the edges for which the splitting should be made in the direction opposing to their orientation. This list box is enabled only if the geometry object is selected for the meshing. In this case the user can select edges to be reversed either directly -picking them in the 3D viewer or by selecting the edges or groups of edges in the Object browser. +picking them in the 3D viewer or by selecting the edges or groups of edges in the Object Browser. \image html image46.gif @@ -166,7 +189,7 @@ The direction of the splitting is defined by the orientation of the underlying g "Reverse Edges" list box allows to specify the edges for which the splitting should be made in the direction opposing to their orientation. This list box is enabled only if the geometry object is selected for the meshing. In this case the user can select edges to be reversed either directly -picking them in the 3D viewer or by selecting the edges or groups of edges in the Object browser. +picking them in the 3D viewer or by selecting the edges or groups of edges in the Object Browser. \image html a-startendlength.png @@ -215,7 +238,7 @@ direction opposite to their orientation. This list box is enabled only if the geometrical object is selected for meshing. In this case it is possible to select the edges to be reversed either directly picking them in the 3D viewer or selecting the edges or groups of edges in the -Object browser. +Object Browser. \image html mesh_fixedpnt.png "Example of a submesh on the edge built using Fixed points 1D hypothesis" diff --git a/doc/salome/gui/SMESH/input/about_hypo.doc b/doc/salome/gui/SMESH/input/about_hypo.doc index e4bf36ca0..09768cc7c 100644 --- a/doc/salome/gui/SMESH/input/about_hypo.doc +++ b/doc/salome/gui/SMESH/input/about_hypo.doc @@ -3,8 +3,8 @@ \page about_hypo_page About Hypotheses \b Hypotheses represent boundary conditions which will be taken into -account at calculations of meshes or sub-meshes basing on geometrical -objects. These hypotheses allow you to manage the level of detail of +account at calculations of meshes or sub-meshes. +These hypotheses allow you to manage the level of detail of the resulting meshes or sub-meshes: when applying different hypotheses with different parameters you can preset the quantity or size of elements which will compose your mesh. So, it will be possible to @@ -15,12 +15,13 @@ In \b MESH there are the following Basic Hypotheses:
  • \subpage a1d_meshing_hypo_page "1D Hypotheses" (for meshing of edges):
  • \subpage a2d_meshing_hypo_page "2D Hypotheses" (for meshing of faces):
  • diff --git a/doc/salome/gui/SMESH/input/tui_defining_hypotheses.doc b/doc/salome/gui/SMESH/input/tui_defining_hypotheses.doc index 71abf33b6..333017d77 100644 --- a/doc/salome/gui/SMESH/input/tui_defining_hypotheses.doc +++ b/doc/salome/gui/SMESH/input/tui_defining_hypotheses.doc @@ -7,6 +7,7 @@ This page provides example codes of \ref tui_defining_meshing_algos