6 ============================
7 Extrude and Join Quadrangles
8 ============================
10 There are two different methods to build hexahedra from quadrangles:
12 - Extrusion of quadrangles
13 - Join two sets of quadrangles
17 Extrude a quadrangle or quadrangles
18 ===================================
20 .. _tuiextrudequadssimple:
25 To extrude one quad or a set of quads the following data are required:
27 - *quad* : the quad to be extruded (for one quad extrusion).
28 - *quads* : the list of quadrangles to be extruded (for multiple quads extrusion).
29 - *nbLayers*: the number of layers of hexahedra resulting from the extrusion.
33 elts = doc.extrudeQuadTop(quad, nbLayers)
35 Extrusion of a set of quads::
37 elts = doc.extrudeQuadsTop(quads, nbLayers)
40 GUI command: :ref:`guiextrudequadssimple`
43 .. _tuiextrudequadsuniform:
48 The following data are required:
50 - *quad* : the quad to be extruded (for one quad extrusion).
51 - *quads* : the list of quadrangles to be extruded (for multiple quads extrusion).
52 - *dir* : the direction of the extrusion.
53 - *length* : the length of hexahedra resulting from the extrusion.
54 - *nbLayers*: the number of layers of hexahedra resulting from the extrusion.
58 elts = doc.extrudeQuadUni(quad, dir, length, nbLayers)
60 Extrusion of a set of quads::
62 elts = doc.extrudeQuadsUni(quads, dir, length, nbLayers)
65 GUI command: :ref:`guiextrudequadsuniform`
68 .. _tuiextrudequadscustom:
73 The following data are required:
75 - *quad* : the quad to be extruded (for one quad extrusion).
76 - *quads*: the list of quadrangles to be extruded (for multiple quads extrusion).
77 - *dir* : the direction of the extrusion.
78 - *th* : a list of heights (in ascendant order because the size is computed from the origin) to specify the size of each layer of extrusion.
82 elts = doc.extrudeQuad(quad, dir, th)
84 Extrusion of a set of quads::
86 elts = doc.extrudeQuads(quads, dir, th)
89 GUI command: :ref:`guiextrudequadscustom`
91 Operations on *elts*: :ref:`tuielements2`
97 .. literalinclude:: test_doc/extrudeQuad/extrude_quad.py
104 Join quadrangle or quadrangles
105 ==============================
107 .. _tuijoinquadsuniform:
112 The following data are required:
114 - *quad* : the quad to be joined and from which hexahedra will be created (one quad case).
115 - *quads* : the set of quadrangles to be joined and from which hexahedra will be created (multiple quad case).
116 - *fromPointA*: a vertex belonging to the first quadrangle of the set of quadrangles.
117 - *fromPointB*: a vertex, consecutive to previous Point a, belonging to the first quadrangle.
119 - *quadDest* : a quadrangle from the set of targeted quadrangles.
120 - *toPointA* : the target vertex (in the target quadrangle) for *fromPointA*.
121 - *toPointB* : the target vertex (in the target quadrangle) for *fromPointB*.
123 - *nbLayers* : number of layers of hexahedra issued from the operation.
125 To join one quad to an other use the function **joinQuadUni**::
127 elts = doc.joinQuadUni(quad, quadDest, fromPointA, fromPointB, toPointA, toPointB, nbLayers)
129 To join a set of quads to another quad use the function **joinQuadsUni**::
131 elts = doc.joinQuadsUni(quads, quadDest, fromPointA, fromPointB, toPointA, toPointB, nbLayers)
133 GUI command: :ref:`guijoinquadsuniform`
136 .. _tuijoinquadscustom:
141 The following data are required:
143 - *quad* : the quad to be joined and from which hexahedra will be created (one quad case).
144 - *quads* : the set of quadrangles to be joined and from which hexahedra will be created (multiple quads case).
145 - *fromPointA*: a vertex belonging to the first quadrangle of the set of quadrangles.
146 - *fromPointB*: a vertex, consecutive to previous Point a, belonging to the first quadrangle.
148 - *quadDest* : a quadrangle from the set of targeted quadrangles.
149 - *toPointA* : the target vertex (in the target quadrangle) for *fromPointA*.
150 - *toPointB* : the target vertex (in the target quadrangle) for *fromPointB*.
152 - *th* : a list of heights to specify the size of each layer of hexahedra issued from the operation.
154 To make a custom join of one quad to another use the function **joinQuad**::
156 elts = doc.joinQuad(quad, quadDest, fromPointA, fromPointB, toPointA, toPointB, th)
158 To make a custom join of a set of quads to another quad use the function **joinQuads**::
160 elts = doc.joinQuads(quads, quadDest, fromPointA, fromPointB, toPointA, toPointB, th)
162 GUI command: :ref:`guijoinquadscustom`
164 Operations on *elts*: :ref:`tuielements2`
170 .. literalinclude:: test_doc/joinQuad/join_quad.py