def pop_line(self, workplane: cq.Workplane) -> cq.Workplane: wp = workplane.lineTo(-self.line_x, -self.line_y) wp = workplane.center(-self.line_x, -self.line_y) self.line_x = 0 self.line_y = 0 return wp.close()
def lineTo_scaled(wp: cq.Workplane, x, y, v) -> cq.Workplane: return wp.lineTo(x * v, y * v)
def push_line(self, workplane: cq.Workplane, x: float, y: float) -> cq.Workplane: (x, y) = self.rotate(x, y) self.line_x += x self.line_y += y return workplane.lineTo(x, y).center(x, y)