diff --git a/FlatCAM.py b/FlatCAM.py index e1cb0169..d833a498 100644 --- a/FlatCAM.py +++ b/FlatCAM.py @@ -36,6 +36,7 @@ from camlib import * from FlatCAMObj import * from FlatCAMWorker import Worker + ######################################## ## App ## ######################################## @@ -149,13 +150,9 @@ class App: # self.radios_inv.update({obj.kind + "_" + option: obj.radios_inv[option]}) ## Event subscriptions ## - # TODO: Move to plotcanvas - self.plot_click_subscribers = {} - self.plot_mousemove_subscribers = {} ## Tools ## - self.measure = Measurement(self.builder.get_object("box39"), self.plotcanvas.axes, - self.plot_click_subscribers, self.plot_mousemove_subscribers) + self.measure = Measurement(self.builder.get_object("box39"), self.plotcanvas) # Toolbar icon # TODO: Where should I put this? Tool should have a method to add to toolbar? meas_ico = Gtk.Image.new_from_file('share/measure32.png') @@ -188,10 +185,13 @@ class App: def somethreadfunc(app_obj): print "Hello World!" + self.message_dialog("Starting", "The best program is starting") + t = threading.Thread(target=somethreadfunc, args=(self,)) t.daemon = True t.start() + ######################################## ## START ## ######################################## @@ -203,6 +203,30 @@ class App: self.window.set_default_size(900, 600) self.window.show_all() + def message_dialog(self, title, message, type="info"): + types = {"info": Gtk.MessageType.INFO, + "warn": Gtk.MessageType.WARNING, + "error": Gtk.MessageType.ERROR} + dlg = Gtk.MessageDialog(self.window, 0, types[type], Gtk.ButtonsType.OK, title) + dlg.format_secondary_text(message) + dlg.run() + dlg.destroy() + + def question_dialog(self, title, message): + label = Gtk.Label(message) + dialog = Gtk.Dialog(title, self.window, 0, + (Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL, + Gtk.STOCK_OK, Gtk.ResponseType.OK)) + dialog.set_default_size(150, 100) + dialog.set_modal(True) + box = dialog.get_content_area() + box.set_border_width(10) + box.add(label) + dialog.show_all() + response = dialog.run() + dialog.destroy() + return response + def setup_toolbar(self): # Zoom fit @@ -255,48 +279,6 @@ class App: """ FlatCAMObj.app = self - # def setup_project_list(self): - # """ - # Sets up list or Tree where whatever has been loaded or created is - # displayed. - # - # :return: None - # """ - # - # # Model - # self.store = Gtk.ListStore(GdkPixbuf.Pixbuf, str) - # #self.store = Gtk.ListStore(str, str) - # - # # View - # self.tree = Gtk.TreeView(model=self.store) - # - # # Renderers - # renderer_pixbuf = Gtk.CellRendererPixbuf() - # column_pixbuf = Gtk.TreeViewColumn("Type", renderer_pixbuf, pixbuf=0) - # # column_pixbuf = Gtk.TreeViewColumn("Type") - # # column_pixbuf.pack_start(renderer_pixbuf, False) - # # column_pixbuf.add_attribute(renderer_pixbuf, "pixbuf", 1) - # self.tree.append_column(column_pixbuf) - # - # # renderer1 = Gtk.CellRendererText() - # # column1 = Gtk.TreeViewColumn("Type", renderer1, text=0) - # # self.tree.append_column(column1) - # - # renderer = Gtk.CellRendererText() - # column = Gtk.TreeViewColumn("Object name", renderer, text=1) - # self.tree.append_column(column) - # - # self.tree_select = self.tree.get_selection() - # - # - # self.builder.get_object("box_project").pack_start(self.tree, False, False, 1) - # - # # Double-click or Enter takes you to the object's options - # self.tree.connect("row_activated", self.on_row_activated) - # - # # Changes the selected item and populates the object options form - # self.signal_id = self.tree_select.connect("changed", self.on_tree_selection_changed) - def setup_component_editor(self): """ Initial configuration of the component editor. Creates @@ -335,7 +317,7 @@ class App: 'gerber': self.open_gerber, 'excellon': self.open_excellon, 'cncjob': self.open_gcode, - 'project': lambda x: "" + 'project': self.open_project } # Closure needed to create callbacks in a loop. @@ -378,39 +360,13 @@ class App: def info(self, text): """ - Show text on the status bar. + Show text on the status bar. This method is thread safe. :param text: Text to display. :type text: str :return: None """ - self.info_label.set_text(text) - - # def build_list(self): - # """ - # Clears and re-populates the list of objects in currently - # in the project. - # - # :return: None - # """ - # icons = { - # "gerber": "share/flatcam_icon16.png", - # "excellon": "share/drill16.png", - # "cncjob": "share/cnc16.png", - # "geometry": "share/geometry16.png" - # } - # - # - # print "build_list(): clearing" - # self.tree_select.unselect_all() - # self.store.clear() - # print "repopulating...", - # for key in self.stuff: - # print key, - # obj = self.stuff[key] - # icon = GdkPixbuf.Pixbuf.new_from_file(icons[obj.kind]) - # self.store.append([icon, key]) - # print + GLib.idle_add(lambda: self.info_label.set_text(text)) def get_radio_value(self, radio_set): """ @@ -474,31 +430,11 @@ class App: self.info("Could not evaluate: " + value) return None - # def set_list_selection(self, name): - # """ - # Marks a given object as selected in the list ob objects - # in the GUI. This selection will in turn trigger - # ``self.on_tree_selection_changed()``. - # - # :param name: Name of the object. - # :type name: str - # :return: None - # """ - # - # iter = self.store.get_iter_first() - # while iter is not None and self.store[iter][1] != name: - # iter = self.store.iter_next(iter) - # self.tree_select.unselect_all() - # self.tree_select.select_iter(iter) - # - # # Need to return False such that GLib.idle_add - # # or .timeout_add do not repeat. - # return False - def new_object(self, kind, name, initialize): """ Creates a new specalized FlatCAMObj and attaches it to the application, this is, updates the GUI accordingly, any other records and plots it. + This method is thread-safe. :param kind: The kind of object to create. One of 'gerber', 'excellon', 'cncjob' and 'geometry'. @@ -513,6 +449,8 @@ class App: :rtype: None """ + print "new_object()" + ### Check for existing name if name in self.collection.get_names(): ## Create a new name @@ -553,18 +491,17 @@ class App: obj.convert_units(self.options["units"]) # Add to our records - # TODO: Perhaps make collection thread safe instead? - GLib.idle_add(lambda: self.collection.append(obj, active=True)) + self.collection.append(obj, active=True) # Show object details now. - GLib.timeout_add(100, lambda: self.notebook.set_current_page(1)) + GLib.idle_add(lambda: self.notebook.set_current_page(1)) # Plot # TODO: (Thread-safe?) obj.plot() - # TODO: Threading dissaster! GLib.idle_add(lambda: self.on_zoom_fit(None)) + #self.on_zoom_fit(None) return obj @@ -582,23 +519,6 @@ class App: self.progress_bar.set_fraction(percentage) return False - # def get_current(self): - # """ - # Returns the currently selected FlatCAMObj in the application. - # - # :return: Currently selected FlatCAMObj in the application. - # :rtype: FlatCAMObj or None - # """ - # - # # TODO: Could possibly read the form into the object here. - # # But there are some cases when the form for the object - # # is not up yet. See on_tree_selection_changed. - # - # try: - # return self.stuff[self.selected_item_name] - # except: - # return None - def load_defaults(self): """ Loads the aplication's default settings from defaults.json into @@ -738,6 +658,7 @@ class App: except: pass + # Serialize the whole project d = {"objs": [obj.to_dict() for obj in self.collection.get_list()], "options": self.options} @@ -786,7 +707,7 @@ class App: # Project options self.options.update(d['options']) self.project_filename = filename - self.units_label.set_text(self.options["units"]) + GLib.idle_add(lambda: self.units_label.set_text(self.options["units"])) # Re create objects for obj in d['objs']: @@ -961,6 +882,9 @@ class App: ######################################## ## EVENT HANDLERS ## ######################################## + def on_debug_printlist(self, *args): + self.collection.print_list() + def on_disable_all_plots(self, widget): self.disable_plots() @@ -997,8 +921,6 @@ class App: :return: None """ - # self.get_current().read_form() - # self.get_current().plot() self.collection.get_active().read_form() self.collection.get_active().plot() @@ -1012,7 +934,6 @@ class App: about = self.builder.get_object("aboutdialog") response = about.run() - #about.destroy() about.hide() def on_create_mirror(self, widget): @@ -1299,6 +1220,18 @@ class App: def on_success(app_obj, filename): assert isinstance(app_obj, App) + + try: + f = open(filename, 'r') + f.close() + exists = True + except IOError: + exists = False + + msg = "File exists. Overwrite?" + if exists and self.question_dialog("File exists", msg) == Gtk.ResponseType.CANCEL: + return + app_obj.save_project(filename) self.project_filename = filename self.register_recent("project", filename) @@ -1319,6 +1252,18 @@ class App: def on_success(app_obj, filename): assert isinstance(app_obj, App) + + try: + f = open(filename, 'r') + f.close() + exists = True + except IOError: + exists = False + + msg = "File exists. Overwrite?" + if exists and self.question_dialog("File exists", msg) == Gtk.ResponseType.CANCEL: + return + app_obj.save_project(filename) self.register_recent("project", filename) app_obj.info("Project copy saved to: " + filename) @@ -1578,9 +1523,7 @@ class App: obj.plot() GLib.timeout_add(300, lambda: app_obj.set_progress_bar(0.0, "Idle")) - # t = threading.Thread(target=thread_func, args=(self,)) - # t.daemon = True - # t.start() + # Send to worker self.worker.add_task(thread_func, [self]) def on_generate_excellon_cncjob(self, widget): @@ -1625,10 +1568,7 @@ class App: GLib.idle_add(lambda: app_obj.set_progress_bar(1.0, "Done!")) GLib.timeout_add_seconds(1, lambda: app_obj.set_progress_bar(0.0, "")) - # Start the thread - # t = threading.Thread(target=job_thread, args=(self,)) - # t.daemon = True - # t.start() + # Send to worker self.worker.add_task(job_thread, [self]) def on_excellon_tool_choose(self, widget): @@ -1818,10 +1758,7 @@ class App: GLib.idle_add(lambda: app_obj.set_progress_bar(1.0, "Done!")) GLib.timeout_add_seconds(1, lambda: app_obj.set_progress_bar(0.0, "")) - # Start the thread - # t = threading.Thread(target=job_thread, args=(self,)) - # t.daemon = True - # t.start() + # Send to worker self.worker.add_task(job_thread, [self]) def on_generate_paintarea(self, widget): @@ -1843,10 +1780,14 @@ class App: tooldia = geo.options["painttooldia"] overlap = geo.options["paintoverlap"] + # Connection ID for the click event + subscription = None + # To be called after clicking on the plot. def doit(event): - self.plot_click_subscribers.pop("generate_paintarea") - self.info("") + #self.plot_click_subscribers.pop("generate_paintarea") + self.plotcanvas.mpl_disconnect(subscription) + self.info("Painting") point = [event.xdata, event.ydata] poly = find_polygon(geo.solid_geometry, point) @@ -1858,10 +1799,12 @@ class App: geo_obj.solid_geometry = cp geo_obj.options["cnctooldia"] = tooldia - name = self.selected_item_name + "_paint" + #name = self.selected_item_name + "_paint" + name = geo.options["name"] + "_paint" self.new_object("geometry", name, gen_paintarea) - self.plot_click_subscribers["generate_paintarea"] = doit + #self.plot_click_subscribers["generate_paintarea"] = doit + subscription = self.plotcanvas.mpl_connect('button_press_event', doit) def on_cncjob_exportgcode(self, widget): """ @@ -1940,23 +1883,25 @@ class App: def on_file_new(self, param): """ Callback for menu item File->New. Returns the application to its - startup state. + startup state. This method is thread-safe. :param param: Whatever is passed by the event. Ignore. :return: None """ # Remove everything from memory - # Clear plot - self.plotcanvas.clear() - # Delete data - self.collection.delete_all() + # GUI things + def task(): + # Clear plot + self.plotcanvas.clear() - # Clear object editor - self.setup_component_editor() + # Delete data + self.collection.delete_all() - # Clear list - #self.collection.build_list() + # Clear object editor + self.setup_component_editor() + + GLib.idle_add(task) # Clear project filename self.project_filename = None @@ -2006,13 +1951,10 @@ class App: if response == Gtk.ResponseType.OK: filename = dialog.get_filename() dialog.destroy() - # t = threading.Thread(target=on_success, args=(self, filename)) - # t.daemon = True - # t.start() + # Send to worker. self.worker.add_task(on_success, [self, filename]) - #on_success(self, filename) elif response == Gtk.ResponseType.CANCEL: - self.info("Open cancelled.") # print("Cancel clicked") + self.info("Open cancelled.") dialog.destroy() def file_chooser_save_action(self, on_success): @@ -2043,8 +1985,12 @@ class App: def obj_init(gerber_obj, app_obj): assert isinstance(gerber_obj, FlatCAMGerber) + + # Opening the file happens here GLib.idle_add(lambda: app_obj.set_progress_bar(0.2, "Parsing ...")) gerber_obj.parse_file(filename) + + # Further parsing GLib.idle_add(lambda: app_obj.set_progress_bar(0.5, "Creating Geometry ...")) gerber_obj.create_geometry() GLib.idle_add(lambda: app_obj.set_progress_bar(0.6, "Plotting ...")) @@ -2053,8 +1999,9 @@ class App: self.new_object("gerber", name, obj_init) self.register_recent("gerber", filename) + self.info("Opened: " + filename) GLib.idle_add(lambda: self.set_progress_bar(1.0, "Done!")) - GLib.timeout_add_seconds(1, lambda: self.set_progress_bar(0.0, "")) + GLib.timeout_add_seconds(1, lambda: self.set_progress_bar(0.0, "Idle")) def on_fileopengerber(self, param): """ @@ -2065,30 +2012,7 @@ class App: :param param: Ignore :return: None """ - # IMPORTANT: on_success will run on a separate thread. Use - # GLib.idle_add(function, **kwargs) to launch actions that will - # updata the GUI. - # def on_success(app_obj, filename): - # assert isinstance(app_obj, App) - # GLib.idle_add(lambda: app_obj.set_progress_bar(0.1, "Opening Gerber ...")) - # - # def obj_init(gerber_obj, app_obj): - # assert isinstance(gerber_obj, FlatCAMGerber) - # GLib.idle_add(lambda: app_obj.set_progress_bar(0.2, "Parsing ...")) - # gerber_obj.parse_file(filename) - # GLib.idle_add(lambda: app_obj.set_progress_bar(0.5, "Creating Geometry ...")) - # gerber_obj.create_geometry() - # GLib.idle_add(lambda: app_obj.set_progress_bar(0.6, "Plotting ...")) - # - # name = filename.split('/')[-1].split('\\')[-1] - # app_obj.new_object("gerber", name, obj_init) - # app_obj.register_recent("gerber", filename) - # - # GLib.idle_add(lambda: app_obj.set_progress_bar(1.0, "Done!")) - # GLib.timeout_add_seconds(1, lambda: app_obj.set_progress_bar(0.0, "")) - # on_success gets run on a separate thread - # self.file_chooser_action(on_success) self.file_chooser_action(lambda ao, filename: self.open_gerber(filename)) def open_excellon(self, filename): @@ -2104,6 +2028,7 @@ class App: self.new_object("excellon", name, obj_init) self.register_recent("excellon", filename) + self.info("Opened: " + filename) GLib.idle_add(lambda: self.set_progress_bar(1.0, "Done!")) GLib.timeout_add_seconds(1, lambda: self.set_progress_bar(0.0, "")) @@ -2116,28 +2041,7 @@ class App: :param param: Ignore :return: None """ - # IMPORTANT: on_success will run on a separate thread. Use - # GLib.idle_add(function, **kwargs) to launch actions that will - # updata the GUI. - # def on_success(app_obj, filename): - # assert isinstance(app_obj, App) - # GLib.idle_add(lambda: app_obj.set_progress_bar(0.1, "Opening Excellon ...")) - # - # def obj_init(excellon_obj, app_obj): - # GLib.idle_add(lambda: app_obj.set_progress_bar(0.2, "Parsing ...")) - # excellon_obj.parse_file(filename) - # excellon_obj.create_geometry() - # GLib.idle_add(lambda: app_obj.set_progress_bar(0.6, "Plotting ...")) - # - # name = filename.split('/')[-1].split('\\')[-1] - # app_obj.new_object("excellon", name, obj_init) - # self.register_recent("excellon", filename) - # - # GLib.idle_add(lambda: app_obj.set_progress_bar(1.0, "Done!")) - # GLib.timeout_add_seconds(1, lambda: app_obj.set_progress_bar(0.0, "")) - # on_success gets run on a separate thread - # self.file_chooser_action(on_success) self.file_chooser_action(lambda ao, filename: self.open_excellon(filename)) def open_gcode(self, filename): @@ -2168,6 +2072,7 @@ class App: self.new_object("cncjob", name, obj_init) self.register_recent("cncjob", filename) + self.info("Opened: " + filename) GLib.idle_add(lambda: self.set_progress_bar(1.0, "Done!")) GLib.timeout_add_seconds(1, lambda: self.set_progress_bar(0.0, "")) @@ -2180,43 +2085,7 @@ class App: :param param: Ignore :return: None """ - # IMPORTANT: on_success will run on a separate thread. Use - # GLib.idle_add(function, **kwargs) to launch actions that will - # updata the GUI. - # def on_success(app_obj, filename): - # assert isinstance(app_obj, App) - # - # def obj_init(job_obj, app_obj_): - # """ - # - # :type app_obj_: App - # """ - # assert isinstance(app_obj_, App) - # GLib.idle_add(lambda: app_obj_.set_progress_bar(0.1, "Opening G-Code ...")) - # - # f = open(filename) - # gcode = f.read() - # f.close() - # - # job_obj.gcode = gcode - # - # GLib.idle_add(lambda: app_obj_.set_progress_bar(0.2, "Parsing ...")) - # job_obj.gcode_parse() - # - # GLib.idle_add(lambda: app_obj_.set_progress_bar(0.6, "Creating geometry ...")) - # job_obj.create_geometry() - # - # GLib.idle_add(lambda: app_obj_.set_progress_bar(0.6, "Plotting ...")) - # - # name = filename.split('/')[-1].split('\\')[-1] - # app_obj.new_object("cncjob", name, obj_init) - # self.register_recent("cncjob", filename) - # - # GLib.idle_add(lambda: app_obj.set_progress_bar(1.0, "Done!")) - # GLib.timeout_add_seconds(1, lambda: app_obj.set_progress_bar(0.0, "")) - # on_success gets run on a separate thread - # self.file_chooser_action(on_success) self.file_chooser_action(lambda ao, filename: self.open_gcode(filename)) def on_mouse_move_over_plot(self, event): @@ -2234,8 +2103,8 @@ class App: event.xdata, event.ydata)) self.mouse = [event.xdata, event.ydata] - for subscriber in self.plot_mousemove_subscribers: - self.plot_mousemove_subscribers[subscriber](event) + # for subscriber in self.plot_mousemove_subscribers: + # self.plot_mousemove_subscribers[subscriber](event) except: self.position_label.set_label("") @@ -2256,7 +2125,7 @@ class App: :return: None """ - # For key presses + # So it can receive key presses self.plotcanvas.canvas.grab_focus() try: @@ -2264,8 +2133,8 @@ class App: event.button, event.x, event.y, event.xdata, event.ydata) # TODO: This custom subscription mechanism is probably not necessary. - for subscriber in self.plot_click_subscribers: - self.plot_click_subscribers[subscriber](event) + # for subscriber in self.plot_click_subscribers: + # self.plot_click_subscribers[subscriber](event) self.clipboard.set_text("(%.4f, %.4f)" % (event.xdata, event.ydata), -1) @@ -2403,31 +2272,32 @@ class DrawingPoint(DrawingObject): class Measurement: - def __init__(self, container, axes, click_subscibers, move_subscribers, update=None): + def __init__(self, container, plotcanvas, update=None): self.update = update self.container = container self.frame = None self.label = None - self.click_subscribers = click_subscibers - self.move_subscribers = move_subscribers self.point1 = None self.point2 = None self.active = False + self.plotcanvas = plotcanvas + self.click_subscription = None + self.move_subscription = None def toggle_active(self, *args): if self.active: # Deactivate self.active = False - self.move_subscribers.pop("meas") - self.click_subscribers.pop("meas") self.container.remove(self.frame) if self.update is not None: self.update() + self.plotcanvas.mpl_disconnect(self.click_subscription) + self.plotcanvas.mpl_disconnect(self.move_subscription) return False else: # Activate print "DEBUG: Activating Measurement Tool..." self.active = True - self.click_subscribers["meas"] = self.on_click - self.move_subscribers["meas"] = self.on_move + self.click_subscription = self.plotcanvas.mpl_connect("button_press_event", self.on_click) + self.move_subscription = self.plotcanvas.mpl_connect('motion_notify_event', self.on_move) self.frame = Gtk.Frame() self.frame.set_margin_right(5) self.frame.set_margin_top(3) @@ -2449,10 +2319,13 @@ class Measurement: if self.point1 is None: self.label.set_label("Click on a reference point...") else: - dx = event.xdata - self.point1[0] - dy = event.ydata - self.point1[1] - d = sqrt(dx**2 + dy**2) - self.label.set_label("D = %.4f D(x) = %.4f D(y) = %.4f" % (d, dx, dy)) + try: + dx = event.xdata - self.point1[0] + dy = event.ydata - self.point1[1] + d = sqrt(dx**2 + dy**2) + self.label.set_label("D = %.4f D(x) = %.4f D(y) = %.4f" % (d, dx, dy)) + except TypeError: + pass if self.update is not None: self.update() @@ -2540,9 +2413,18 @@ class PlotCanvas: :type event_name: str :param callback: Function to call :type callback: func - :return: Nothing + :return: Connection id + :rtype: int """ - self.canvas.mpl_connect(event_name, callback) + return self.canvas.mpl_connect(event_name, callback) + + def mpl_disconnect(self, cid): + """ + Disconnect callback with the give id. + :param cid: Callback id. + :return: None + """ + self.canvas.mpl_disconnect(cid) def connect(self, event_name, callback): """ @@ -2592,6 +2474,8 @@ class PlotCanvas: :return: None """ + print "PC.adjust_axes()" + width = xmax - xmin height = ymax - ymin try: @@ -2707,21 +2591,6 @@ class PlotCanvas: return self.figure.add_axes([0.05, 0.05, 0.9, 0.9], label=name) - # def plot_axes(self, axes): - # - # if axes not in self.figure.axes: - # self.figure.add_axes(axes) - # - # # Basic configuration - # axes.set_frame_on(False) # No frame - # axes.set_xticks([]) # No tick - # axes.set_yticks([]) # No ticks - # axes.patch.set_visible(False) # No background - # axes.set_aspect(1) - # - # # Adjust limits - # self.auto_adjust_axes() - def on_scroll(self, canvas, event): """ Scroll event handler. @@ -2730,6 +2599,11 @@ class PlotCanvas: :param event: Event object containing the event information. :return: None """ + + # So it can receive key presses + self.canvas.grab_focus() + + # Event info z, direction = event.get_scroll_direction() if self.key is None: @@ -2758,7 +2632,7 @@ class PlotCanvas: def on_mouse_move(self, event): """ - Mouse movement event hadler. + Mouse movement event hadler. Stores the coordinates. :param event: Contains information about the event. :return: None @@ -2822,6 +2696,13 @@ class ObjectCollection: column_text.set_cell_data_func(renderer_text, _set_cell_text) self.view.append_column(column_text) + def print_list(self): + iterat = self.store.get_iter_first() + while iterat is not None: + obj = self.store[iterat][0] + print obj + iterat = self.store.iter_next(iterat) + def delete_all(self): print "OC.delete_all()" # self.collection = [] @@ -2837,10 +2718,22 @@ class ObjectCollection: pass def on_row_activated(self, *args): + """ + Does nothing right now. + :param args: Ignored. + :return: None + """ print "OC.on_row_activated()" return def on_list_selection_change(self, selection): + """ + Callback for change in selection on the objects' list. + Instructs the new selection to build the UI for its options. + + :param selection: Ignored. + :return: None + """ print "OC.on_list_selection_change()" try: self.get_active().build_ui() @@ -2851,6 +2744,14 @@ class ObjectCollection: # TODO: active, so cannot read form. def set_active(self, name): + """ + Sets an object as the active object in the program. Same + as `set_list_selection()`. + + :param name: Name of the object. + :type name: str + :return: None + """ print "OC.set_active()" self.set_list_selection(name) @@ -2863,6 +2764,13 @@ class ObjectCollection: return None def set_list_selection(self, name): + """ + Sets which object should be selected in the list. + + :param name: Name of the object. + :rtype name: str + :return: None + """ print "OC.set_list_selection()" iterat = self.store.get_iter_first() while iterat is not None and self.store[iterat][0].options["name"] != name: @@ -2870,13 +2778,30 @@ class ObjectCollection: self.tree_selection.select_iter(iterat) def append(self, obj, active=False): + """ + Add a FlatCAMObj the the collection. This method is thread-safe. + + :param obj: FlatCAMObj to append + :type obj: FlatCAMObj + :param active: If it is to become the active object after appending + :type active: bool + :return: None + """ print "OC.append()" - self.store.append([obj]) - if active: - self.set_list_selection(obj.options["name"]) + def guitask(): + self.store.append([obj]) + if active: + self.set_list_selection(obj.options["name"]) + GLib.idle_add(guitask) def get_names(self): + """ + Gets a list of the names of all objects in the collection. + + :return: List of names. + :rtype: list + """ print "OC.get_names()" names = [] iterat = self.store.get_iter_first() @@ -2887,6 +2812,12 @@ class ObjectCollection: return names def get_bounds(self): + """ + Finds coordinates bounding all objects in the collection. + + :return: [xmin, ymin, xmax, ymax] + :rtype: list + """ print "OC.get_bounds()" # TODO: Move the operation out of here. @@ -2911,6 +2842,12 @@ class ObjectCollection: return [xmin, ymin, xmax, ymax] def get_list(self): + """ + Returns a list with all FlatCAMObj. + + :return: List with all FlatCAMObj. + :rtype: list + """ collection_list = [] iterat = self.store.get_iter_first() while iterat is not None: @@ -2920,6 +2857,14 @@ class ObjectCollection: return collection_list def get_by_name(self, name): + """ + Fetches the FlatCAMObj with the given `name`. + + :param name: The name of the object. + :type name: str + :return: The requested object or None if no such object. + :rtype: FlatCAMObj or None + """ iterat = self.store.get_iter_first() while iterat is not None: obj = self.store[iterat][0] @@ -2929,6 +2874,17 @@ class ObjectCollection: return None def change_name(self, old_name, new_name): + """ + Changes the name of `FlatCAMObj` named `old_name` to `new_name`. + + :param old_name: Name of the object to change. + :type old_name: str + :param new_name: New name. + :type new_name: str + :return: True if name change succeeded, False otherwise. Will fail + if no object with `old_name` is found. + :rtype: bool + """ iterat = self.store.get_iter_first() while iterat is not None: obj = self.store[iterat][0] diff --git a/FlatCAM.ui b/FlatCAM.ui index f3b3ef65..43d053e5 100644 --- a/FlatCAM.ui +++ b/FlatCAM.ui @@ -97,6 +97,11 @@ THE SOFTWARE. False gtk-open + + True + False + share/bug16.png + True False @@ -132,6 +137,77 @@ THE SOFTWARE. False gtk-open + + False + 5 + dialog + + + False + vertical + 2 + + + False + end + + + + + + + + + False + True + end + 0 + + + + + True + False + + + True + False + start + share/warning.png + + + False + True + 0 + + + + + True + False + 12 + 12 + 12 + 12 + True + label + + + False + True + 1 + + + + + False + True + 1 + + + + + False @@ -3488,6 +3564,22 @@ to application defaults. + + + True + False + + + + + List objects + True + False + image21 + False + + + diff --git a/FlatCAMObj.py b/FlatCAMObj.py index 89b1d880..53fa8625 100644 --- a/FlatCAMObj.py +++ b/FlatCAMObj.py @@ -38,6 +38,9 @@ class FlatCAMObj(GObject.GObject, object): self.axes = None # Matplotlib axes self.kind = None # Override with proper name + def __str__(self): + return "".format(self.kind, self.options["name"]) + def setup_axes(self, figure): """ 1) Creates axes if they don't exist. 2) Clears axes. 3) Attaches diff --git a/camlib.py b/camlib.py index 89dbfe7d..6313a221 100644 --- a/camlib.py +++ b/camlib.py @@ -1485,7 +1485,11 @@ class Excellon(Geometry): # Tool definition/parameters (?= is look-ahead # NOTE: This might be an overkill! - self.toolset_re = re.compile(r'^T(0?\d|\d\d)(?=.*C(\d*\.?\d*))?' + + # self.toolset_re = re.compile(r'^T(0?\d|\d\d)(?=.*C(\d*\.?\d*))?' + + # r'(?=.*F(\d*\.?\d*))?(?=.*S(\d*\.?\d*))?' + + # r'(?=.*B(\d*\.?\d*))?(?=.*H(\d*\.?\d*))?' + + # r'(?=.*Z([-\+]?\d*\.?\d*))?[CFSBHT]') + self.toolset_re = re.compile(r'^T(\d+)(?=.*C(\d*\.?\d*))?' + r'(?=.*F(\d*\.?\d*))?(?=.*S(\d*\.?\d*))?' + r'(?=.*B(\d*\.?\d*))?(?=.*H(\d*\.?\d*))?' + r'(?=.*Z([-\+]?\d*\.?\d*))?[CFSBHT]') @@ -1494,7 +1498,8 @@ class Excellon(Geometry): # Can have additional data after tool number but # is ignored if present in the header. # Warning: This will match toolset_re too. - self.toolsel_re = re.compile(r'^T((?:\d\d)|(?:\d))') + # self.toolsel_re = re.compile(r'^T((?:\d\d)|(?:\d))') + self.toolsel_re = re.compile(r'^T(\d+)') # Comment self.comm_re = re.compile(r'^;(.*)$') diff --git a/defaults.json b/defaults.json index 076496b9..78934a07 100644 --- a/defaults.json +++ b/defaults.json @@ -1 +1 @@ -{"gerber_noncopperrounded": false, "geometry_paintoverlap": 0.15, "geometry_plot": true, "excellon_feedrate": 5.0, "gerber_plot": true, "gerber_mergepolys": true, "excellon_drillz": -0.1, "geometry_feedrate": 3.0, "units": "IN", "excellon_travelz": 0.1, "gerber_multicolored": false, "gerber_solid": true, "gerber_isopasses": 1, "excellon_plot": true, "gerber_isotooldia": 0.016, "gerber_bboxmargin": 0.0, "cncjob_tooldia": 0.016, "geometry_travelz": 0.1, "gerber_cutoutmargin": 0.2, "excellon_solid": false, "geometry_paintmargin": 0.01, "geometry_cutz": -0.002, "geometry_cnctooldia": 0.016, "gerber_cutouttooldia": 0.07, "gerber_gaps": "4", "geometry_painttooldia": 0.0625, "cncjob_plot": true, "gerber_cutoutgapsize": 0.15, "gerber_isooverlap": 0.15, "gerber_bboxrounded": false, "geometry_multicolored": false, "gerber_noncoppermargin": 0.0, "geometry_solid": false} \ No newline at end of file +{"gerber_noncopperrounded": false, "geometry_paintoverlap": 0.15, "geometry_plot": true, "excellon_feedrate": 5.0, "gerber_plot": true, "gerber_mergepolys": true, "excellon_drillz": -0.1, "geometry_feedrate": 3.0, "units": "IN", "excellon_travelz": 0.1, "gerber_multicolored": false, "gerber_solid": true, "gerber_isopasses": 1, "excellon_plot": true, "gerber_isotooldia": 0.016, "cncjob_tooldia": 0.016, "geometry_travelz": 0.1, "gerber_cutoutmargin": 0.2, "excellon_solid": false, "geometry_paintmargin": 0.01, "geometry_cutz": -0.002, "geometry_cnctooldia": 0.016, "gerber_cutouttooldia": 0.07, "geometry_painttooldia": 0.0625, "gerber_gaps": "4", "gerber_bboxmargin": 0.0, "cncjob_plot": true, "gerber_cutoutgapsize": 0.15, "gerber_isooverlap": 0.15, "gerber_bboxrounded": false, "geometry_multicolored": false, "gerber_noncoppermargin": 0.0, "geometry_solid": false} \ No newline at end of file diff --git a/doc/build/.doctrees/camlib.doctree b/doc/build/.doctrees/camlib.doctree index 6eafcfdd..64e380e0 100644 Binary files a/doc/build/.doctrees/camlib.doctree and b/doc/build/.doctrees/camlib.doctree differ diff --git a/doc/build/.doctrees/environment.pickle b/doc/build/.doctrees/environment.pickle index 7a50aee7..51584e1f 100644 Binary files a/doc/build/.doctrees/environment.pickle and b/doc/build/.doctrees/environment.pickle differ diff --git a/doc/build/camlib.html b/doc/build/camlib.html index 07dd232f..b81ed968 100644 --- a/doc/build/camlib.html +++ b/doc/build/camlib.html @@ -100,10 +100,14 @@
  • FlatCAM Application
  • FlatCAM Developer Manual
  • @@ -523,7 +527,19 @@ box in both positive and negative, x and y axes.
    mirror(axis, point)
    -
    +

    Mirrors the object around a specified axis passign through +the given point. What is affected:

    +
      +
    • buffered_paths
    • +
    • flash_geometry
    • +
    • solid_geometry
    • +
    • regions
    • +
    +

    NOTE: +Does not modify the data used to create these elements. If these +are recreated, the scaling will be lost. This behavior was modified +because of the complexity reached in this class.

    +
    @@ -546,12 +562,15 @@ box in both positive and negative, x and y axes.

    Offsets the objects’ geometry on the XY plane by a given vector. These are:

      -
    • paths
    • +
    • buffered_paths
    • +
    • flash_geometry
    • +
    • solid_geometry
    • regions
    • -
    • flashes
    -

    Then buffered_paths, flash_geometry and solid_geometry -are re-created with self.create_geometry().

    +

    NOTE: +Does not modify the data used to create these elements. If these +are recreated, the scaling will be lost. This behavior was modified +because of the complexity reached in this class.

    @@ -607,16 +626,24 @@ one line of the source file.

    Scales the objects’ geometry on the XY plane by a given factor. These are:

      -
    • apertures
    • -
    • paths
    • +
    • buffered_paths
    • +
    • flash_geometry
    • +
    • solid_geometry
    • regions
    • -
    • flashes
    -

    Then buffered_paths, flash_geometry and solid_geometry -are re-created with self.create_geometry(). -:param factor: Number by which to scale. -:type factor: float -:rtype : None

    +

    NOTE: +Does not modify the data used to create these elements. If these +are recreated, the scaling will be lost. This behavior was modified +because of the complexity reached in this class.

    +
    +++ + + + +
    Parameters:factor (float) – Number by which to scale.
    +

    :rtype : None

    @@ -668,6 +695,23 @@ list of length n.

    +
    +
    +from_dict(d)
    +

    Populates the object from a serial representation created +with self.to_dict().

    + +++ + + + + + +
    Parameters:d – Serial representation of an ApertureMacro object.
    Returns:None
    +
    +
    static make_centerline(mods)
    @@ -833,6 +877,23 @@ are stored in self.primitives
    +
    +
    +to_dict()
    +

    Returns the object in a serializable form. Only the name and +raw are required.

    + +++ + + + + + +
    Returns:Dictionary representing the object. JSON ready.
    Return type:dict
    +
    + diff --git a/doc/build/genindex.html b/doc/build/genindex.html index b9786053..767195ae 100644 --- a/doc/build/genindex.html +++ b/doc/build/genindex.html @@ -99,11 +99,14 @@
  • FlatCAM Application
  • FlatCAM Developer Manual
  • @@ -187,6 +190,12 @@
    append() (camlib.ApertureMacro method)
    +
    + +
    (FlatCAM.ObjectCollection method) +
    + +
    auto_adjust_axes() (FlatCAM.PlotCanvas method)
    @@ -208,10 +217,6 @@
    -
    build_list() (FlatCAM.App method) -
    - -
    build_ui() (FlatCAM.FlatCAMObj method)
    @@ -226,6 +231,10 @@ +
    change_name() (FlatCAM.ObjectCollection method) +
    + +
    clear() (FlatCAM.PlotCanvas method)
    @@ -233,12 +242,12 @@
    clear_polygon() (camlib.Geometry method)
    +
    +
    CNCjob (class in camlib)
    -
    -
    connect() (FlatCAM.PlotCanvas method)
    @@ -280,6 +289,10 @@
    +
    disable_plots() (FlatCAM.App method) +
    + +
    do_flashes() (camlib.Gerber method)
    @@ -342,9 +355,15 @@ -
    from_dict() (camlib.Geometry method) +
    from_dict() (camlib.ApertureMacro method)
    +
    + +
    (camlib.Geometry method) +
    + +
    @@ -375,14 +394,18 @@
    Gerber (class in camlib)
    - -
    get_bounding_box() (camlib.Gerber method)
    +
    +
    -
    get_current() (FlatCAM.App method) +
    get_bounds() (FlatCAM.ObjectCollection method) +
    + + +
    get_by_name() (FlatCAM.ObjectCollection method)
    @@ -394,6 +417,14 @@ +
    get_list() (FlatCAM.ObjectCollection method) +
    + + +
    get_names() (FlatCAM.ObjectCollection method) +
    + +
    get_radio_value() (FlatCAM.App method)
    @@ -463,12 +494,12 @@
    make_outline() (camlib.ApertureMacro static method)
    -
    -
    make_polygon() (camlib.ApertureMacro static method)
    +
    +
    make_thermal() (camlib.ApertureMacro static method)
    @@ -478,6 +509,10 @@ +
    Measurement (class in FlatCAM) +
    + +
    mirror() (camlib.Excellon method)
    @@ -491,6 +526,10 @@
    mpl_connect() (FlatCAM.PlotCanvas method)
    + +
    mpl_disconnect() (FlatCAM.PlotCanvas method) +
    +
    @@ -514,6 +553,10 @@ - +
    +
    ObjectCollection (class in FlatCAM) +
    + +
    offset() (camlib.CNCjob method)
    @@ -647,12 +690,12 @@
    on_generate_isolation() (FlatCAM.App method)
    -
    on_generate_paintarea() (FlatCAM.App method)
    +
    on_gerber_generate_cutout() (FlatCAM.App method)
    @@ -662,10 +705,22 @@ +
    on_key_down() (FlatCAM.PlotCanvas method) +
    + +
    on_key_over_plot() (FlatCAM.App method)
    +
    on_key_up() (FlatCAM.PlotCanvas method) +
    + + +
    on_list_selection_change() (FlatCAM.ObjectCollection method) +
    + +
    on_mouse_move() (FlatCAM.PlotCanvas method)
    @@ -713,6 +768,12 @@
    on_row_activated() (FlatCAM.App method)
    +
    + +
    (FlatCAM.ObjectCollection method) +
    + +
    on_scale_object() (FlatCAM.App method)
    @@ -738,10 +799,6 @@ -
    on_tree_selection_changed() (FlatCAM.App method) -
    - -
    on_update_plot() (FlatCAM.App method)
    @@ -896,6 +953,10 @@ +
    set_active() (FlatCAM.ObjectCollection method) +
    + +
    set_form_item() (FlatCAM.App method)
    @@ -906,16 +967,16 @@
    -
    set_list_selection() (FlatCAM.App method) -
    - - -
    set_progress_bar() (FlatCAM.App method) +
    set_list_selection() (FlatCAM.ObjectCollection method)
    +
    set_progress_bar() (FlatCAM.App method) +
    + +
    setup_axes() (FlatCAM.FlatCAMObj method)
    @@ -928,10 +989,6 @@ -
    setup_project_list() (FlatCAM.App method) -
    - -
    size() (camlib.Geometry method)
    @@ -942,9 +999,15 @@
    -
    to_dict() (camlib.Geometry method) +
    to_dict() (camlib.ApertureMacro method)
    +
    + +
    (camlib.Geometry method) +
    + +
    diff --git a/doc/build/index.html b/doc/build/index.html index 7947f847..6ee1597d 100644 --- a/doc/build/index.html +++ b/doc/build/index.html @@ -99,11 +99,14 @@
  • FlatCAM Application
  • FlatCAM Developer Manual
  • @@ -164,11 +167,14 @@
  • FlatCAM Application
  • FlatCAM Developer Manual
  • diff --git a/doc/build/objects.inv b/doc/build/objects.inv index fda81fd9..1ce26fc5 100644 Binary files a/doc/build/objects.inv and b/doc/build/objects.inv differ diff --git a/doc/build/py-modindex.html b/doc/build/py-modindex.html index 2a9bea0f..963be33e 100644 --- a/doc/build/py-modindex.html +++ b/doc/build/py-modindex.html @@ -105,11 +105,14 @@
  • FlatCAM Application
  • FlatCAM Developer Manual
  • diff --git a/doc/build/search.html b/doc/build/search.html index 8896dcbf..b5d5e38e 100644 --- a/doc/build/search.html +++ b/doc/build/search.html @@ -106,11 +106,14 @@
  • FlatCAM Application
  • FlatCAM Developer Manual
  • diff --git a/doc/build/searchindex.js b/doc/build/searchindex.js index 70284982..23fbc99a 100644 --- a/doc/build/searchindex.js +++ b/doc/build/searchindex.js @@ -1 +1 @@ -Search.setIndex({envversion:42,terms:{represent:2,all:[1,2,3,4],code:[1,2,3],toolpath:3,replot:1,focus:1,follow:3,on_key_over_plot:1,make_outlin:3,whose:[1,4],make_circl:3,get_ev:1,on_options_upd:[1,4],flash:3,specif:[1,2,3],gerber:[],program:1,on_click_over_plot:1,plot_al:1,geom:3,spec:3,isinst:4,digit:3,sourc:3,everi:3,string:[1,3],far:1,mous:1,"5e6cff":3,obround:3,untouch:3,on_cb_plot_toggl:1,toolshap:3,button:1,list:[1,3,4],iter:[3,4],item:1,vector:[1,2,3],specal:1,round:[1,3],get_radio_valu:1,create_geometri:3,natur:3,dimens:[2,3],resourc:1,zero:3,pass:[1,3],click:1,append:[2,3],index:0,what:4,new_ax:1,neg:[1,3],current:1,delet:1,clipboard:1,buffer_path:3,"new":[1,2,4],method:[1,2,3,4],whatev:1,widget:[1,4],default2zero:3,flatcamgeometri:[],gener:[1,2,3],onli:[1,3],matplotlib:[1,2,3],adjust_ax:1,on_create_aligndril:1,path:[1,3],along:[3,4],vertic:3,modifi:[1,2,3,4],make_moir:3,valu:[1,3,4],box:[1,3],convert:[2,3,4],new_object:1,on_file_saveprojectcopi:1,action:1,chang:[1,3,4],on_activate_nam:1,on_options_object2app:1,diamet:3,via:1,primit:3,modul:0,on_fileopengerb:1,filenam:[1,3,4],basegeometri:4,ymin:[1,3],select:1,frac_digit:[1,3],plot:[1,2,3],from:[1,2,3,4],describ:3,doubl:1,regist:1,setup_component_editor:1,call:[1,2,3,4],save:[1,3,4],suppos:4,type:[1,2,3,4],toggl:1,more:3,on_toolbar_replot:1,evalu:3,on_delet:1,factor:[1,2,3],on_gerber_generate_cutout:1,parse_fil:3,known:1,hole:1,must:[1,3,4],on_file_openproject:1,none:[1,2,3],ser_attr:[3,4],work:3,uniqu:1,gtext:3,crosshair_thick:3,can:[1,2,3,4],drill:[2,3],z_move:2,fetch:[2,4],def:4,overrid:[2,3],overwritten:4,polygon2gcod:3,give:3,process:[1,3,4],share:1,indic:3,stroke:3,minimum:1,tab:[1,4],xmin:[1,3],hit:1,serial:[],z_cut:2,apertureid:3,alwai:3,surfac:3,end:3,hadler:1,fix_region:3,write:3,fals:3,updat:[1,4],parse_lin:3,recogn:4,make_polygon:3,after:1,befor:[1,2],notebook:1,mai:1,setup_obj_class:1,associ:[1,2,3],becom:[2,3],read:[1,2,3,4],onto:3,correspond:[1,3],element:[3,4],inform:1,"switch":1,maintain:1,allow:3,enter:1,make_therm:3,on_file_saveprojecta:1,travel:3,checkbox:1,rotat:3,over:[1,4],tupl:[2,3],through:[1,4],affect:3,on_excellon_tool_choos:1,paramet:[1,2,3],fit:1,respresent:[3,4],chosen:1,fix:3,gtk:1,"__class__":4,set_list_select:1,window:1,html:1,pcb:1,on_options_app2object:1,main:[1,3],pixel:1,non:[3,4],within:3,"return":[1,2,3,4],thei:[2,3,4],handl:[1,2],rectangl:3,number:[1,3],"break":3,vect:[2,3],build_list:1,project_filenam:1,choic:1,name:[1,2,3,4],edit:4,separ:[1,3],solid_geometri:3,each:[3,4],found:3,circular:3,gui:[1,2,4],read_form:[1,2],b5ab3a:3,on_closewindow:1,replac:3,continu:[1,2],"static":3,connect:1,aperturetyp:3,event:1,out:1,variabl:[1,3],on_eval_upd:1,generate_from_excellon_by_tool:3,content:[0,1],adjust:1,set_current_pag:1,clear_polygon:3,on_scrol:1,flatcamcncjob:[],alter:3,linear:3,insid:3,state:1,precaut:1,differ:3,flatcamexcellon:[],base:[1,2],dictionari:[1,2,3,4],latest:1,org:1,care:1,file_chooser_act:1,generate_from_geometri:3,thread:1,launch:1,angl:3,motion:1,turn:1,length:3,plane:3,place:[1,4],outsid:3,geometri:[],treeselect:1,entry_text:1,n_vert:3,first:4,origin:[1,3],copper:1,on_zoom_in:1,arrai:3,independ:4,f0e24d:3,restrict:1,saepar:1,done:[1,3,4],fast:3,thick:3,open:[1,4],predefin:3,size:[1,3],given:[1,2,3],circumscrib:3,on_toggle_unit:1,data:[1,3],interact:2,flatcamobj:[],attach:[1,2],circl:3,interfac:1,locat:3,store:[3,4],includ:[3,4],option:3,handler:1,tool:[1,3],copi:[1,2,3,4],specifi:[1,2,3,4],get_empty_area:3,generate_from_excellon:3,part:[2,3],pars:3,instanci:3,get_bounding_box:3,exposur:3,kind:[1,2,3,4],whenev:1,tree:1,entry_ev:1,structur:3,project:[1,4],str:[1,2,3],build_ui:2,posit:3,initi:1,thereaft:4,ani:[1,3],do_flash:3,raw:3,inherit:4,have:[1,3],callback:1,self:[1,2,3,4],note:[1,3],also:3,on_options_object2project:1,build:[1,2],which:[1,2,3,4],event_handl:1,interior:3,on_success:1,singl:3,simplifi:3,buffer:3,previou:1,on_mouse_mov:1,pair:[1,3],alpha:3,segment:3,"class":[1,2,3],set_progress_bar:1,appertur:3,clear:[1,2],later:[2,4],cover:[1,3],on_mouse_move_over_plot:1,populate_objects_combo:1,make_centerlin:3,axi:[1,3],width:3,thicken:3,recontruct:4,serializ:4,show:1,text:[1,3,4],apertur:3,radiu:3,syntax:[1,4],radio:1,corner:[1,3],find:1,on_scale_object:1,load_default:1,slow:3,ratio:[1,2],menu:1,configur:[1,2],activ:1,written:4,comboboxtext:1,version:[1,2,3],dict:[1,2,3,4],combo:1,elin:3,on_options_combo_chang:1,meant:1,"__inst__":4,get:[1,2,4],on_entry_eval_activ:1,express:3,nativ:1,made:3,geo:4,mpl_connect:1,requir:4,multipolygon:3,bar:1,on_create_mirror:1,coord:3,whether:2,to_dict:[3,4],xmax:[1,3],contain:[1,4],comma:3,movement:1,where:[1,3,4],dpi:3,set:[1,2,3],dump:4,keyboard:1,startup:[1,4],on_cncjob_exportgcod:1,maximum:1,"4650bd":3,see:[1,3],result:[1,3],arg:1,close:1,contour:3,statu:1,detect:4,extend:2,boundari:3,label:1,getattr:4,max_r:3,between:1,progress:1,previous:4,attribut:[3,4],accord:3,kei:[1,2,3,4],numer:3,complement:3,isol:1,job:[1,3],entir:3,here:1,extent:1,toler:3,auto_adjust_ax:1,popul:[1,3,4],both:3,feedrat:[2,3],rtype:[1,3,4],options2form:1,alon:3,setup_project_list:1,instanc:1,lowerleft:3,whole:[1,3],col:1,obj_dict:2,parse_cont:3,load:[1,4],cncjob:[],figur:[1,2],color:3,format:2,on_gerber_generate_noncopp:1,featur:3,shortcut:1,respect:2,throughout:1,backend:1,quit:1,do_someth:3,convert_unit:[2,3],addition:3,been:1,mark:1,pute:1,json:[1,2,4],get_curr:1,toolbar:1,open_project:[1,4],subscrib:1,immedi:1,radio_set:1,gcode:3,imag:1,search:0,gap:3,on_file_savedefault:[1,4],coordin:[1,3],on_options_project2object:1,func:1,present:3,versioncheck:1,inhibit:1,therefor:[1,4],apparamet:3,look:3,align:1,properti:[1,3],rectangular:3,defin:[1,3],"while":1,setup_ax:2,abov:3,margin:3,region:3,propag:1,layer:1,them:2,equal:3,unit:[1,2,3],itself:3,exterior:3,on_fileopengcod:1,"__init__":1,gcode_pars:3,make_lowerleftlin:3,make:4,belong:3,same:[1,4],save_project:[1,4],shply:4,pad:3,descend:[2,3],tool_toler:3,complet:1,http:1,widget_nam:1,upon:[1,4],alert:1,user:[1,2],canva:[1,2],implement:2,appropri:[1,3],off:1,center:[1,3],macro:3,well:3,"_app_":[1,4],without:1,on_file_new:1,thi:[1,2,3,4],choos:1,on_generate_paintarea:1,make_vectorlin:3,rout:1,left:1,distanc:3,identifi:[3,4],crosshair_len:3,isolation_geometri:3,entri:1,rest:3,shape:[3,4],aspect:[1,2],linestr:3,flatcamgerb:[],speed:3,wether:3,cut:[1,3],on_tools_doublesid:1,point:[1,3],param:[1,3,4],add:2,valid:1,board:1,appli:4,subsequ:1,pre_pars:3,take:[1,4],around:[1,3],transpar:[2,3],dest:1,on_file_saveproject:1,background:2,press:1,height:3,mod:3,like:1,success:1,ring:3,zoom:1,integ:3,noth:1,from_dict:3,necessari:1,either:1,exobj:3,on_clear_plot:1,page:[0,1],depend:[1,2,3],encount:4,int_digit:3,creation:[1,4],back:1,percentag:1,on_zoom_fit:1,radiobutton:1,"export":2,mirror:[1,3],set_form_item:[1,2],on_generate_excellon_cncjob:1,scale:[1,2,3],bottom:1,definit:3,overlap:3,on_update_plot:1,flash_geometri:3,cnc:[1,3],duplic:1,refer:4,machin:3,object:3,run:[1,3],usag:3,how:4,offset:[1,2,3],on_toggle_pointbox:1,about:1,actual:[2,3],file_chooser_save_act:1,on_generate_cncjob:1,side:1,degre:3,dialog:1,constructor:1,options_update_ignor:1,on_fileopenexcellon:1,on_about:1,chooser:1,"float":[1,2,3],encod:[3,4],bound:[1,3],excellon:[],compon:1,accordingli:1,ymax:[1,3],wai:[3,4],area:[1,3],outer_dia_outer_r:3,transfer:1,support:3,overwrit:3,make_geometri:3,start:[1,3],clear_poli:1,trigger:1,sdump:4,editor:1,fraction:3,on_canvas_configur:1,"function":[1,4],on_generate_isol:1,linear2gcod:3,form:[1,2,4],on_zoom_out:1,on_offset_object:1,don:[2,3],line:[1,3],"true":[1,3],loc:3,info:1,on_options_app2project:1,attr:4,on_generate_gerber_bounding_box:1,"default":[1,3,4],access:1,displai:1,tooldia:[2,3],record:1,limit:1,otherwis:4,enlarg:3,buffered_path:3,creat:[1,2,3,4],"int":3,request:1,dure:3,parser:3,aperture_pars:3,repres:[2,3],plot2:3,on_row_activ:1,exist:2,file:[1,3,4],doe:[1,3],check:1,again:3,aplic:1,polygon:[1,3],titl:1,to_form:2,when:[1,3,4],detail:1,invalid:3,field:1,other:[1,3],bool:[2,3],gline:3,geometr:[2,3],on_options_project2app:1,read_form_item:[1,2],deseri:[2,3],on_tree_selection_chang:1,draw:[1,3],event_nam:1,eval:1,outdat:1,rule:3,ignor:[1,3],aperture_macro:3,on_filequit:1,scroll:1},objtypes:{"0":"py:module","1":"py:method","2":"py:class","3":"py:staticmethod","4":"py:attribute"},objnames:{"0":["py","module","Python module"],"1":["py","method","Python method"],"2":["py","class","Python class"],"3":["py","staticmethod","Python static method"],"4":["py","attribute","Python attribute"]},filenames:["index","app","flatcamobj","camlib","devman"],titles:["Welcome to FlatCAM’s documentation!","FlatCAM Application","FlatCAM Objects","Camlib","FlatCAM Developer Manual"],objects:{"":{camlib:[3,0,0,"-"],FlatCAM:[2,0,0,"-"]},"camlib.CNCjob":{scale:[3,1,1,""],polygon2gcode:[3,1,1,""],generate_from_excellon_by_tool:[3,1,1,""],linear2gcode:[3,1,1,""],pre_parse:[3,1,1,""],generate_from_excellon:[3,1,1,""],gcode_parse:[3,1,1,""],generate_from_geometry:[3,1,1,""],offset:[3,1,1,""],plot2:[3,1,1,""]},FlatCAM:{PlotCanvas:[1,2,1,""],FlatCAMGeometry:[2,2,1,""],App:[1,2,1,""],FlatCAMObj:[2,2,1,""],FlatCAMExcellon:[2,2,1,""],FlatCAMGerber:[2,2,1,""],FlatCAMCNCjob:[2,2,1,""]},"FlatCAM.FlatCAMGerber":{convert_units:[2,1,1,""]},"camlib.Geometry":{convert_units:[3,1,1,""],scale:[3,1,1,""],to_dict:[3,1,1,""],bounds:[3,1,1,""],get_empty_area:[3,1,1,""],isolation_geometry:[3,1,1,""],from_dict:[3,1,1,""],clear_polygon:[3,1,1,""],offset:[3,1,1,""],size:[3,1,1,""]},"FlatCAM.App":{on_options_object2app:[1,1,1,""],on_about:[1,1,1,""],on_tree_selection_changed:[1,1,1,""],on_canvas_configure:[1,1,1,""],on_zoom_in:[1,1,1,""],on_delete:[1,1,1,""],on_toggle_units:[1,1,1,""],on_closewindow:[1,1,1,""],on_click_over_plot:[1,1,1,""],on_row_activated:[1,1,1,""],on_fileopengerber:[1,1,1,""],file_chooser_action:[1,1,1,""],on_zoom_out:[1,1,1,""],on_zoom_fit:[1,1,1,""],on_file_savedefaults:[1,1,1,""],on_generate_excellon_cncjob:[1,1,1,""],set_form_item:[1,1,1,""],plot_all:[1,1,1,""],read_form:[1,1,1,""],on_generate_isolation:[1,1,1,""],on_key_over_plot:[1,1,1,""],on_offset_object:[1,1,1,""],on_gerber_generate_noncopper:[1,1,1,""],on_fileopengcode:[1,1,1,""],new_object:[1,1,1,""],on_activate_name:[1,1,1,""],get_eval:[1,1,1,""],on_cb_plot_toggled:[1,1,1,""],on_update_plot:[1,1,1,""],save_project:[1,1,1,""],on_options_object2project:[1,1,1,""],setup_component_editor:[1,1,1,""],get_current:[1,1,1,""],open_project:[1,1,1,""],on_options_update:[1,1,1,""],on_file_new:[1,1,1,""],on_options_app2object:[1,1,1,""],on_options_project2app:[1,1,1,""],read_form_item:[1,1,1,""],versionCheck:[1,1,1,""],on_toolbar_replot:[1,1,1,""],on_entry_eval_activate:[1,1,1,""],on_scale_object:[1,1,1,""],on_options_combo_change:[1,1,1,""],setup_obj_classes:[1,1,1,""],on_file_saveproject:[1,1,1,""],setup_project_list:[1,1,1,""],on_generate_gerber_bounding_box:[1,1,1,""],on_options_project2object:[1,1,1,""],on_eval_update:[1,1,1,""],build_list:[1,1,1,""],on_toggle_pointbox:[1,1,1,""],on_file_saveprojectas:[1,1,1,""],info:[1,1,1,""],on_file_openproject:[1,1,1,""],on_options_app2project:[1,1,1,""],set_progress_bar:[1,1,1,""],on_file_saveprojectcopy:[1,1,1,""],on_create_mirror:[1,1,1,""],file_chooser_save_action:[1,1,1,""],on_excellon_tool_choose:[1,1,1,""],on_generate_cncjob:[1,1,1,""],on_clear_plots:[1,1,1,""],on_mouse_move_over_plot:[1,1,1,""],on_tools_doublesided:[1,1,1,""],on_gerber_generate_cutout:[1,1,1,""],load_defaults:[1,1,1,""],populate_objects_combo:[1,1,1,""],on_create_aligndrill:[1,1,1,""],on_generate_paintarea:[1,1,1,""],get_radio_value:[1,1,1,""],on_filequit:[1,1,1,""],on_cncjob_exportgcode:[1,1,1,""],options2form:[1,1,1,""],set_list_selection:[1,1,1,""],on_fileopenexcellon:[1,1,1,""]},"camlib.Gerber":{parse_lines:[3,1,1,""],scale:[3,1,1,""],frac_digits:[3,4,1,""],buffer_paths:[3,1,1,""],aperture_parse:[3,1,1,""],offset:[3,1,1,""],create_geometry:[3,1,1,""],parse_file:[3,1,1,""],do_flashes:[3,1,1,""],mirror:[3,1,1,""],fix_regions:[3,1,1,""],get_bounding_box:[3,1,1,""],int_digits:[3,4,1,""]},"camlib.ApertureMacro":{make_geometry:[3,1,1,""],default2zero:[3,3,1,""],make_vectorline:[3,3,1,""],make_polygon:[3,3,1,""],make_moire:[3,3,1,""],make_outline:[3,3,1,""],make_circle:[3,3,1,""],parse_content:[3,1,1,""],make_centerline:[3,3,1,""],make_thermal:[3,3,1,""],append:[3,1,1,""],make_lowerleftline:[3,3,1,""]},"FlatCAM.FlatCAMGeometry":{plot:[2,1,1,""],scale:[2,1,1,""],offset:[2,1,1,""]},"FlatCAM.PlotCanvas":{on_mouse_move:[1,1,1,""],on_scroll:[1,1,1,""],adjust_axes:[1,1,1,""],clear:[1,1,1,""],zoom:[1,1,1,""],connect:[1,1,1,""],new_axes:[1,1,1,""],auto_adjust_axes:[1,1,1,""],mpl_connect:[1,1,1,""]},camlib:{Excellon:[3,2,1,""],ApertureMacro:[3,2,1,""],Geometry:[3,2,1,""],CNCjob:[3,2,1,""],Gerber:[3,2,1,""]},"camlib.Excellon":{parse_lines:[3,1,1,""],scale:[3,1,1,""],offset:[3,1,1,""],create_geometry:[3,1,1,""],mirror:[3,1,1,""],parse_file:[3,1,1,""]},"FlatCAM.FlatCAMObj":{read_form:[2,1,1,""],plot:[2,1,1,""],serialize:[2,1,1,""],deserialize:[2,1,1,""],build_ui:[2,1,1,""],to_form:[2,1,1,""],setup_axes:[2,1,1,""],set_form_item:[2,1,1,""],read_form_item:[2,1,1,""]}},titleterms:{cncjob:3,flatcamgerb:2,app:1,indic:0,aperturemacro:3,tabl:0,excellon:3,serial:4,option:4,flatcamgeometri:2,develop:4,welcom:0,flatcamobj:2,gerber:3,camlib:3,document:0,flatcamcncjob:2,applic:1,flatcam:[0,1,2,4],object:2,flatcamexcellon:2,plotcanva:1,manual:4,geometri:3}}) \ No newline at end of file +Search.setIndex({envversion:42,terms:{represent:[2,3],all:[1,2,3,4],code:[1,2,3],skip:1,toolpath:3,replot:1,focus:1,follow:3,on_key_over_plot:1,make_outlin:3,whose:[1,4],make_circl:3,get_ev:1,on_options_upd:[1,4],flash:3,shply:4,gerber:[],program:1,text:[1,3,4],plot_al:1,geom:3,spec:3,isinst:4,cnc:[1,3],digit:3,sourc:3,everi:3,string:[1,3],getattr:4,far:1,mous:1,"5e6cff":3,obround:3,affect:3,on_cb_plot_toggl:1,toolshap:3,button:1,list:[1,3,4],iter:[3,4],item:1,vector:[1,2,3],specal:1,round:[1,3],get_radio_valu:1,create_geometri:3,natur:3,dimens:[2,3],resourc:1,zero:3,pass:[1,3],rectangular:3,click:1,append:[1,2,3],index:0,what:[3,4],load_default:1,new_ax:1,make_centerlin:3,current:1,delet:1,clipboard:1,"new":[1,2,4],method:[1,2,3,4],whatev:1,widget:[1,4],default2zero:3,flatcamgeometri:[],gener:[1,2,3],onli:[1,3],matplotlib:[1,2,3],adjust_ax:1,on_create_aligndril:1,path:[1,3],along:[3,4],vertic:3,modifi:[1,2,3,4],make_moir:3,valu:[1,3,4],box:[1,3],convert:[2,3,4],do_someth:3,on_file_saveprojectcopi:1,action:1,chang:[1,3,4],on_activate_nam:1,on_options_object2app:1,diamet:3,via:1,change_nam:1,primit:3,modul:0,on_fileopengerb:1,filenam:[1,3,4],"boolean":1,basegeometri:4,ymin:[1,3],select:1,frac_digit:[1,3],plot:[1,2,3],from:[1,2,3,4],describ:3,doubl:1,regist:1,setup_component_editor:1,call:[1,2,3,4],flash_geometri:3,dict:[1,2,3,4],type:[1,2,3,4],toggl:1,more:3,on_toolbar_replot:1,on_delet:1,combo:1,on_toggle_unit:1,on_gerber_generate_cutout:1,parse_fil:3,known:1,actual:[2,3],hole:1,must:[1,3,4],on_file_openproject:1,none:[1,2,3],left:1,ser_attr:[3,4],work:3,uniqu:1,gtext:3,crosshair_thick:3,can:[1,2,3,4],drill:[2,3],z_move:2,fetch:[1,2,4],def:4,overrid:[2,3],meant:1,polygon2gcod:3,give:[1,3],process:[1,3],share:1,indic:[],stroke:3,minimum:1,tab:[1,4],xmin:[1,3],"__inst__":4,serial:[],z_cut:2,apertureid:3,alwai:3,surfac:3,end:3,hadler:1,fix_region:3,write:3,fals:[1,3],circular:3,b5ab3a:3,recogn:4,on_key_down:1,make_polygon:3,after:1,befor:[1,2],plane:3,mai:1,circumscrib:3,data:[1,3],subsequ:1,entry_text:1,correspond:[1,3],element:[3,4],callback:1,"switch":1,maintain:1,allow:3,enter:1,on_fileopenexcellon:1,on_file_saveprojecta:1,travel:3,checkbox:1,rotat:3,over:[1,4],becaus:3,through:[1,3,4],untouch:3,on_excellon_tool_choos:1,paramet:[1,2,3],disconnect:1,fit:1,save_project:[1,4],chosen:1,fix:3,gtk:1,"__class__":4,set_list_select:1,window:1,html:1,transpar:[2,3],set_act:1,pcb:1,on_options_app2object:1,main:[1,3],pixel:1,on_zoom_out:1,non:[3,4],"float":[1,2,3],"return":[1,2,3,4],thei:[2,3,4],handl:[1,2],safe:1,rectangl:3,file_chooser_act:1,"break":3,vect:[2,3],build_list:[],project_filenam:1,choic:1,name:[1,2,3,4],edit:4,separ:[1,3],solid_geometri:3,each:[3,4],found:[1,3],updat:[1,4],gui:[1,2,4],read_form:[1,2],parse_lin:3,on_closewindow:1,replac:3,continu:[1,2],"static":3,connect:1,aperturetyp:3,on_key_up:1,event:1,out:1,variabl:[1,3],on_eval_upd:1,generate_from_excellon_by_tool:3,content:[0,1],adjust:1,set_current_pag:1,clear_polygon:3,on_scrol:1,flatcamcncjob:[],linear:3,insid:3,loc:3,deseri:[2,3],precaut:1,given:[1,2,3],like:1,flatcamexcellon:[],base:[1,2],dictionari:[1,2,3,4],org:1,care:1,generate_from_geometri:3,thread:1,launch:1,angl:3,success:1,motion:1,turn:[],length:3,notebook:1,place:[1,4],outsid:3,geometri:[],treeselect:[],onto:3,support:3,first:4,origin:[1,3],copper:1,on_zoom_in:1,arrai:3,independ:4,number:[1,3],restrict:1,saepar:1,instruct:1,done:[1,3,4],overwrit:3,thick:3,open:[1,4],predefin:3,size:[1,3],differ:3,setup_obj_class:1,width:3,associ:[2,3],interact:2,flatcamobj:[],get_list:1,attach:[1,2],circl:3,sdump:4,instanc:1,store:[3,4],editor:1,option:[],ratio:[1,2],tool:[1,3],copi:[1,2,3,4],specifi:[1,2,3,4],get_empty_area:3,generate_from_excellon:3,part:[2,3],pars:3,get_bounding_box:3,exposur:3,kind:[1,2,3,4],whenev:1,tree:[],entry_ev:1,structur:3,project:[1,4],str:[1,2,3],macro:3,posit:3,abov:3,thereaft:4,ani:[1,3],do_flash:3,raw:3,"_app_":[1,4],have:[1,3],recreat:3,inform:1,self:[1,2,3,4],note:[1,3],also:3,on_options_object2project:1,build:[1,2],which:[1,2,3,4],event_handl:1,interior:3,on_success:1,singl:3,simplifi:3,buffer:3,previou:1,reach:3,on_mouse_mov:1,pair:[1,3],alpha:3,segment:3,"class":[1,2,3],f0e24d:3,appertur:3,clear:[1,2],later:[2,4],cover:[1,3],on_mouse_move_over_plot:1,populate_objects_combo:1,neg:[1,3],axi:[1,3],thicken:3,recontruct:4,serializ:[3,4],show:1,on_click_over_plot:1,apertur:3,radiu:3,syntax:[1,4],radio:1,corner:[1,3],find:1,on_scale_object:1,new_object:1,slow:3,locat:3,menu:1,configur:[1,2],activ:1,written:4,should:1,comboboxtext:1,version:[1,2,3],suppos:4,factor:[1,2,3],elin:3,on_options_combo_chang:1,overwritten:4,hit:1,get:[1,2,4],express:3,nativ:1,on_options_app2project:1,geo:4,mpl_connect:1,requir:[3,4],multipolygon:3,bar:1,on_create_mirror:1,coord:3,whether:2,to_dict:[3,4],xmax:[1,3],contain:[1,4],comma:3,movement:1,where:[1,3,4],dpi:3,user:[1,2],set:[1,2,3],dump:4,noth:1,keyboard:1,startup:[1,4],on_cncjob_exportgcod:1,displai:1,"4650bd":3,see:[1,3],result:[1,3],arg:1,fail:1,close:1,contour:3,statu:1,detect:4,kei:[1,2,3,4],boundari:3,passign:3,label:1,state:1,max_r:3,between:1,progress:1,wether:[1,3],attribut:[3,4],accord:3,extend:2,numer:3,complement:3,isol:1,job:[1,3],succeed:1,here:1,extent:1,toler:3,auto_adjust_ax:1,popul:[1,3,4],both:3,feedrat:[2,3],rtype:[1,3,4],options2form:1,alon:3,setup_project_list:[],entir:3,lowerleft:3,whole:[1,3],col:1,obj_dict:2,parse_cont:3,load:[1,4],cncjob:[],figur:[1,2],color:3,on_gerber_generate_noncopp:1,creat:[1,2,3,4],enlarg:3,param:[1,3,4],respect:2,throughout:1,backend:1,quit:1,becom:[1,2,3],convert_unit:[2,3],addition:3,been:1,mark:[],compon:1,json:[1,2,3,4],get_curr:[],toolbar:1,open_project:[1,4],subscrib:1,immedi:1,radio_set:1,gcode:3,imag:1,search:0,gap:3,on_file_savedefault:[1,4],coordin:[1,3],on_options_project2object:1,func:1,present:3,versioncheck:1,inhibit:1,therefor:[1,4],apparamet:3,look:3,align:1,properti:[1,3],alter:3,dest:1,defin:[1,3],"while":1,setup_ax:2,behavior:3,margin:3,region:3,propag:1,layer:1,readi:3,them:2,equal:3,itself:3,exterior:3,on_fileopengcod:1,"__init__":1,around:[1,3],get_bound:1,make_lowerleftlin:3,make:4,belong:3,same:[1,4],respresent:[3,4],complex:3,pad:3,descend:[2,3],tool_toler:3,complet:1,http:1,widget_nam:1,upon:[1,4],alert:1,initi:1,canva:[1,2],implement:2,polygon:[1,3],appropri:[1,3],off:1,center:[1,3],build_ui:2,well:3,inherit:4,without:1,on_file_new:1,thi:[1,2,3,4],choos:1,on_generate_paintarea:1,make_vectorlin:3,rout:1,latest:1,distanc:3,identifi:[3,4],crosshair_len:3,isolation_geometri:3,"true":[1,3],entri:1,rest:3,shape:[3,4],aspect:[1,2],linestr:3,flatcamgerb:[],speed:3,previous:4,now:1,on_tools_doublesid:1,field:1,trigger:[],point:[1,3],except:1,shortcut:1,add:[1,2],other:[1,3],board:1,appli:4,save:[1,3,4],pre_pars:3,take:[1,4],gcode_pars:3,format:2,read:[1,2,3,4],on_file_saveproject:1,background:2,press:1,height:3,mod:3,lost:3,specif:[1,2,3],ring:3,zoom:1,integ:3,instanci:3,collect:1,from_dict:3,necessari:1,either:1,exobj:3,on_clear_plot:1,page:[0,1],depend:[1,2,3],encount:4,right:1,int_digit:3,creation:[1,4],back:1,percentag:1,on_zoom_fit:1,radiobutton:1,"export":2,mirror:[1,3],set_form_item:[1,2],on_generate_excellon_cncjob:1,scale:[1,2,3],bottom:1,cut:[1,3],definit:3,overlap:3,on_update_plot:1,buffer_path:3,unit:[1,2,3],duplic:1,refer:4,machin:3,object:[],run:[1,3],usag:3,how:4,offset:[1,2,3],on_toggle_pointbox:1,don:[2,3],about:1,obj:1,file_chooser_save_act:1,on_generate_cncjob:1,side:1,degre:3,dialog:1,constructor:1,options_update_ignor:1,disabl:1,make_therm:3,on_about:1,except_curr:1,chooser:1,within:3,encod:[3,4],bound:[1,3],excellon:[],pute:1,accordingli:1,ymax:[1,3],wai:[3,4],area:[1,3],outer_dia_outer_r:3,transfer:1,n_vert:3,fast:3,make_geometri:3,start:[1,3],clear_poli:1,handler:1,interfac:1,includ:[3,4],fraction:3,on_canvas_configur:1,"function":[1,4],on_generate_isol:1,linear2gcod:3,form:[1,2,3,4],tupl:[2,3],on_offset_object:1,old_nam:1,set_progress_bar:1,line:[1,3],on_entry_eval_activ:1,info:1,made:3,attr:4,on_generate_gerber_bounding_box:1,cid:1,new_nam:1,access:1,maximum:1,tooldia:[2,3],record:1,limit:1,otherwis:[1,4],featur:3,buffered_path:3,evalu:3,"int":[1,3],request:1,dure:3,parser:3,aperture_pars:3,repres:[2,3],plot2:3,on_row_activ:1,exist:2,file:[1,3,4],doe:[1,3],mpl_disconnect:1,check:1,again:3,aplic:1,get_nam:1,titl:1,to_form:2,when:[1,3,4],detail:1,invalid:3,"default":[1,3,4],valid:1,bool:[1,2,3],get_by_nam:1,gline:3,ignor:[1,3],on_options_project2app:1,read_form_item:[1,2],on_list_selection_chang:1,on_tree_selection_chang:[],draw:[1,3],event_nam:1,disable_plot:1,eval:1,outdat:1,rule:3,geometr:[2,3],aperture_macro:3,on_filequit:1,scroll:1},objtypes:{"0":"py:module","1":"py:method","2":"py:class","3":"py:staticmethod","4":"py:attribute"},objnames:{"0":["py","module","Python module"],"1":["py","method","Python method"],"2":["py","class","Python class"],"3":["py","staticmethod","Python static method"],"4":["py","attribute","Python attribute"]},filenames:["index","app","flatcamobj","camlib","devman"],titles:["Welcome to FlatCAM’s documentation!","FlatCAM Application","FlatCAM Objects","Camlib","FlatCAM Developer Manual"],objects:{"":{camlib:[3,0,0,"-"],FlatCAM:[2,0,0,"-"]},"camlib.CNCjob":{scale:[3,1,1,""],polygon2gcode:[3,1,1,""],generate_from_excellon_by_tool:[3,1,1,""],linear2gcode:[3,1,1,""],pre_parse:[3,1,1,""],generate_from_excellon:[3,1,1,""],gcode_parse:[3,1,1,""],generate_from_geometry:[3,1,1,""],offset:[3,1,1,""],plot2:[3,1,1,""]},FlatCAM:{PlotCanvas:[1,2,1,""],FlatCAMGeometry:[2,2,1,""],App:[1,2,1,""],FlatCAMObj:[2,2,1,""],ObjectCollection:[1,2,1,""],FlatCAMExcellon:[2,2,1,""],FlatCAMGerber:[2,2,1,""],Measurement:[1,2,1,""],FlatCAMCNCjob:[2,2,1,""]},"FlatCAM.FlatCAMGerber":{convert_units:[2,1,1,""]},"camlib.Geometry":{convert_units:[3,1,1,""],scale:[3,1,1,""],to_dict:[3,1,1,""],bounds:[3,1,1,""],get_empty_area:[3,1,1,""],isolation_geometry:[3,1,1,""],from_dict:[3,1,1,""],clear_polygon:[3,1,1,""],offset:[3,1,1,""],size:[3,1,1,""]},"FlatCAM.App":{on_options_object2app:[1,1,1,""],on_about:[1,1,1,""],file_chooser_action:[1,1,1,""],on_canvas_configure:[1,1,1,""],on_zoom_in:[1,1,1,""],on_delete:[1,1,1,""],on_toggle_units:[1,1,1,""],on_closewindow:[1,1,1,""],on_click_over_plot:[1,1,1,""],on_row_activated:[1,1,1,""],on_fileopengerber:[1,1,1,""],on_zoom_out:[1,1,1,""],on_zoom_fit:[1,1,1,""],on_file_savedefaults:[1,1,1,""],on_generate_excellon_cncjob:[1,1,1,""],set_form_item:[1,1,1,""],plot_all:[1,1,1,""],read_form:[1,1,1,""],on_generate_isolation:[1,1,1,""],on_key_over_plot:[1,1,1,""],on_offset_object:[1,1,1,""],on_gerber_generate_noncopper:[1,1,1,""],on_scale_object:[1,1,1,""],new_object:[1,1,1,""],on_activate_name:[1,1,1,""],get_eval:[1,1,1,""],on_cb_plot_toggled:[1,1,1,""],on_update_plot:[1,1,1,""],save_project:[1,1,1,""],on_options_object2project:[1,1,1,""],setup_component_editor:[1,1,1,""],open_project:[1,1,1,""],on_options_update:[1,1,1,""],on_file_new:[1,1,1,""],on_options_app2object:[1,1,1,""],on_options_project2app:[1,1,1,""],read_form_item:[1,1,1,""],versionCheck:[1,1,1,""],on_toolbar_replot:[1,1,1,""],on_entry_eval_activate:[1,1,1,""],on_tools_doublesided:[1,1,1,""],on_file_openproject:[1,1,1,""],on_options_combo_change:[1,1,1,""],setup_obj_classes:[1,1,1,""],on_file_saveproject:[1,1,1,""],on_generate_gerber_bounding_box:[1,1,1,""],on_options_project2object:[1,1,1,""],on_eval_update:[1,1,1,""],on_toggle_pointbox:[1,1,1,""],on_file_saveprojectas:[1,1,1,""],info:[1,1,1,""],disable_plots:[1,1,1,""],on_options_app2project:[1,1,1,""],set_progress_bar:[1,1,1,""],on_file_saveprojectcopy:[1,1,1,""],on_create_mirror:[1,1,1,""],file_chooser_save_action:[1,1,1,""],on_excellon_tool_choose:[1,1,1,""],on_generate_cncjob:[1,1,1,""],on_clear_plots:[1,1,1,""],on_mouse_move_over_plot:[1,1,1,""],on_fileopengcode:[1,1,1,""],on_gerber_generate_cutout:[1,1,1,""],load_defaults:[1,1,1,""],populate_objects_combo:[1,1,1,""],on_create_aligndrill:[1,1,1,""],on_generate_paintarea:[1,1,1,""],get_radio_value:[1,1,1,""],on_filequit:[1,1,1,""],on_cncjob_exportgcode:[1,1,1,""],options2form:[1,1,1,""],on_fileopenexcellon:[1,1,1,""]},"camlib.Gerber":{parse_lines:[3,1,1,""],scale:[3,1,1,""],frac_digits:[3,4,1,""],mirror:[3,1,1,""],aperture_parse:[3,1,1,""],offset:[3,1,1,""],create_geometry:[3,1,1,""],parse_file:[3,1,1,""],do_flashes:[3,1,1,""],buffer_paths:[3,1,1,""],fix_regions:[3,1,1,""],get_bounding_box:[3,1,1,""],int_digits:[3,4,1,""]},"camlib.ApertureMacro":{make_geometry:[3,1,1,""],default2zero:[3,3,1,""],to_dict:[3,1,1,""],make_polygon:[3,3,1,""],make_vectorline:[3,3,1,""],from_dict:[3,1,1,""],make_moire:[3,3,1,""],make_outline:[3,3,1,""],make_circle:[3,3,1,""],make_thermal:[3,3,1,""],make_centerline:[3,3,1,""],parse_content:[3,1,1,""],append:[3,1,1,""],make_lowerleftline:[3,3,1,""]},"FlatCAM.FlatCAMGeometry":{plot:[2,1,1,""],scale:[2,1,1,""],offset:[2,1,1,""]},"FlatCAM.PlotCanvas":{on_mouse_move:[1,1,1,""],on_scroll:[1,1,1,""],adjust_axes:[1,1,1,""],on_key_down:[1,1,1,""],mpl_disconnect:[1,1,1,""],clear:[1,1,1,""],zoom:[1,1,1,""],connect:[1,1,1,""],new_axes:[1,1,1,""],auto_adjust_axes:[1,1,1,""],on_key_up:[1,1,1,""],mpl_connect:[1,1,1,""]},camlib:{Excellon:[3,2,1,""],ApertureMacro:[3,2,1,""],Geometry:[3,2,1,""],CNCjob:[3,2,1,""],Gerber:[3,2,1,""]},"camlib.Excellon":{parse_lines:[3,1,1,""],scale:[3,1,1,""],offset:[3,1,1,""],create_geometry:[3,1,1,""],mirror:[3,1,1,""],parse_file:[3,1,1,""]},"FlatCAM.FlatCAMObj":{read_form:[2,1,1,""],plot:[2,1,1,""],serialize:[2,1,1,""],deserialize:[2,1,1,""],build_ui:[2,1,1,""],to_form:[2,1,1,""],setup_axes:[2,1,1,""],set_form_item:[2,1,1,""],read_form_item:[2,1,1,""]},"FlatCAM.ObjectCollection":{set_active:[1,1,1,""],get_names:[1,1,1,""],change_name:[1,1,1,""],on_row_activated:[1,1,1,""],get_list:[1,1,1,""],set_list_selection:[1,1,1,""],on_list_selection_change:[1,1,1,""],get_by_name:[1,1,1,""],get_bounds:[1,1,1,""],append:[1,1,1,""]}},titleterms:{cncjob:3,process:4,flatcamgerb:2,app:1,indic:0,aperturemacro:3,tabl:0,excellon:3,serial:4,flatcam:[0,1,2,4],flatcamgeometri:2,develop:4,welcom:0,flatcamobj:2,gerber:3,camlib:3,document:0,flatcamcncjob:2,applic:1,option:4,object:2,flatcamexcellon:2,plotcanva:1,measur:1,manual:4,geometri:[3,4],objectcollect:1}}) \ No newline at end of file diff --git a/doc/source/app.rst b/doc/source/app.rst index 323ee535..70252c10 100644 --- a/doc/source/app.rst +++ b/doc/source/app.rst @@ -14,3 +14,15 @@ PlotCanvas .. autoclass:: PlotCanvas :members: + +ObjectCollection +~~~~~~~~~~~~~~~~ + +.. autoclass:: ObjectCollection + :members: + +Measurement +~~~~~~~~~~~ + +.. autoclass:: Measurement + :members: \ No newline at end of file diff --git a/recent.json b/recent.json index 7189b80d..a6a6aec4 100644 --- a/recent.json +++ b/recent.json @@ -1 +1 @@ -[{"kind": "gerber", "filename": "C:\\Users\\jpcaram\\Dropbox\\PhD\\PLLs\\RTWO\\Project Outputs for RTWO1\\PCB1.GBL"}, {"kind": "excellon", "filename": "C:\\Users\\jpcaram\\Dropbox\\CNC\\pcbcam\\test_files\\BLDC2003Through.drl"}, {"kind": "gerber", "filename": "C:\\Users\\jpcaram\\Dropbox\\PhD\\PLLs\\RTWO\\Project Outputs for RTWO1\\PCB1.GTL"}, {"kind": "gerber", "filename": "C:\\Users\\jpcaram\\Dropbox\\CNC\\pcbcam\\test_files\\BLDC_1303_Bottom.gbr"}, {"kind": "excellon", "filename": "C:\\Users\\jpcaram\\Dropbox\\CNC\\pcbcam\\test_files\\PlacaReles.drl"}, {"kind": "gerber", "filename": "C:\\Users\\jpcaram\\Dropbox\\CNC\\pcbcam\\test_files\\PlacaReles-F_Cu.gtl"}, {"kind": "gerber", "filename": "C:\\Users\\jpcaram\\Dropbox\\CNC\\pcbcam\\test_files\\Example1_copper_bottom.gbr"}, {"kind": "cncjob", "filename": "C:\\Users\\jpcaram\\Dropbox\\PhD\\PLLs\\RTWO\\RTWO1_CNC\\cutout1.gcode"}, {"kind": "project", "filename": "C:\\Users\\jpcaram\\Dropbox\\PhD\\PLLs\\RTWO\\RTWO1.fcproj"}, {"kind": "excellon", "filename": "C:\\Users\\jpcaram\\Dropbox\\PhD\\PLLs\\RTWO\\Project Outputs for RTWO1\\PCB1.TXT"}] \ No newline at end of file +[{"kind": "excellon", "filename": "C:\\Users\\jpcaram\\Dropbox\\CNC\\pcbcam\\test_files\\TFTadapter.drl"}, {"kind": "gerber", "filename": "C:\\Users\\jpcaram\\Dropbox\\CNC\\pcbcam\\test_files\\PlacaReles-F_Cu.gtl"}, {"kind": "excellon", "filename": "C:\\Users\\jpcaram\\Dropbox\\CNC\\pcbcam\\test_files\\PlacaReles.drl"}, {"kind": "excellon", "filename": "C:\\Users\\jpcaram\\Dropbox\\CNC\\pcbcam\\test_files\\BLDC2003Through.drl"}, {"kind": "gerber", "filename": "C:\\Users\\jpcaram\\Dropbox\\PhD\\PLLs\\RTWO\\Project Outputs for RTWO1\\PCB1.GTL"}, {"kind": "project", "filename": "C:\\Users\\jpcaram\\Dropbox\\CNC\\pcbcam\\test_files\\RTWO_fc5_3.fcproj"}, {"kind": "project", "filename": "C:\\Users\\jpcaram\\Dropbox\\CNC\\pcbcam\\test_files\\RTWO_fc5_2.fcproj"}, {"kind": "project", "filename": "C:\\Users\\jpcaram\\Dropbox\\CNC\\pcbcam\\test_files\\RTWO_fc5.fcproj"}, {"kind": "cncjob", "filename": "Z:\\CNC\\testpcb\\2\\noname-F_Cu_ISOLATION_GCODE3.ngc"}, {"kind": "cncjob", "filename": "C:\\Users\\jpcaram\\Dropbox\\PhD\\PLLs\\RTWO\\RTWO1_CNC\\iso_bottom1.gcode"}] \ No newline at end of file