mymesh.primitives#

Mesh generation for pre-defined shapes

Shapes#

Line(pt1, pt2[, h, n])

Generate a mesh of a straight line between two points

Box(bounds, h[, ElemType])

Generate a surface mesh of a rectangular box.

Grid(bounds, h[, exact_h, ElemType])

Generate a 3D rectangular grid mesh.

Grid2D(bounds, h[, z, exact_h, ElemType])

Generate a rectangular grid mesh.

Plane(pt, normal, bounds, h[, exact_h, ElemType])

Generate a 2D grid oriented on a plane

Circle(center, radius[, theta_resolution, ...])

Construct a circle from a center and radius.

CirclePt(center, point[, theta_resolution, ...])

Construct a circle from a center and point.

Cylinder(center, radius, height[, ...])

Generate an axis-aligned cylindrical mesh

Sphere(center, radius[, theta_resolution, ...])

Generate a sphere (or ellipsoid) The total number of points will be phi_resolution*(theta_resolution-2) + 2

Torus(center, R, r[, axis, ...])

Generate a torus The total number of points will be phi_resolution*(theta_resolution-2) + 2

2D to 3D Constructions#

Extrude(m, distance, step[, axis, twist, ...])

Extrude a 2D mesh to a 3D surface or volume

Revolve(m, angle, anglestep[, center, ...])

Revolve a 2D mesh to a 3D surface or volume