8.19.2 Functions defined in the mesh module

sweepCoords( path,origin=[0.,0.,0.],normal=0,avgdir=False,enddir=None)
Sweep a Coords object along a path, returning a series of copies.

origin and normal define the local path position and direction on the mesh.

At each point of the curve, a copy of the Coords object is created, with its origin in the curve's point, and its normal along the curve's direction. In case of a PolyLine, directions are pointing to the next point by default. If avgdir==True, average directions are taken at the intermediate points. Missing end directions can explicitely be set by enddir, and are by default taken along the last segment. If the curve is closed, endpoints are treated as any intermediate point, and the user should normally not specify enddir.

The return value is a sequence of the transformed Coords objects.

connectMesh( mesh1,mesh2,n=1,n1=None,n2=None,eltype=None)
Connect two meshes to form a hypermesh.

mesh1 and mesh2 are two meshes with same topology (shape). The two meshes are connected by a higher order mesh with n elements in the direction between the two meshes. n1 and n2 are node selection indices permitting a permutation of the nodes of the base sets in their appearance in the hypermesh. This can e.g. be used to achieve circular numbering of the hypermesh.

connectMeshSequence( ML,loop=False)

createWedgeElements( S1,S2,div=1)
Create wedge elements between to triangulated surfaces.

6-node wedge elements are created between two input surfaces (S1 and S2). The keyword div determines the number of created wedge element layers. Layers with equal thickness are created when an integer value is used for div. div can also be specified using a list, that defines the interpolation between the two surfaces. Consequently, this can be used to create layers with unequal thickness. For example, div=2 gives the same result as [0.,0.5,1.]

sweepGrid( nodes,elems,path,scale=1.,angle=0.,a1=None,a2=None)
Sweep a quadrilateral mesh along a path

The path should be specified as a (n,2,3) Formex. The input grid (quadrilaterals) has to be specified with the nodes and elems and can for example be created with the functions gridRectangle or gridBetween2Curves. This quadrilateral grid should be within the YZ-plane. The quadrilateral grid can be scaled and/or rotated along the path.

There are three options for the first (a1) / last (a2) element of the path: 1) None: No corresponding hexahedral elements 2) 'last': The direction of the first/last element of the path is used to direct the input grid at the start/end of the path 3) specify a vector: This vector is used to direct the input grid at the start/end of the path

The resulting hexahedral mesh is returned in terms of nodes and elems.