-
Notifications
You must be signed in to change notification settings - Fork 1
/
PathSegment.py
30 lines (22 loc) · 683 Bytes
/
PathSegment.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
from Waypoint import Waypoint
import numpy.typing as npt
import numpy as np
from copy import deepcopy
class PathSegment:
start_pose: Waypoint
end_pose: Waypoint
class PrintSegment(PathSegment):
occupying_voxels_indices: npt.NDArray[np.int64]
slicer_volume: float
calculated_volume: float
adjusted_volume: float
calculated_width: float
calculated_height: float
num_shared_voxels: int = 0
def copy(self):
return deepcopy(self)
@property
def length(self) -> float:
return float((self.end_pose.position - self.start_pose.position).length())
class RetractionSegment(PrintSegment):
retraction_distance: float = 0