def move(self, vertex=None, x=None, y=None, z=None, e=None, ce=False, f=None): if vertex is not None: x = vertex[0] y = vertex[1] if ce: # calculate e e = euclidean_dist(self.start, vertex if vertex is not None else to_ndarray([x, y])) * self.e_per_mm if e: self.add_e(e) e = self.e_pos self.coder.move(x, y, z, e, f)
def get_aabb_lines(aabb, delta): # get max aabb for this area so that it is independent # of rotation d = euclidean_dist(aabb.center[:2], aabb.max[:2]) min_v, max_v = aabb.min - d, aabb.max + d x_l, x_r = min_v[0], max_v[0] y_positions = np_range(min_v[1], max_v[1], delta) lines = [] for y in y_positions: lines.append(to_ndarray([[x_l, y], [x_r, y]])) return lines
def move(self, vertex=None, x=None, y=None, z=None, e=None, ce=False, f=None): if vertex is not None: x = vertex[0] y = vertex[1] if ce: # calculate e e = euclidean_dist( self.start, vertex if vertex is not None else to_ndarray([x, y])) * self.e_per_mm if e: self.add_e(e) e = self.e_pos self.coder.move(x, y, z, e, f)