From: jfa Date: Wed, 13 Oct 2010 09:24:25 +0000 (+0000) Subject: Docs for Mantis issue 0020834: EDF 1362 SMESH : Add a 2D quadrangle mesher of reduced... X-Git-Tag: V5_1_5rc1~36 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=afac1ba0e1f40995cc418f546593715b7f77ecf5;p=modules%2Fsmesh.git Docs for Mantis issue 0020834: EDF 1362 SMESH : Add a 2D quadrangle mesher of reduced type. --- diff --git a/doc/salome/gui/SMESH/images/hypo_quad_params_dialog.png b/doc/salome/gui/SMESH/images/hypo_quad_params_dialog.png new file mode 100644 index 000000000..3cd442a8d Binary files /dev/null and b/doc/salome/gui/SMESH/images/hypo_quad_params_dialog.png differ diff --git a/doc/salome/gui/SMESH/input/2d_meshing_hypo.doc b/doc/salome/gui/SMESH/input/2d_meshing_hypo.doc index 892cc9f74..07a33f09c 100644 --- a/doc/salome/gui/SMESH/input/2d_meshing_hypo.doc +++ b/doc/salome/gui/SMESH/input/2d_meshing_hypo.doc @@ -43,27 +43,58 @@ length calculated as an average edge length for a given wire. \anchor hypo_quad_params_anchor

Quadrangle parameters

-Quadrangle parameters is a hypothesis for -Quadrangle (Mapping), which allows using this algorithm for meshing of -triangular faces.In this case it is necessary to select the Base vertex -used as a degenerated edge. +\image html hypo_quad_params_dialog.png "Quadrangle parameters creation/edition dialog" + +Quadrangle parameters is a hypothesis for Quadrangle (Mapping). + +Base vertex parameter allows using Quadrangle (Mapping) +algorithm for meshing of triangular faces. In this case it is +necessary to select a vertex, which will be used as the fourth edge +(degenerated). \image html hypo_quad_params_1.png "A face built from 3 edges" \image html hypo_quad_params_res.png "The resulting mesh" -This hypothesis can be also used to mesh a segment of a circular face. -Please, consider that there is a limitation on the selectiion of the degenerated +This parameter can be also used to mesh a segment of a circular face. +Please, consider that there is a limitation on the selection of the vertex for the faces built with the angle > 180 degrees (see the picture). \image html hypo_quad_params_2.png "3/4 of a circular face" -In this case, selection of a wrong vertex for the Quadrangle parameters -hypothesis will generate a wrong mesh. The picture below +In this case, selection of a wrong vertex for the Base vertex +parameter will generate a wrong mesh. The picture below shows the good (left) and the bad (right) results of meshing. \image html hypo_quad_params_res_2.png "The resulting meshes" +Type parameter has sense on faces with different number of +segments on opposite sides. The following types are available: + + + See Also a sample TUI Script of a \ref tui_quadrangle_parameters "Quadrangle Parameters" hypothesis. diff --git a/doc/salome/gui/SMESH/input/additional_hypo.doc b/doc/salome/gui/SMESH/input/additional_hypo.doc index 1205e19b0..81eab0be8 100644 --- a/doc/salome/gui/SMESH/input/additional_hypo.doc +++ b/doc/salome/gui/SMESH/input/additional_hypo.doc @@ -41,17 +41,20 @@ It allows Netgen 2D to build quadrangular meshes at any conditions. It allows Quadrangle (Mapping) to build quadrangular meshes even if the number of nodes at the opposite edges of a meshed face is not equal, -otherwise this mesh will contain some triangular elements. +otherwise this mesh will contain some triangular elements. This use +case is obsolete now. Use Quadrangle Parameters hypothesis with +type Quadrangle Preference set instead.
This hypothesis has one restriction on its work: the total quantity of segments on all four sides of the face must be even (divisible by 2). -

Triangle Preference

+

Triangle Preference (obsolete)

