\anchor hypo_quad_params_anchor
<h2>Quadrangle parameters</h2>
-<b>Quadrangle parameters</b> 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 <b>Base vertex</b>
-used as a degenerated edge.
+\image html hypo_quad_params_dialog.png "Quadrangle parameters creation/edition dialog"
+
+<b>Quadrangle parameters</b> is a hypothesis for Quadrangle (Mapping).
+
+<b>Base vertex</b> 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 <b>Quadrangle parameters</b>
-hypothesis will generate a wrong mesh. The picture below
+In this case, selection of a wrong vertex for the <b>Base vertex</b>
+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"
+<b>Type</b> parameter has sense on faces with different number of
+segments on opposite sides. The following types are available:
+
+<ul>
+<li><b>Standard</b> means the default case, triangles and quadrangles
+ are possible along the longest sides (in the refinement area).</li>
+<li><b>Triangle preference</b> forces building only triangles in the
+ refinement area for transition to higher number of segments.
+ <i>This type corresponds to <b>Triangle Preference</b> additional
+ hypothesis, which is obsolete now.</i></li>
+<li><b>Quadrangle preference</b> forces building only quadrangles for
+ transition to higher number of segments. 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).</li>
+ <i>This type corresponds to <b>Quadrangle Preference</b>
+ additional hypothesis, which is obsolete now.</i></li>
+<li><b>Quadrangle preference (reversed)</b> works like
+ <b>Quadrangle preference</b> (and with same restriction), but
+ transition is made near the sides with smaller number of
+ segments.</li>
+<li><b>Reduced</b> type forces building only quadrangles, transition
+ to other number of segments is made layer by layer. This type has
+ a limitation on number of segments: two opposite edges must have
+ the same number of segments, two another must have even difference
+ between their numbers of segments.</li>
+</ul>
+
<b>See Also</b> a sample TUI Script of a
\ref tui_quadrangle_parameters "Quadrangle Parameters" hypothesis.
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. <i>This use
+case is obsolete now. Use <b>Quadrangle Parameters</b> hypothesis with
+type <b>Quadrangle Preference</b> set instead.</i>
<br>
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).
-<h2>Triangle Preference</h2>
+<h2>Triangle Preference <i>(obsolete)</i></h2>
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.
-
+<i>This hypothesis is obsolete now. Use <b>Quadrangle Parameters</b>
+hypothesis with type <b>Triangle Preference</b> set instead.</i>
*/
\endcode
\anchor tui_quadrangle_parameters
-<h2>Quadrangle Parameters example </h2>
+<h2>Quadrangle Parameters example 1 (meshing a face with 3 edges) </h2>
\code
import geompy
import smesh
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 )
Mesh_1.Compute()
\endcode
+<h2>Quadrangle Parameters example 2 (using different types) </h2>
+\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:
<ul>