krakentools.geometry

Functions

coordinates_to_lattice_index(x, y, nx, ny, ...)

Translates coordinates to lattice indices for a given lattice type.

intersect_bounding_boxes(bboxes)

rtype:

ndarray

lattice_index_to_coordinates(xidx, yidx, nx, ...)

Translates lattice indices to coordinates for a given lattice type.

point_to_symmetry_sector(vec, Sang0, Dang, ...)

Transfers point to a corresponding point in the symmetry sector

reflect_plane_2d(coordinates, angle_deg)

Reflects coordinates with respect to a vertical plane

rotate_2d(coordinates, angle_deg)

rtype:

ndarray

truncate_point_to_bounding_box(bbox, point)

rtype:

ndarray

x_y_polar_angle(x, y)

Calculates polar angel (between -180 and 180) for point (x,y)

xy_polar_angle(xy)

Calculates polar angel (between -180 and 180) for xy coordinate pair

xyz_polar_angle(xyz)

Calculates polar angel (between -180 and 180) for xyz coordinate triplet

Classes

Shape2D()

Square2D([x0, y0, pitch])

XTypeHexagon2D([x0, y0, pitch])

YTypeHexagon2D([x0, y0, pitch])