mymesh.primitives.Plane#

mymesh.primitives.Plane(pt, normal, bounds, h, exact_h=False, ElemType='quad')[source]#

Generate a 2D grid oriented on a plane

Parameters:
  • pt (list, np.ndarray) – Coordinates (x,y,z) of a point on the plane

  • normal (list, np.ndarray) – Normal vector of the plane

  • bounds (list) – Six element list, [xmin,xmax,ymin,ymax,zmin,zmax].

  • h (float) – Element size.

  • exact_h (bool, optional) – If true, will make a mesh where the element size is exactly equal to what is specified, but the upper bounds may vary slightly. Otherwise, the bounds will be strictly enforced, but element size may deviate from the specified h. This may result in non-square elements. By default False.

  • ElemType (str, optional) – Specify the element type of the grid mesh. This can either be ‘quad’ for a quadrilateral mesh or ‘tri’ for a triangular mesh, by default ‘quad’.

Returns:

plane – Mesh object containing the plane mesh.

Return type:

mymesh.mesh

Note

Due to the ability to unpack the mesh object to NodeCoords and NodeConn, the NodeCoords and NodeConn array can be returned directly (instead of the mesh object) by running: NodeCoords, NodeConn = primitives.Extrude(...)