Built-in Engine

The default Gmsh kernel with basic geometry construction functions. For advanced geometries it is recommended to use the openCASCADE kernel.

Geometry

class pygmsh.geo.geometry.Circle(x0, radius, R, compound, num_sections, holes, curve_loop, plane_surface, mesh_size=None)

Bases: object

class pygmsh.geo.geometry.Geometry(init_argv=None)

Bases: pygmsh.common.geometry.CommonGeometry

add_ball(x0, radius, **kwargs)
add_box(x0, x1, y0, y1, z0, z1, mesh_size=None, with_volume=True, holes=None)
add_circle(x0, radius, mesh_size=None, R=None, compound=False, num_sections=3, holes=None, make_surface=True)

Add circle in the \(x\)-\(y\)-plane.

add_ellipsoid(x0, radii, mesh_size=None, with_volume=True, holes=None)

Creates an ellipsoid with radii around a given midpoint \(x_0\).

add_pipe(outer_radius, inner_radius, length, R=array([[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]]), x0=array([0.0, 0.0, 0.0]), mesh_size=None, variant='rectangle_rotation')
add_rectangle(xmin, xmax, ymin, ymax, z, mesh_size=None, holes=None, make_surface=True)
add_torus(irad, orad, mesh_size=None, R=array([[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]]), x0=array([0.0, 0.0, 0.0]), variant='extrude_lines')
in_surface(input_entity, surface)

Embed the point(s) or curve(s) in the given surface. The surface mesh will conform to the mesh of the point(s) or curves(s).

in_volume(input_entity, volume)

Embed the point(s)/curve(s)/surface(s) in the given volume. The volume mesh will conform to the mesh of the input entities.

revolve(*args, **kwargs)
twist(input_entity, translation_axis, rotation_axis, point_on_axis, angle, num_layers=None, heights=None, recombine=False)

Twist (translation + rotation) of any entity along a given translation_axis, around a given rotation_axis, about a given angle.