Vec3DArray#

class Vec3DArray(points: List[ndarray])[source]#

Class to define an array of np.ndarray objects

Raises:
  • TypeError – if layer_z value is not provided for 2D design

  • ValueError – if dimensionality of coordinate > 3

Returns:

Array of np.ndarray objects

Return type:

Vec3DArray

Attributes

points: List[ndarray]#
path_vecs: List[ndarray]#

Methods

append(vecs: List[ndarray])[source]#

Append vector to the array

Parameters:

vecs (List[np.ndarray]) – list of vectors to append

get_angle_between(i: int, j: int, ret_path_angle: bool = True) float[source]#

Return acute angle between two vectors depending on “ret_path_angle”

Parameters:
  • i (int) – i^th index from path_vecs or points list

  • j (int) – j^th index from path_vecs or points list

  • ret_path_angle (bool, optional) – Return angl between path_vecs if True and between points if False. Defaults to True.

Returns:

angle between the corresponding vectors

Return type:

float

static make_vec3DArray(points: List[List[int | float]], layer_z: float | None = None)[source]#

Create a Vec3DArray object from list of points

Parameters:
  • points (List[List[Union[int, float]]]) – list of points

  • layer_z (float, optional) – z-coordinate of layer in case of 2D design. Defaults to None.

Raises:
  • TypeError – if layer_z value is not provided for 2D design

  • ValueError – if dimensionality of coordinate > 3

Returns:

return a Vec3DArray object

Return type:

Vec3DArray