cigvis.meshs.surfaces module#

surface

cigvis.meshs.surfaces.arbline2mesh(p, n3, anti_rot=True, vstep=1)#

Construct a 3d mesh. The mesh is a surface represented an arbitrary line, where the surface parallel to the z axis.

Parameters#

pArrayLike

shape is (N, 2)

n3int

the number of points in the z axis

anti_rotbool

if True, will rotate the faces to anti-clockwise

vstepint

the step size in the vertical direction

Returns#

verticesArrayLike

shape is (N*n3, 3)

facesArrayLike

the faces of the mesh

cigvis.meshs.surfaces.points2quad(p, r=None, size=None)#

Convert points to separate x-y aligned quad meshes.

Parameters#

parray-like

Point positions with shape (N, 3).

rfloat or tuple, optional

Backward-compatible half size of each quad.

sizefloat or tuple, optional

Full side length of each quad. A scalar creates square quads; a two-element tuple controls x/y side lengths independently.

cigvis.meshs.surfaces.surface2mesh(surf: ndarray, mask: ndarray = None, mask_type: str = 'e', anti_rot: bool = True, step1=2, step2=2) Tuple#