def __init__(self, mode, *args, **kwargs): Usb.__init__(self, *args, **kwargs) self.cutter = Cutter() if mode == 'rpi': self.cut = self._cut_rpi else: self.cut = Usb.cut
def __init__(self): Node.__init__(self) self.bz_points = True self.bz_curves = True self.bz_polygons = False self.bs_points = True self.bs_curves = False self.bs_polygons = False self.selected = None self.cutter = Cutter() self.w = 0 self.h = 0
from pizza import Pizza from cutter import Cutter pizza = Pizza() pizza.read('small') pizza.slice((0, 0), (0, 2)) pizza.slice((0, 0), (3, 6)) for i in range(1, 7): pizza.slice((1, 5), (i, i)) pizza.parse_to_file() pizza = Pizza() pizza.read('medium') Cutter(pizza).solve(4, 3) pizza = Pizza() pizza.read('big') Cutter(pizza).solve(2, 6)
add_plot_verbose(argument_parser) add_range_list_subparser(argument_parser) def normal_clamped(mean, stddev): d = np.random.normal(0, stddev) d = min(3 * stddev, max(-3 * stddev, d)) return mean + d if __name__ == "__main__": from cutter import Cutter args = argument_parser.parse_args() cut = Cutter() instrument = args.instrument if hasattr(args, 'instrument') else 'unknown' # centerOffset (this is the position the object is placed at in ideal # cases, it should be dependent on the object geometry) # screw: (-10, 0) depending on image size if instrument in ['robot', 'drill']: cut['CenterOffset'] = (10, 0) else: cut['CenterOffset'] = args.center_offset # maximal displacement of the headPoint in millimeters with open(os.path.join(folder, '../data/config.json'), 'r') as fp: config = json.load(fp)
def addCutter(self, p1: QPoint, p2: QPoint): c = Cutter(p1, p2) self.cutter = c self.__drawCutter(c)