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: List[float], radius: float, R, compound, num_sections: int, holes, curve_loop, plane_surface, mesh_size: Optional[float] = None)¶
Bases:
object
- class pygmsh.geo.geometry.Geometry(init_argv=None)¶
Bases:
pygmsh.common.geometry.CommonGeometry
- add_ball(x0: List[float], radius: float, **kwargs)¶
- add_box(x0: float, x1: float, y0: float, y1: float, z0: float, z1: float, mesh_size: Optional[float] = None, with_volume: bool = True, holes=None)¶
- add_circle(x0: List[float], radius: float, mesh_size: Optional[float] = None, R=None, compound=False, num_sections: int = 3, holes=None, make_surface: bool = True)¶
Add circle in the \(x\)-\(y\)-plane.
- add_ellipsoid(x0: List[float], radii: List[float], mesh_size: Optional[float] = None, with_volume: bool = 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., 1., 0.], [0., 0., 1.]]), x0=array([0., 0., 0.]), mesh_size=None, variant='rectangle_rotation')¶
- add_rectangle(xmin: float, xmax: float, ymin: float, ymax: float, z: float, mesh_size: Optional[float] = None, holes=None, make_surface: bool = True)¶
- add_torus(irad: float, orad: float, mesh_size: Optional[float] = None, R=array([[1., 0., 0.], [0., 1., 0.], [0., 0., 1.]]), x0=array([0., 0., 0.]), variant: str = '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: List[float], rotation_axis: List[float], point_on_axis: List[float], angle: float, num_layers: Optional[Union[int, List[int]]] = None, heights: Optional[List[float]] = None, recombine: bool = False)¶
Twist (translation + rotation) of any entity along a given translation_axis, around a given rotation_axis, about a given angle.