This additional hypothesis can be used only together with Quadrangle (Mapping) algorithm. It allows to build triangular mesh faces in the refinement area if the number of nodes at the opposite edges of a meshed face is not equal, otherwise refinement area will contain some quadrangular elements. - +This hypothesis is obsolete now. Use Quadrangle Parameters +hypothesis with type Triangle Preference set instead. */ diff --git a/doc/salome/gui/SMESH/input/tui_defining_hypotheses.doc b/doc/salome/gui/SMESH/input/tui_defining_hypotheses.doc index a034c2b1b..9932991f8 100644 --- a/doc/salome/gui/SMESH/input/tui_defining_hypotheses.doc +++ b/doc/salome/gui/SMESH/input/tui_defining_hypotheses.doc @@ -549,7 +549,7 @@ mesh.Compute() \endcode \anchor tui_quadrangle_parameters -

Quadrangle Parameters example

+

Quadrangle Parameters example 1 (meshing a face with 3 edges)

\code import geompy import smesh @@ -570,7 +570,7 @@ Mesh_1 = smesh.Mesh(Common_1) Quadrangle_Parameters_1 = smesh.CreateHypothesis('QuadrangleParams') Quadrangle_Parameters_1.SetTriaVertex( 8 ) -# Define 1D hypothesis and cmpute the mesh +# Define 1D hypothesis and compute the mesh Regular_1D = Mesh_1.Segment() Nb_Segments_1 = Regular_1D.NumberOfSegments(10) Nb_Segments_1.SetDistrType( 0 ) @@ -579,6 +579,56 @@ Quadrangle_2D = Mesh_1.Quadrangle() Mesh_1.Compute() \endcode +

Quadrangle Parameters example 2 (using different types)

+\code +import geompy +import smesh +import StdMeshers + +# Make quadrangle face and explode it on edges. +Vertex_1 = geompy.MakeVertex(0, 0, 0) +Vertex_2 = geompy.MakeVertex(40, 0, 0) +Vertex_3 = geompy.MakeVertex(40, 30, 0) +Vertex_4 = geompy.MakeVertex(0, 30, 0) +Quadrangle_Face_1 = geompy.MakeQuad4Vertices(Vertex_1, Vertex_4, Vertex_3, Vertex_2) +[Edge_1,Edge_2,Edge_3,Edge_4] = geompy.SubShapeAllSorted(Quadrangle_Face_1, geompy.ShapeType["EDGE"]) +geompy.addToStudy( Vertex_1, "Vertex_1" ) +geompy.addToStudy( Vertex_2, "Vertex_2" ) +geompy.addToStudy( Vertex_3, "Vertex_3" ) +geompy.addToStudy( Vertex_4, "Vertex_4" ) +geompy.addToStudy( Quadrangle_Face_1, "Quadrangle Face_1" ) +geompy.addToStudyInFather( Quadrangle_Face_1, Edge_2, "Edge_2" ) + +# Set the Geometry for meshing +Mesh_1 = smesh.Mesh(Quadrangle_Face_1) + +# Create Quadrangle parameters and +# define the Type as Quadrangle Preference +Quadrangle_Parameters_1 = smesh.CreateHypothesis('QuadrangleParams') +Quadrangle_Parameters_1.SetQuadType( StdMeshers.QUAD_QUADRANGLE_PREF ) + +# Define other hypotheses and algorithms +Regular_1D = Mesh_1.Segment() +Nb_Segments_1 = Regular_1D.NumberOfSegments(4) +Nb_Segments_1.SetDistrType( 0 ) +status = Mesh_1.AddHypothesis(Quadrangle_Parameters_1) +Quadrangle_2D = Mesh_1.Quadrangle() + +# Define submesh on one edge to provide different number of segments +Regular_1D_1 = Mesh_1.Segment(geom=Edge_2) +Nb_Segments_2 = Regular_1D_1.NumberOfSegments(10) +Nb_Segments_2.SetDistrType( 0 ) +SubMesh_1 = Regular_1D_1.GetSubMesh() + +# Compute mesh (with Quadrangle Preference type) +isDone = Mesh_1.Compute() + +# Change type to Reduced and compute again +Quadrangle_Parameters_1.SetQuadType( StdMeshers.QUAD_REDUCED ) +isDone = Mesh_1.Compute() +\endcode + + \n Other meshing algorithms: