diff --git a/FlatCAM.py b/FlatCAM.py index f1d870c0..e0c2879f 100644 --- a/FlatCAM.py +++ b/FlatCAM.py @@ -25,6 +25,7 @@ from matplotlib.backends.backend_gtk3agg import FigureCanvasGTK3Agg as FigureCan from camlib import * import sys import urllib +import copy ######################################## @@ -1007,12 +1008,7 @@ class App: # User must take care to implement initialize # in a thread-safe way as is is likely that we # have been invoked in a separate thread. - initialize(obj, self) - - # Check units and convert if necessary - if self.options["units"].upper() != obj.units.upper(): - GLib.idle_add(lambda: self.info("Converting units to " + self.options["units"] + ".")) - obj.convert_units(self.options["units"]) + #initialize(obj, self) # Set default options from self.options for option in self.options: @@ -1020,6 +1016,17 @@ class App: oname = option[len(kind)+1:] obj.options[oname] = self.options[option] + # Initialize as per user request + # User must take care to implement initialize + # in a thread-safe way as is is likely that we + # have been invoked in a separate thread. + initialize(obj, self) + + # Check units and convert if necessary + if self.options["units"].upper() != obj.units.upper(): + GLib.idle_add(lambda: self.info("Converting units to " + self.options["units"] + ".")) + obj.convert_units(self.options["units"]) + # Add to our records self.stuff[name] = obj @@ -1047,15 +1054,12 @@ class App: :type percentage: float :param text: Text to display on the progress bar. :type text: str - :return: + :return: None """ self.progress_bar.set_text(text) self.progress_bar.set_fraction(percentage) return False - def save_project(self): - return - def get_current(self): """ Returns the currently selected FlatCAMObj in the application. @@ -1063,6 +1067,11 @@ class App: :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: @@ -1256,7 +1265,7 @@ class App: :return: None """ - # Captura the latest changes + # Capture the latest changes try: self.get_current().read_form() except: @@ -1300,6 +1309,7 @@ class App: except: print "WARNING: Failed to parse project file:", filename f.close() + return # Clear the current project self.on_file_new(None) @@ -1387,8 +1397,7 @@ class App: "cb_gerber_plot": "Plot this object on the main window.", "cb_gerber_mergepolys": "Show overlapping polygons as single.", "cb_gerber_solid": "Paint inside polygons.", - "cb_gerber_multicolored": "Draw polygons with different polygons.", - "button1": "" + "cb_gerber_multicolored": "Draw polygons with different polygons." } for widget in tooltips: @@ -1398,19 +1407,36 @@ class App: ## EVENT HANDLERS ## ######################################## def on_offset_object(self, widget): + """ + Offsets the object's geometry by the vector specified + in the form. Re-plots. + + :param widget: Ignored + :return: None + """ + obj = self.get_current() + obj.read_form() assert isinstance(obj, FlatCAMObj) try: vect = self.get_eval("entry_eval_" + obj.kind + "_offset") except: self.info("ERROR: Vector is not in (x, y) format.") + return assert isinstance(obj, Geometry) obj.offset(vect) obj.plot(self.figure) - self.on_zoom_fit(None) + self.on_zoom_fit(None) # TODO: Change this. Just done to aline all axes. return def on_cb_plot_toggled(self, widget): + """ + Callback for toggling the "Plot" checkbox. Re-plots. + + :param widget: Ignored. + :return: None + """ + self.get_current().read_form() self.get_current().plot(self.figure) self.on_zoom_fit(None) # TODO: Does not update correctly otherwise. @@ -1513,7 +1539,6 @@ class App: self.new_object("excellon", "Alignment Drills", obj_init) - def on_toggle_pointbox(self, widget): """ Callback for radio selection change between point and box in the @@ -1618,6 +1643,7 @@ class App: for dim in dimensions: options_set[dim] *= factor + # The scaling factor depending on choice of units. factor = 1/25.4 if self.builder.get_object('rb_mm').get_active(): factor = 25.4 @@ -1629,6 +1655,7 @@ class App: self.options2form() return + # Changing project units. Warn user. label = Gtk.Label("Changing the units of the project causes all geometrical \n" + \ "properties of all objects to be scaled accordingly. Continue?") dialog = Gtk.Dialog("Changing Project Units", self.window, 0, @@ -1644,14 +1671,14 @@ class App: dialog.destroy() if response == Gtk.ResponseType.OK: - print "Converting units..." - print "Converting options..." + #print "Converting units..." + #print "Converting options..." self.read_form() scale_options(factor) self.options2form() for obj in self.stuff: units = self.get_radio_value({"rb_mm": "MM", "rb_inch": "IN"}) - print "Converting ", obj, " to ", units + #print "Converting ", obj, " to ", units self.stuff[obj].convert_units(units) current = self.get_current() if current is not None: @@ -1667,6 +1694,7 @@ class App: self.toggle_units_ignore = False self.read_form() + self.info("Converted units to %s" % self.options["units"]) self.units_label.set_text("[" + self.options["units"] + "]") def on_file_openproject(self, param): @@ -1743,6 +1771,7 @@ class App: :param param: Ignored. :return: None """ + self.options.update(self.defaults) self.options2form() # Update UI @@ -1754,6 +1783,7 @@ class App: :param param: Ignored. :return: None """ + self.defaults.update(self.options) self.options2form() # Update UI @@ -1765,9 +1795,10 @@ class App: :param param: Ignored. :return: None """ + obj = self.get_current() if obj is None: - print "WARNING: No object selected." + self.info("WARNING: No object selected.") return for option in self.options: if option.find(obj.kind + "_") == 0: @@ -1783,9 +1814,10 @@ class App: :param param: Ignored. :return: None """ + obj = self.get_current() if obj is None: - print "WARNING: No object selected." + self.info("WARNING: No object selected.") return obj.read_form() for option in obj.options: @@ -1804,7 +1836,7 @@ class App: """ obj = self.get_current() if obj is None: - print "WARNING: No object selected." + self.info("WARNING: No object selected.") return obj.read_form() for option in obj.options: @@ -1821,9 +1853,10 @@ class App: :param param: Ignored. :return: None """ + obj = self.get_current() if obj is None: - print "WARNING: No object selected." + self.info("WARNING: No object selected.") return for option in self.defaults: if option.find(obj.kind + "_") == 0: @@ -1839,6 +1872,7 @@ class App: :param param: Ignored. :return: None """ + try: f = open("defaults.json") options = f.read() @@ -1877,8 +1911,9 @@ class App: :param widget: The widget from which this was called. Ignore. :return: None """ - combo_sel = self.combo_options.get_active() - print "Options --> ", combo_sel + + #combo_sel = self.combo_options.get_active() + #print "Options --> ", combo_sel self.options2form() def on_options_update(self, widget): @@ -1890,6 +1925,7 @@ class App: :param widget: The widget from which this was called. Ignore. :return: None """ + if self.options_update_ignore: return self.read_form() @@ -1902,8 +1938,8 @@ class App: :param widget: Ignored. :return: None """ + obj = self.get_current() - assert isinstance(obj, FlatCAMObj) factor = self.get_eval("entry_eval_" + obj.kind + "_scalefactor") obj.scale(factor) obj.to_form() @@ -1918,7 +1954,6 @@ class App: :param event: Ignored. :return: None """ - print "on_canvas_configure()" xmin, xmax = self.axes.get_xlim() ymin, ymax = self.axes.get_ylim() @@ -1941,6 +1976,7 @@ class App: """ Callback for request from the Gerber form to generate a bounding box for the geometry in the object. Creates a FlatCAMGeometry with the bounding box. + The box can have rounded corners if specified in the form. :param widget: Ignored. :return: None @@ -1948,12 +1984,13 @@ class App: # TODO: Use Gerber.get_bounding_box(...) gerber = self.get_current() gerber.read_form() - name = self.selected_item_name + "_bbox" + name = gerber.options["name"] + "_bbox" def geo_init(geo_obj, app_obj): assert isinstance(geo_obj, FlatCAMGeometry) + # Bounding box with rounded corners bounding_box = gerber.solid_geometry.envelope.buffer(gerber.options["bboxmargin"]) - if not gerber.options["bboxrounded"]: + if not gerber.options["bboxrounded"]: # Remove rounded corners bounding_box = bounding_box.envelope geo_obj.solid_geometry = bounding_box @@ -1967,19 +2004,19 @@ class App: :param widget: The widget from which this was called. :return: None """ - print "Re-plotting" - self.get_current().read_form() + obj = self.get_current() + obj.read_form() + self.set_progress_bar(0.5, "Plotting...") - #GLib.idle_add(lambda: self.set_progress_bar(0.5, "Plotting...")) def thread_func(app_obj): assert isinstance(app_obj, App) #GLib.idle_add(lambda: app_obj.set_progress_bar(0.5, "Plotting...")) #GLib.idle_add(lambda: app_obj.get_current().plot(app_obj.figure)) - app_obj.get_current().plot(app_obj.figure) + obj.plot(app_obj.figure) GLib.idle_add(lambda: app_obj.on_zoom_fit(None)) - GLib.timeout_add(300, lambda: app_obj.set_progress_bar(0.0, "")) + GLib.timeout_add(300, lambda: app_obj.set_progress_bar(0.0, "Idle")) t = threading.Thread(target=thread_func, args=(self,)) t.daemon = True @@ -1990,29 +2027,28 @@ class App: Callback for button active/click on Excellon form to create a CNC Job for the Excellon file. - :param widget: The widget from which this was called. + :param widget: Ignored :return: None """ - job_name = self.selected_item_name + "_cnc" excellon = self.get_current() - assert isinstance(excellon, FlatCAMExcellon) excellon.read_form() + job_name = excellon.options["name"] + "_cnc" # Object initialization function for app.new_object() def job_init(job_obj, app_obj): - excellon_ = self.get_current() - assert isinstance(excellon_, FlatCAMExcellon) + # excellon_ = self.get_current() + # assert isinstance(excellon_, FlatCAMExcellon) assert isinstance(job_obj, FlatCAMCNCjob) GLib.idle_add(lambda: app_obj.set_progress_bar(0.2, "Creating CNC Job...")) - job_obj.z_cut = excellon_.options["drillz"] - job_obj.z_move = excellon_.options["travelz"] - job_obj.feedrate = excellon_.options["feedrate"] + job_obj.z_cut = excellon.options["drillz"] + job_obj.z_move = excellon.options["travelz"] + job_obj.feedrate = excellon.options["feedrate"] # There could be more than one drill size... # job_obj.tooldia = # TODO: duplicate variable! # job_obj.options["tooldia"] = - job_obj.generate_from_excellon_by_tool(excellon_, excellon_.options["toolselection"]) + job_obj.generate_from_excellon_by_tool(excellon, excellon.options["toolselection"]) GLib.idle_add(lambda: app_obj.set_progress_bar(0.5, "Parsing G-Code...")) job_obj.gcode_parse() @@ -2068,16 +2104,15 @@ class App: :param widget: The widget from which this was called. :return: None """ - name = self.selected_item_name + "_noncopper" + + gerb = self.get_current() + gerb.read_form() + name = gerb.options["name"] + "_noncopper" def geo_init(geo_obj, app_obj): assert isinstance(geo_obj, FlatCAMGeometry) - #gerber = app_obj.stuff[app_obj.selected_item_name] # TODO: Remove. - gerber = app_obj.get_current() - assert isinstance(gerber, FlatCAMGerber) - gerber.read_form() - bounding_box = gerber.solid_geometry.envelope.buffer(gerber.options["noncoppermargin"]) - non_copper = bounding_box.difference(gerber.solid_geometry) + bounding_box = gerb.solid_geometry.envelope.buffer(gerb.options["noncoppermargin"]) + non_copper = bounding_box.difference(gerb.solid_geometry) geo_obj.solid_geometry = non_copper # TODO: Check for None @@ -2091,15 +2126,15 @@ class App: :param widget: The widget from which this was called. :return: None """ - name = self.selected_item_name + "_cutout" + + gerb = self.get_current() + gerb.read_form() + name = gerb.options["name"] + "_cutout" def geo_init(geo_obj, app_obj): - # TODO: get from object - margin = app_obj.get_eval("entry_eval_gerber_cutoutmargin") - gap_size = app_obj.get_eval("entry_eval_gerber_cutoutgapsize") - #gerber = app_obj.stuff[app_obj.selected_item_name] - gerber = app_obj.get_current() - minx, miny, maxx, maxy = gerber.bounds() + margin = gerb.options["cutoutmargin"] + gap_size = gerb.options["cutoutgapsize"] + minx, miny, maxx, maxy = gerb.bounds() minx -= margin maxx += margin miny -= margin @@ -2152,14 +2187,17 @@ class App: :param widget: The widget from which this was called. :return: None """ - print "Generating Isolation Geometry:" - iso_name = self.selected_item_name + "_iso" + + gerb = self.get_current() + gerb.read_form() + iso_name = gerb.options["name"] + "_iso" def iso_init(geo_obj, app_obj): - # TODO: Object must be updated on form change and the options - # TODO: read from the object. - tooldia = app_obj.get_eval("entry_eval_gerber_isotooldia") - geo_obj.solid_geometry = self.get_current().isolation_geometry(tooldia / 2.0) + # Propagate options + geo_obj.options["cnctooldia"] = gerb.options["isotooldia"] + + geo_obj.solid_geometry = gerb.isolation_geometry(gerb.options["isotooldia"] / 2.0) + app_obj.info("Isolation geometry created: %s" % geo_obj.options["name"]) # TODO: Do something if this is None. Offer changing name? self.new_object("geometry", iso_name, iso_init) @@ -2171,26 +2209,26 @@ class App: :param widget: The widget from which this was called. :return: None """ - print "Generating CNC job" - job_name = self.selected_item_name + "_cnc" + + source_geo = self.get_current() + source_geo.read_form() + job_name = source_geo.options["name"] + "_cnc" # Object initialization function for app.new_object() + # RUNNING ON SEPARATE THREAD! def job_init(job_obj, app_obj): assert isinstance(job_obj, FlatCAMCNCjob) - #geometry = app_obj.stuff[app_obj.selected_item_name] - geometry = app_obj.get_current() - assert isinstance(geometry, FlatCAMGeometry) - geometry.read_form() + # Propagate options + job_obj.options["tooldia"] = source_geo.options["cnctooldia"] GLib.idle_add(lambda: app_obj.set_progress_bar(0.2, "Creating CNC Job...")) - job_obj.z_cut = geometry.options["cutz"] - job_obj.z_move = geometry.options["travelz"] - job_obj.feedrate = geometry.options["feedrate"] - job_obj.options["tooldia"] = geometry.options["cnctooldia"] + job_obj.z_cut = source_geo.options["cutz"] + job_obj.z_move = source_geo.options["travelz"] + job_obj.feedrate = source_geo.options["feedrate"] GLib.idle_add(lambda: app_obj.set_progress_bar(0.4, "Analyzing Geometry...")) # TODO: The tolerance should not be hard coded. Just for testing. - job_obj.generate_from_geometry(geometry, tolerance=0.0005) + job_obj.generate_from_geometry(source_geo, tolerance=0.0005) GLib.idle_add(lambda: app_obj.set_progress_bar(0.5, "Parsing G-Code...")) job_obj.gcode_parse() @@ -2204,6 +2242,7 @@ class App: # To be run in separate thread def job_thread(app_obj): app_obj.new_object("cncjob", job_name, job_init) + GLib.idle_add(lambda: app_obj.info("CNCjob created: %s" % job_name)) 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, "")) @@ -2223,9 +2262,11 @@ class App: :param widget: The widget from which this was called. :return: None """ + self.info("Click inside the desired polygon.") geo = self.get_current() geo.read_form() + assert isinstance(geo, FlatCAMGeometry) tooldia = geo.options["painttooldia"] overlap = geo.options["paintoverlap"] @@ -2255,12 +2296,12 @@ class App: :param widget: The widget from which this was called. :return: None """ - def on_success(self, filename): - cncjob = self.get_current() + def on_success(app_obj, filename): + cncjob = app_obj.get_current() f = open(filename, 'w') f.write(cncjob.gcode) f.close() - self.info("Saved to: " + filename) + app_obj.info("Saved to: " + filename) self.file_chooser_save_action(on_success) @@ -2271,7 +2312,9 @@ class App: :param widget: The widget from which this was called. :return: None """ - print "on_delete():", self.selected_item_name + + # Keep this for later + name = copy.copy(self.selected_item_name) # Remove plot self.figure.delaxes(self.get_current().axes) @@ -2283,6 +2326,8 @@ class App: # Update UI self.build_list() # Update the items list + self.info("Object deleted: %s" % name) + def on_toolbar_replot(self, widget): """ Callback for toolbar button. Re-plots all objects. @@ -2320,6 +2365,7 @@ class App: self.stuff[new_name] = self.stuff.pop(self.selected_item_name) # Update dictionary self.stuff[new_name].options["name"] = new_name # update object self.info('Name change: ' + self.selected_item_name + " to " + new_name) + self.selected_item_name = new_name # Update selection name self.build_list() # Update the items list @@ -2337,7 +2383,7 @@ class App: :type selection: Gtk.TreeSelection :return: None """ - print "on_tree_selection_change(): ", + print "DEBUG: on_tree_selection_change(): ", model, treeiter = selection.get_selected() if treeiter is not None: @@ -2346,13 +2392,13 @@ class App: if obj is not None: obj.read_form() - print "You selected", model[treeiter][0] + print "DEBUG: You selected", model[treeiter][0] self.selected_item_name = model[treeiter][0] obj_new = self.get_current() if obj_new is not None: GLib.idle_add(lambda: obj_new.build_ui()) else: - print "Nothing selected" + print "DEBUG: Nothing selected" self.selected_item_name = None self.setup_component_editor() @@ -2391,7 +2437,7 @@ class App: :param param: Whatever is passed by the event. Ignore. :return: None """ - print "quit from menu" + self.window.destroy() Gtk.main_quit() @@ -2402,7 +2448,7 @@ class App: :param param: Whatever is passed by the event. Ignore. :return: None """ - print "quit from X" + self.window.destroy() Gtk.main_quit() @@ -2431,7 +2477,7 @@ class App: t.start() #on_success(self, filename) elif response == Gtk.ResponseType.CANCEL: - print("Cancel clicked") + self.info("Open cancelled.") # print("Cancel clicked") dialog.destroy() def file_chooser_save_action(self, on_success): @@ -2454,7 +2500,7 @@ class App: dialog.destroy() on_success(self, filename) elif response == Gtk.ResponseType.CANCEL: - print("Cancel clicked") + self.info("Save cancelled.") # print("Cancel clicked") dialog.destroy() def on_fileopengerber(self, param): @@ -2536,9 +2582,13 @@ class App: def on_success(app_obj, filename): assert isinstance(app_obj, App) - def obj_init(job_obj, app_obj): - assert isinstance(app_obj, App) - GLib.idle_add(lambda: app_obj.set_progress_bar(0.1, "Opening G-Code ...")) + 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() @@ -2546,13 +2596,13 @@ class App: job_obj.gcode = gcode - GLib.idle_add(lambda: app_obj.set_progress_bar(0.2, "Parsing ...")) + 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 ...")) + 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 ...")) + 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) @@ -2572,6 +2622,7 @@ class App: :param event: Contains information about the event. :return: None """ + try: # May fail in case mouse not within axes self.position_label.set_label("X: %.4f Y: %.4f" % ( event.xdata, event.ydata)) @@ -2594,6 +2645,7 @@ class App: was clicked, the pixel coordinates and the axes coordinates. :return: None """ + # For key presses self.canvas.grab_focus() @@ -2676,7 +2728,7 @@ class App: :param event: Ignored. :return: None """ - print 'you pressed', event.key, event.xdata, event.ydata + #print 'you pressed', event.key, event.xdata, event.ydata if event.key == '1': # 1 self.on_zoom_fit(None) diff --git a/FlatCAM.ui b/FlatCAM.ui index 982696c4..a7703851 100644 --- a/FlatCAM.ui +++ b/FlatCAM.ui @@ -2122,6 +2122,8 @@ THE SOFTWARE. True False + <b>Isolation Routing:</b> Cutting copper +around traces for electrical isolation. 5 0 3 @@ -2146,6 +2148,9 @@ THE SOFTWARE. True False + Tool paths for isolation routing are drawn +at 1/2 of the tool diameter away from +polygons defined in Gerber. 1 3 Tool diam: @@ -2188,6 +2193,8 @@ THE SOFTWARE. True True True + Creates a geometry object with tool +paths for isolation routing. @@ -2201,6 +2208,8 @@ THE SOFTWARE. True False + <b>Board cutout:</b> Cut around +the edge of the board. 5 0 3 @@ -2224,6 +2233,9 @@ THE SOFTWARE. True False + Distance away from the rectangular edge +enclosing the board to generate the +cutting tool path. 1 Margin: @@ -2270,6 +2282,9 @@ THE SOFTWARE. True False + Length of the gaps along the toolpath. +These gaps are needed to hold the +board in place until the job is complete. 1 Gap size: @@ -2304,6 +2319,8 @@ THE SOFTWARE. True True False + Gaps are placed on the top and +bottom edges of the board cutout. 8 0 True @@ -2321,6 +2338,8 @@ THE SOFTWARE. True True False + Gaps are placed on the left and right +edges of the board cutout. 8 0 True @@ -2338,6 +2357,8 @@ THE SOFTWARE. True True False + Gaps are placed on the four edges +of the board cutout. 0 True rb_2lr @@ -2369,6 +2390,8 @@ THE SOFTWARE. True True True + Generates the Geometry object with +toolpaths for board cutout. @@ -2382,6 +2405,12 @@ THE SOFTWARE. True False + <b>Non-copper regions</b>: Use to create +geometry with polygons covering areas +without copper on the board. + +This can be used, for example, to clear all +copper from certain regions. 5 0 3 @@ -2407,6 +2436,12 @@ THE SOFTWARE. True False + Defines how far from the rectangular box +enclosing the contents of the board the +edge of the board is. + +Copper-free areas will be located within +this boundary. 1 Boundary margin: @@ -2444,6 +2479,8 @@ THE SOFTWARE. True True True + Creates a Geometry Object covering +areas without copper. @@ -2457,6 +2494,8 @@ THE SOFTWARE. True False + <b>Bounding Box:</b> A simple rectangular +boundary around the PCB contents. 5 0 3 @@ -2482,6 +2521,9 @@ THE SOFTWARE. True False + Distance from the rectangular box enclosing +the PCB contents at which to draw the +bounding box. 1 Boundary margin: @@ -2519,6 +2561,9 @@ THE SOFTWARE. True True False + Whether to draw rounded corners on the bounding +box. The radius is the Boundary margin. + 0 True @@ -2534,6 +2579,8 @@ THE SOFTWARE. True True True + Generates a Geometry object +with the bounding box. @@ -2547,6 +2594,9 @@ THE SOFTWARE. True False + <b>Scale:</b> Resizes the geometry +of the object. All sizes and coordinates +are multiplied by the given factor. 3 0 3 @@ -2572,6 +2622,8 @@ THE SOFTWARE. True False + Factor by which to multiply all +geometrical dimensions. 1 Factor: @@ -2608,6 +2660,8 @@ THE SOFTWARE. True True True + Scales the geometry +of this object. @@ -2621,6 +2675,8 @@ THE SOFTWARE. True False + <b>Offset:</b> Shift the geometry of +this object by the specified (x, y) vector. 3 0 3 @@ -2646,6 +2702,10 @@ THE SOFTWARE. True False + Vector by which to offset the geometry. +Format is <b>(x, y)</b>, where <b>x</b> and <b>y</b> are +decimal numbers representing the +distance in the corresponding axis. 1 Offset Vector: @@ -2682,6 +2742,8 @@ THE SOFTWARE. True True True + Offset the geometry of +this object. @@ -3472,6 +3534,9 @@ project. True False + Tool paths for isolation routing are drawn +at 1/2 of the tool diameter away from +polygons defined in Gerber. 1 3 Tool diam: diff --git a/camlib.py b/camlib.py index 6d0d71c0..f0335626 100644 --- a/camlib.py +++ b/camlib.py @@ -167,6 +167,14 @@ class Geometry: """ Sets object's attributes from a dictionary. Attributes to include are listed in ``self.ser_attrs``. + This method will look only for only and all the + attributes in ``self.ser_attrs``. They must all + be present. Use only for deserializing saved + objects. + + :param d: Dictionary of attributes to set in the object. + :type d: dict + :return: None """ for attr in self.ser_attrs: setattr(self, attr, d[attr]) @@ -523,8 +531,8 @@ class Gerber (Geometry): Main Gerber parser. Reads Gerber and populates ``self.paths``, ``self.apertures``, ``self.flashes``, ``self.regions`` and ``self.units``. - :param glines: Gerber code as list of strings, each - element being one line of the source file. + :param glines: Gerber code as list of strings, each element being + one line of the source file. :type glines: list :return: None :rtype: None @@ -1219,10 +1227,10 @@ class CNCjob(Geometry): :param append: Wether to append to self.gcode or re-write it. :type append: bool :param tooldia: If given, sets the tooldia property but does - not affect the process in any other way. + not affect the process in any other way. :type tooldia: bool :param tolerance: All points in the simplified object will be within the - tolerance distance of the original geometry. + tolerance distance of the original geometry. :return: None :rtype: None """ @@ -1487,7 +1495,7 @@ class CNCjob(Geometry): :param polygon: A Shapely.Polygon :type polygon: Shapely.Polygon :param tolerance: All points in the simplified object will be within the - tolerance distance of the original geometry. + tolerance distance of the original geometry. :type tolerance: float :return: G-code to cut along polygon. :rtype: str @@ -1522,7 +1530,7 @@ class CNCjob(Geometry): :param linear: The path to cut along. :type: Shapely.LinearRing or Shapely.Linear String :param tolerance: All points in the simplified object will be within the - tolerance distance of the original geometry. + tolerance distance of the original geometry. :type tolerance: float :return: G-code to cut alon the linear feature. :rtype: str diff --git a/doc/build/.doctrees/environment.pickle b/doc/build/.doctrees/environment.pickle index ad947bc6..d97c4451 100644 Binary files a/doc/build/.doctrees/environment.pickle and b/doc/build/.doctrees/environment.pickle differ diff --git a/doc/build/.doctrees/index.doctree b/doc/build/.doctrees/index.doctree index 07e89526..b8e1ac22 100644 Binary files a/doc/build/.doctrees/index.doctree and b/doc/build/.doctrees/index.doctree differ diff --git a/doc/build/genindex.html b/doc/build/genindex.html index ba92f742..656891a8 100644 --- a/doc/build/genindex.html +++ b/doc/build/genindex.html @@ -131,6 +131,7 @@ | R | S | T + | V | Z @@ -392,11 +393,19 @@
-
offset() (FlatCAM.Excellon method) +
offset() (FlatCAM.CNCjob method)
+
(FlatCAM.Excellon method) +
+ + +
(FlatCAM.FlatCAMGeometry method) +
+ +
(FlatCAM.Geometry method)
@@ -418,6 +427,10 @@ +
on_cb_plot_toggled() (FlatCAM.App method) +
+ +
on_clear_plots() (FlatCAM.App method)
@@ -536,6 +549,10 @@ +
on_offset_object() (FlatCAM.App method) +
+ +
on_options_app2object() (FlatCAM.App method)
@@ -626,9 +643,15 @@
-
parse_file() (FlatCAM.Gerber method) +
parse_file() (FlatCAM.Excellon method)
+
+ +
(FlatCAM.Gerber method) +
+ +
parse_lines() (FlatCAM.Excellon method)
@@ -693,6 +716,12 @@
read_form_item() (FlatCAM.App method)
+
+ +
(FlatCAM.FlatCAMObj method) +
+ +
@@ -713,6 +742,10 @@ +
(FlatCAM.FlatCAMGeometry method) +
+ +
(FlatCAM.Geometry method)
@@ -788,6 +821,16 @@
+

V

+ + +
+ +
versionCheck() (FlatCAM.App method) +
+ +
+

Z

diff --git a/doc/build/index.html b/doc/build/index.html index 27e54ea1..55d15d24 100644 --- a/doc/build/index.html +++ b/doc/build/index.html @@ -381,6 +381,22 @@ as to use the whole canvas.

+
+
+on_cb_plot_toggled(widget)
+

Callback for toggling the “Plot” checkbox. Re-plots.

+ +++ + + + + + +
Parameters:widget – Ignored.
Returns:None
+
+
on_clear_plots(widget)
@@ -756,7 +772,7 @@ create a CNC Job for the Excellon file.

-Parameters:widget – The widget from which this was called. +Parameters:widget – Ignored Returns:None @@ -768,7 +784,8 @@ create a CNC Job for the Excellon file.

on_generate_gerber_bounding_box(widget)

Callback for request from the Gerber form to generate a bounding box for the -geometry in the object. Creates a FlatCAMGeometry with the bounding box.

+geometry in the object. Creates a FlatCAMGeometry with the bounding box. +The box can have rounded corners if specified in the form.

@@ -909,6 +926,23 @@ For details, see: +
+on_offset_object(widget)
+

Offsets the object’s geometry by the vector specified +in the form. Re-plots.

+
+++ + + + + + +
Parameters:widget – Ignored
Returns:None
+
+
on_options_app2object(param)
@@ -1417,7 +1451,7 @@ in the GUI. This selection will in turn trigger -Returns:

+Returns:

None

@@ -1488,6 +1522,22 @@ displayed.

+
+
+versionCheck()
+

Checks for the latest version of the program. Alerts the +user if theirs is outdated. This method is meant to be run +in a saeparate thread.

+ +++ + + + +
Returns:None
+
+
zoom(factor, center=None)
@@ -1553,7 +1603,21 @@ it again in descendents.

from_dict(d)

Sets object’s attributes from a dictionary. -Attributes to include are listed in self.ser_attrs.

+Attributes to include are listed in self.ser_attrs. +This method will look only for only and all the +attributes in self.ser_attrs. They must all +be present. Use only for deserializing saved +objects.

+ +++ + + + + + +
Parameters:d (dict) – Dictionary of attributes to set in the object.
Returns:None
@@ -1876,14 +1940,15 @@ read from the given file.

-Parameters:glines – Gerber code as list of strings, each +Parameters:glines (list) – Gerber code as list of strings, each element being +one line of the source file. + +Returns:None + +Return type:None -

element being one line of the source file. -:type glines: list -:return: None -:rtype: None

@@ -1950,10 +2015,37 @@ the size (diameter).
+
+
+parse_file(filename)
+

Reads the specified file as array of lines as +passes it to parse_lines().

+ +++ + + + + + +
Parameters:filename (str) – The file to be read and parsed.
Returns:None
+
+
parse_lines(elines)

Main Excellon parser.

+ +++ + + + + + +
Parameters:elines (list) – List of strings, each being a line of Excellon code.
Returns:None
@@ -2057,21 +2149,24 @@ for the specified tools.

-Parameters:
@@ -2084,24 +2179,44 @@ tolerance distance of the original geometry. Parameters: -Type:

Shapely.LinearRing or Shapely.Linear String

+Type:

Shapely.LinearRing or Shapely.Linear String

+ + +Returns:

G-code to cut alon the linear feature.

+ + +Return type:

str

-

tolerance distance of the original geometry. -:type tolerance: float -:return: G-code to cut alon the linear feature. -:rtype: str

+
+ +
+
+offset(vect)
+

Offsets all the geometry on the XY plane in the object by the +given vector.

+ +++ + + + + + +
Parameters:vect (tuple) – (x, y) offset vector.
Returns:None
-plot2(axes, tooldia=None, dpi=75, margin=0.1, color={'C': ['#5E6CFF', '#4650BD'], 'T': ['#F0E24D', '#B5AB3A']}, alpha={'C': 1.0, 'T': 0.3}, tool_tolerance=0.001)
+plot2(axes, tooldia=None, dpi=75, margin=0.1, color={'C': ['#5E6CFF', '#4650BD'], 'T': ['#F0E24D', '#B5AB3A']}, alpha={'C': 1.0, 'T': 0.3}, tool_tolerance=0.0005)

Plots the G-code job onto the given axes.

@@ -2134,18 +2249,21 @@ of a polygon.

- + + + +
Parameters:
    +
Parameters:
  • polygon (Shapely.Polygon) – A Shapely.Polygon
  • -
  • tolerance – All points in the simplified object will be within the
  • +
  • tolerance (float) – All points in the simplified object will be within the +tolerance distance of the original geometry.
Returns:

G-code to cut along polygon.

+
Return type:

str

+
-

tolerance distance of the original geometry. -:type tolerance: float -:return: G-code to cut along polygon. -:rtype: str

@@ -2210,10 +2328,16 @@ by the user in their respective forms.

deserialize(obj_dict)
-

Re-builds an object from its serialized version. -@param obj_dict: Dictionary representing a FlatCAMObj -@type obj_dict: dict -@return None

+

Re-builds an object from its serialized version.

+ +++ + + + +
Parameters:obj_dict (dict) – Dictionary representing a FlatCAMObj
+

:return None

@@ -2239,19 +2363,43 @@ clears them. Descendants must do the actual plotting.

+
+
+read_form_item(option)
+

Reads the specified option from the UI form into self.options.

+ +++ + + + + + +
Parameters:option (str) – Name of the option.
Returns:None
+
+
serialize()

Returns a representation of the object as a dictionary so -it can be later exported as JSON. Override this method. -@return: Dictionary representing the object -@rtype: dict

+it can be later exported as JSON. Override this method.

+ +++ + + + + + +
Returns:Dictionary representing the object
Return type:dict
set_form_item(option)
-

Copies the specified options to the UI form.

+

Copies the specified option to the UI form.

@@ -2342,7 +2490,7 @@ and options.

class FlatCAM.FlatCAMExcellon(name)
-

Represents Excellon code.

+

Represents Excellon/Drill code.

@@ -2356,6 +2504,42 @@ and options.

class FlatCAM.FlatCAMGeometry(name)

Geometric object not associated with a specific format.

+
+
+offset(vect)
+

Offsets all geometry by a given vector/

+
+++ + + + + + + + +
Parameters:vect (tuple) – (x, y) vector by which to offset the object’s geometry.
Returns:None
Return type:None
+
+ +
+
+scale(factor)
+

Scales all geometry by a given factor.

+ +++ + + + + + + + +
Parameters:factor (float) – Factor by which to scale the object’s geometry/
Returns:None
Return type:None
+
+
diff --git a/doc/build/objects.inv b/doc/build/objects.inv index 61b6b583..10cbc991 100644 Binary files a/doc/build/objects.inv and b/doc/build/objects.inv differ diff --git a/doc/build/searchindex.js b/doc/build/searchindex.js index 0363d6c5..1016c824 100644 --- a/doc/build/searchindex.js +++ b/doc/build/searchindex.js @@ -1 +1 @@ -Search.setIndex({envversion:42,terms:{represent:0,all:0,code:0,toolpath:0,replot:0,focus:0,cirkuixgerb:[],follow:0,on_key_over_plot:0,whose:0,get_ev:0,on_options_upd:0,flash:0,specif:0,gerber:0,buffer_path:0,on_click_over_plot:0,plot_al:0,set_current_pag:0,digit:0,sourc:0,everi:0,string:0,far:0,mous:0,"5e6cff":0,obround:0,untouch:0,toolshap:0,button:0,list:0,item:0,adjust:0,specal:0,round:0,get_radio_valu:0,create_geometri:0,natur:0,zero:0,pass:0,further:[],rectangular:0,click:0,append:0,index:0,load_default:0,neg:0,current:0,delet:0,version:0,"new":0,method:0,whatev:0,widget:0,cirkuixobj:[],flatcamgeometri:0,gener:0,new_object:0,matplotlib:0,adjust_ax:0,on_create_aligndril:0,path:0,along:0,becom:0,modifi:0,valu:0,box:0,convert:0,on_file_saveprojectcopi:0,action:0,chang:0,on_activate_nam:0,on_options_object2app:0,diamet:0,via:0,app:0,on_fileopengerb:0,filenam:0,ymin:0,unit:0,frac_digit:0,plot:0,from:0,describ:0,doubl:0,chooser:0,setup_component_editor:0,call:0,save:0,type:0,more:0,on_toolbar_replot:0,on_delet:0,combo:0,on_gerber_generate_cutout:0,parse_fil:0,known:0,hole:0,must:0,on_file_openproject:0,none:0,ser_attr:0,work:0,gtext:0,can:0,drill:0,z_move:0,overrid:0,polygon2gcod:0,give:0,process:0,share:0,on_zoom_out:0,stroke:0,minimum:0,tab:0,xmin:0,serial:0,z_cut:0,alwai:0,surfac:0,fix_region:0,write:0,fals:0,circular:0,parse_lin:0,resourc:0,after:0,befor:0,notebook:0,mai:0,setup_obj_class:0,associ:0,entry_text:0,correspond:0,element:0,callback:0,"switch":0,maintain:0,enter:0,on_replot:[],on_file_saveprojecta:0,travel:0,copper:0,elin:0,comma:0,affect:0,on_excellon_tool_choos:0,paramet:0,fit:0,save_project:0,chosen:0,fix:0,gtk:0,set_list_select:0,window:0,pcb:0,on_options_app2object:0,main:[],pixel:0,non:0,"float":0,"return":0,thei:0,handl:0,rectangl:0,f0e24d:0,vect:0,build_list:0,project_filenam:0,choic:0,name:0,separ:0,solid_geometri:0,each:0,found:0,updat:0,gui:0,read_form:0,b5ab3a:0,on_closewindow:0,continu:0,cirkuixcncjob:[],event:0,out:0,on_tree_selection_chang:0,on_eval_upd:0,generate_from_excellon_by_tool:0,content:0,vector:0,geom:0,clear_polygon:0,flatcamcncjob:0,linear:0,insid:0,loc:0,precaut:0,given:0,flatcamexcellon:0,base:0,dictionari:0,org:0,care:0,generate_from_geometri:0,thread:0,launch:0,motion:0,turn:0,plane:0,place:0,geometri:0,treeselect:0,onto:0,origin:0,dimens:0,on_zoom_in:0,arrai:0,file_chooser_act:0,restrict:0,done:0,overwrit:0,thick:0,open:0,size:0,differ:0,on_toggle_unit:0,data:0,interact:0,flatcamobj:0,attach:0,store:0,editor:0,option:0,tool:0,copi:0,specifi:0,get_empty_area:0,generate_from_excellon:0,part:0,pars:0,number:0,get_bounding_box:0,kind:0,whenev:0,tree:0,entry_ev:0,project:0,str:0,build_ui:0,posit:0,initi:0,ani:0,do_flash:0,have:0,need:0,inform:0,rout:0,note:0,also:0,on_options_object2project:0,build:0,which:0,event_handl:0,interior:0,on_success:0,singl:0,simplifi:0,buffer:0,object:0,pair:0,alpha:0,segment:0,"class":0,don:0,appertur:0,clear:0,later:0,cover:0,on_mouse_move_over_plot:0,populate_objects_combo:0,axi:0,width:0,thicken:0,show:0,text:0,apertur:0,radiu:0,syntax:0,radio:0,corner:0,on_about:0,find:0,on_scale_object:0,onli:0,slow:0,ratio:0,menu:0,configur:0,activ:0,state:0,should:0,comboboxtext:0,clipboard:0,dict:0,factor:0,over:0,on_options_combo_chang:0,hit:0,get:0,on_entry_eval_activ:0,on_options_app2project:0,multipolygon:0,bar:0,on_create_mirror:0,to_dict:0,xmax:0,contain:0,where:0,dpi:0,set:0,keyboard:0,startup:0,on_cncjob_exportgcod:0,maximum:0,"4650bd":0,see:0,result:0,close:0,contour:0,statu:0,extend:0,boundari:0,figur:0,between:0,progress:0,attribut:0,accord:0,kei:0,complement:0,isol:0,job:0,entir:0,here:0,toler:0,popul:0,both:0,feedrat:0,rtype:0,region:0,alon:0,setup_project_list:0,instanc:0,whole:0,col:0,obj_dict:0,load:0,cncjob:0,point:0,color:0,height:0,enlarg:0,shortcut:0,respect:0,throughout:0,duplic:0,quit:0,do_someth:0,convert_unit:0,addition:0,been:0,mark:0,compon:0,json:0,trigger:0,toolbar:0,open_project:0,subscrib:0,immedi:0,radio_set:0,gcode:0,imag:0,search:0,on_file_savedefault:0,coordin:0,on_options_project2object:0,func:0,present:0,inhibit:0,therefor:0,align:0,properti:0,alter:0,dest:0,defin:0,"while":0,setup_ax:0,margin:0,howev:[],propag:0,layer:0,them:0,equal:0,exterior:0,on_fileopengcod:0,"__init__":0,around:0,format:0,same:0,respresent:0,html:0,descend:0,tool_toler:0,complet:0,http:0,widget_nam:0,upon:0,user:0,canva:0,typic:[],appropri:0,off:0,center:0,cirkuixexcellon:[],entri:0,knd:[],well:0,"_app_":0,without:0,on_file_new:0,thi:[],choos:0,on_generate_paintarea:0,self:0,left:0,distanc:0,identifi:0,just:0,isolation_geometri:0,flatcamgerb:0,rest:0,shape:0,aspect:0,linestr:0,speed:0,yet:[],wether:0,cut:0,on_tools_doublesid:0,param:0,add:0,valid:0,board:0,subsequ:0,modul:0,pre_pars:0,take:0,applic:0,gcode_pars:0,transpar:0,read:0,on_file_saveproject:0,grid:0,background:0,press:0,bit:[],on_gerber_generate_noncopp:0,like:0,success:0,zoom:0,integ:0,from_dict:0,necessari:0,either:0,exobj:0,on_clear_plot:0,page:0,depend:0,clear_plot:0,int_digit:0,on_generate_isol:0,some:[],back:0,percentag:0,on_zoom_fit:0,setup_component_view:[],radiobutton:0,"export":0,mirror:0,plot2:0,on_generate_excellon_cncjob:0,scale:0,bottom:0,definit:0,overlap:0,on_update_plot:0,attac:[],flash_geometri:0,cnc:0,backend:0,machin:0,previou:0,run:0,flatcam:[],usag:0,plote:0,offset:0,on_toggle_pointbox:0,about:0,actual:0,file_chooser_save_act:0,options2form:0,on_generate_cncjob:0,side:0,dialog:0,constructor:0,options_update_ignor:0,on_fileopenexcellon:0,setup_plot:0,regist:0,within:0,encod:0,bound:0,excellon:0,pute:0,accordingli:0,ymax:0,wai:0,area:0,transfer:0,support:0,fast:0,start:0,clear_poli:0,get_curr:0,includ:0,fraction:0,on_canvas_configur:0,select:0,"function":0,creation:0,linear2gcod:0,form:0,tupl:0,cirkuixgeometri:[],set_progress_bar:0,line:0,"true":0,info:0,made:0,on_generate_gerber_bounding_box:0,"default":0,access:0,displai:0,tooldia:0,record:0,limit:0,featur:0,buffered_path:0,creat:0,request:0,dure:0,parser:0,aperture_pars:0,repres:0,"char":[],set_form_item:0,on_row_activ:0,exist:0,file:[],doe:0,check:0,again:0,tick:0,aplic:0,polygon:0,titl:0,to_form:0,when:0,detail:0,invalid:0,field:0,other:0,bool:0,gline:0,ignor:0,on_options_project2app:0,read_form_item:0,deseri:0,variabl:0,draw:0,initil:[],eval:0,geometr:0,on_filequit:0},objtypes:{"0":"py:module","1":"py:method","2":"py:class","3":"py:attribute"},objnames:{"0":["py","module","Python module"],"1":["py","method","Python method"],"2":["py","class","Python class"],"3":["py","attribute","Python attribute"]},filenames:["index"],titles:["Welcome to FlatCAM’s documentation!"],objects:{"":{FlatCAM:[0,0,0,"-"]},FlatCAM:{CNCjob:[0,2,1,""],FlatCAMExcellon:[0,2,1,""],Geometry:[0,2,1,""],App:[0,2,1,""],FlatCAMObj:[0,2,1,""],Gerber:[0,2,1,""],FlatCAMGeometry:[0,2,1,""],FlatCAMGerber:[0,2,1,""],Excellon:[0,2,1,""],FlatCAMCNCjob:[0,2,1,""]},"FlatCAM.FlatCAMGerber":{convert_units:[0,1,1,""],plot:[0,1,1,""]},"FlatCAM.Geometry":{convert_units:[0,1,1,""],scale:[0,1,1,""],to_dict:[0,1,1,""],bounds:[0,1,1,""],get_empty_area:[0,1,1,""],isolation_geometry:[0,1,1,""],from_dict:[0,1,1,""],clear_polygon:[0,1,1,""],offset:[0,1,1,""],size:[0,1,1,""]},"FlatCAM.App":{on_options_object2app:[0,1,1,""],setup_plot:[0,1,1,""],on_tree_selection_changed:[0,1,1,""],on_canvas_configure:[0,1,1,""],on_zoom_in:[0,1,1,""],on_delete:[0,1,1,""],on_about:[0,1,1,""],on_closewindow:[0,1,1,""],on_click_over_plot:[0,1,1,""],on_row_activated:[0,1,1,""],on_fileopengerber:[0,1,1,""],file_chooser_action:[0,1,1,""],on_zoom_out:[0,1,1,""],on_zoom_fit:[0,1,1,""],clear_plots:[0,1,1,""],on_file_savedefaults:[0,1,1,""],on_generate_excellon_cncjob:[0,1,1,""],set_form_item:[0,1,1,""],plot_all:[0,1,1,""],read_form:[0,1,1,""],on_generate_isolation:[0,1,1,""],on_key_over_plot:[0,1,1,""],on_options_project2app:[0,1,1,""],on_gerber_generate_noncopper:[0,1,1,""],on_scale_object:[0,1,1,""],new_object:[0,1,1,""],on_activate_name:[0,1,1,""],get_eval:[0,1,1,""],on_update_plot:[0,1,1,""],save_project:[0,1,1,""],on_options_object2project:[0,1,1,""],setup_component_editor:[0,1,1,""],get_current:[0,1,1,""],open_project:[0,1,1,""],on_options_update:[0,1,1,""],on_file_new:[0,1,1,""],on_options_app2object:[0,1,1,""],read_form_item:[0,1,1,""],on_toolbar_replot:[0,1,1,""],on_entry_eval_activate:[0,1,1,""],on_tools_doublesided:[0,1,1,""],on_options_combo_change:[0,1,1,""],setup_obj_classes:[0,1,1,""],on_file_saveproject:[0,1,1,""],setup_project_list:[0,1,1,""],on_generate_gerber_bounding_box:[0,1,1,""],on_options_project2object:[0,1,1,""],on_eval_update:[0,1,1,""],build_list:[0,1,1,""],on_toggle_pointbox:[0,1,1,""],set_progress_bar:[0,1,1,""],on_file_saveprojectas:[0,1,1,""],info:[0,1,1,""],on_file_openproject:[0,1,1,""],on_options_app2project:[0,1,1,""],adjust_axes:[0,1,1,""],on_file_saveprojectcopy:[0,1,1,""],on_create_mirror:[0,1,1,""],file_chooser_save_action:[0,1,1,""],on_excellon_tool_choose:[0,1,1,""],on_generate_cncjob:[0,1,1,""],zoom:[0,1,1,""],on_clear_plots:[0,1,1,""],on_mouse_move_over_plot:[0,1,1,""],on_fileopengcode:[0,1,1,""],on_gerber_generate_cutout:[0,1,1,""],load_defaults:[0,1,1,""],populate_objects_combo:[0,1,1,""],on_create_aligndrill:[0,1,1,""],on_generate_paintarea:[0,1,1,""],get_radio_value:[0,1,1,""],on_filequit:[0,1,1,""],on_cncjob_exportgcode:[0,1,1,""],on_toggle_units:[0,1,1,""],options2form:[0,1,1,""],set_list_selection:[0,1,1,""],on_fileopenexcellon:[0,1,1,""]},"FlatCAM.CNCjob":{gcode_parse:[0,1,1,""],polygon2gcode:[0,1,1,""],generate_from_excellon_by_tool:[0,1,1,""],linear2gcode:[0,1,1,""],pre_parse:[0,1,1,""],generate_from_excellon:[0,1,1,""],scale:[0,1,1,""],generate_from_geometry:[0,1,1,""],plot2:[0,1,1,""]},"FlatCAM.Excellon":{parse_lines:[0,1,1,""],scale:[0,1,1,""],offset:[0,1,1,""]},"FlatCAM.FlatCAMObj":{read_form:[0,1,1,""],plot:[0,1,1,""],serialize:[0,1,1,""],deserialize:[0,1,1,""],build_ui:[0,1,1,""],to_form:[0,1,1,""],setup_axes:[0,1,1,""],set_form_item:[0,1,1,""]},"FlatCAM.Gerber":{aperture_parse:[0,1,1,""],scale:[0,1,1,""],frac_digits:[0,3,1,""],buffer_paths:[0,1,1,""],parse_lines:[0,1,1,""],create_geometry:[0,1,1,""],fix_regions:[0,1,1,""],int_digits:[0,3,1,""],offset:[0,1,1,""],parse_file:[0,1,1,""],get_bounding_box:[0,1,1,""],do_flashes:[0,1,1,""]}},titleterms:{document:0,welcom:0,thi:[],indic:0,cirkuix:[],camlib:[],file:[],tabl:0,main:[],flatcam:0}}) \ No newline at end of file +Search.setIndex({envversion:42,terms:{represent:0,all:0,code:0,toolpath:0,replot:0,focus:0,cirkuixgerb:[],follow:0,on_key_over_plot:0,whose:0,get_ev:0,on_options_upd:0,flash:0,specif:0,gerber:0,buffer_path:0,on_click_over_plot:0,plot_al:0,set_current_pag:0,digit:0,sourc:0,everi:0,string:0,far:0,mous:0,"5e6cff":0,obround:0,untouch:0,on_cb_plot_toggl:0,toolshap:0,button:0,list:0,item:0,adjust:0,specal:0,round:0,get_radio_valu:0,create_geometri:0,natur:0,zero:0,pass:0,further:[],rectangular:0,click:0,append:0,index:0,neg:0,current:0,delet:0,version:0,"new":0,method:0,whatev:0,widget:0,cirkuixobj:[],flatcamgeometri:0,gener:0,load_default:0,matplotlib:0,adjust_ax:0,on_create_aligndril:0,path:0,along:0,becom:0,modifi:0,valu:0,box:0,convert:0,new_object:0,on_file_saveprojectcopi:0,action:0,chang:0,on_activate_nam:0,on_options_object2app:0,diamet:0,via:0,app:0,on_fileopengerb:0,filenam:0,ymin:0,unit:0,frac_digit:0,plot:0,from:0,describ:0,doubl:0,chooser:0,setup_component_editor:0,call:0,save:0,type:0,toggl:0,more:0,on_toolbar_replot:0,on_delet:0,combo:0,on_gerber_generate_cutout:0,parse_fil:0,known:0,hole:0,must:0,on_file_openproject:0,none:0,ser_attr:0,work:0,gtext:0,can:0,drill:0,z_move:0,overrid:0,polygon2gcod:0,give:0,process:0,share:0,on_zoom_out:0,stroke:0,minimum:0,tab:0,xmin:0,serial:0,z_cut:0,alwai:0,surfac:0,fix_region:0,write:0,fals:0,circular:0,parse_lin:0,resourc:0,after:0,befor:0,notebook:0,mai:0,setup_obj_class:0,associ:0,entry_text:0,correspond:0,element:0,callback:0,"switch":0,maintain:0,enter:0,on_replot:[],on_file_saveprojecta:0,travel:0,checkbox:0,copper:0,elin:0,comma:0,affect:0,on_excellon_tool_choos:0,paramet:0,fit:0,save_project:0,chosen:0,fix:0,gtk:0,set_list_select:0,window:0,pcb:0,on_options_app2object:0,main:[],pixel:0,non:0,"float":0,"return":0,thei:0,handl:0,rectangl:0,f0e24d:0,vect:0,build_list:0,project_filenam:0,choic:0,name:0,separ:0,solid_geometri:0,each:0,found:0,updat:0,gui:0,read_form:0,b5ab3a:0,on_closewindow:0,continu:0,cirkuixcncjob:[],event:0,out:0,on_tree_selection_chang:0,on_eval_upd:0,generate_from_excellon_by_tool:0,content:0,vector:0,geom:0,clear_polygon:0,on_offset_object:0,flatcamcncjob:0,linear:0,insid:0,loc:0,precaut:0,given:0,flatcamexcellon:0,base:0,dictionari:0,latest:0,org:0,care:0,generate_from_geometri:0,thread:0,launch:0,motion:0,turn:0,plane:0,place:0,geometri:0,treeselect:0,onto:0,origin:0,dimens:0,on_zoom_in:0,arrai:0,file_chooser_act:0,restrict:0,saepar:0,done:0,overwrit:0,thick:0,open:0,size:0,differ:0,on_toggle_unit:0,data:0,interact:0,flatcamobj:0,attach:0,store:0,editor:0,option:0,tool:0,copi:0,specifi:0,get_empty_area:0,generate_from_excellon:0,part:0,pars:0,number:0,get_bounding_box:0,kind:0,whenev:0,tree:0,entry_ev:0,project:0,str:0,build_ui:0,posit:0,initi:0,ani:0,do_flash:0,have:0,need:0,inform:0,rout:0,note:0,also:0,on_options_object2project:0,build:0,which:0,event_handl:0,interior:0,on_success:0,singl:0,simplifi:0,buffer:0,object:0,pair:0,alpha:0,segment:0,"class":0,don:0,appertur:0,clear:0,later:0,cover:0,on_mouse_move_over_plot:0,populate_objects_combo:0,axi:0,width:0,thicken:0,show:0,text:0,apertur:0,radiu:0,syntax:0,radio:0,corner:0,on_about:0,find:0,on_scale_object:0,onli:0,slow:0,ratio:0,menu:0,configur:0,activ:0,state:0,should:0,comboboxtext:0,clipboard:0,dict:0,factor:0,over:0,on_options_combo_chang:0,meant:0,hit:0,get:0,on_entry_eval_activ:0,on_options_app2project:0,multipolygon:0,bar:0,on_create_mirror:0,to_dict:0,xmax:0,contain:0,where:0,dpi:0,set:0,keyboard:0,startup:0,on_cncjob_exportgcod:0,maximum:0,"4650bd":0,see:0,result:0,close:0,contour:0,statu:0,extend:0,boundari:0,figur:0,between:0,progress:0,attribut:0,accord:0,kei:0,complement:0,isol:0,job:0,entir:0,here:0,toler:0,popul:0,both:0,feedrat:0,rtype:0,region:0,alon:0,setup_project_list:0,instanc:0,whole:0,col:0,obj_dict:0,load:0,cncjob:0,point:0,color:0,height:0,enlarg:0,shortcut:0,respect:0,throughout:0,duplic:0,quit:0,do_someth:0,convert_unit:0,addition:0,been:0,mark:0,pute:0,json:0,trigger:0,toolbar:0,open_project:0,subscrib:0,immedi:0,radio_set:0,gcode:0,imag:0,search:0,on_file_savedefault:0,coordin:0,on_options_project2object:0,func:0,present:0,versioncheck:0,inhibit:0,therefor:0,look:0,align:0,properti:0,alter:0,dest:0,defin:0,"while":0,setup_ax:0,margin:0,howev:[],propag:0,layer:0,them:0,equal:0,exterior:0,on_fileopengcod:0,"__init__":0,around:0,format:0,same:0,respresent:0,html:0,descend:0,tool_toler:0,complet:0,http:0,widget_nam:0,upon:0,alert:0,user:0,canva:0,typic:[],appropri:0,off:0,center:0,cirkuixexcellon:[],entri:0,knd:[],well:0,"_app_":0,without:0,on_file_new:0,thi:[],choos:0,on_generate_paintarea:0,self:0,left:0,distanc:0,identifi:0,just:0,isolation_geometri:0,flatcamgerb:0,rest:0,shape:0,aspect:0,linestr:0,speed:0,yet:[],wether:0,cut:0,on_tools_doublesid:0,param:0,add:0,valid:0,board:0,subsequ:0,modul:0,pre_pars:0,take:0,applic:0,gcode_pars:0,transpar:0,read:0,on_file_saveproject:0,grid:0,background:0,press:0,bit:[],on_gerber_generate_noncopp:0,like:0,success:0,zoom:0,integ:0,from_dict:0,necessari:0,either:0,exobj:0,on_clear_plot:0,page:0,depend:0,clear_plot:0,int_digit:0,on_generate_isol:0,some:[],back:0,percentag:0,on_zoom_fit:0,setup_component_view:[],radiobutton:0,"export":0,mirror:0,plot2:0,on_generate_excellon_cncjob:0,scale:0,bottom:0,definit:0,overlap:0,on_update_plot:0,attac:[],flash_geometri:0,cnc:0,backend:0,machin:0,previou:0,run:0,flatcam:[],usag:0,plote:0,offset:0,on_toggle_pointbox:0,about:0,actual:0,file_chooser_save_act:0,options2form:0,on_generate_cncjob:0,side:0,dialog:0,constructor:0,options_update_ignor:0,on_fileopenexcellon:0,setup_plot:0,regist:0,within:0,encod:0,bound:0,excellon:0,compon:0,accordingli:0,ymax:0,wai:0,area:0,transfer:0,support:0,fast:0,start:0,clear_poli:0,get_curr:0,includ:0,fraction:0,on_canvas_configur:0,select:0,"function":0,creation:0,linear2gcod:0,form:0,tupl:0,cirkuixgeometri:[],set_progress_bar:0,line:0,"true":0,info:0,made:0,on_generate_gerber_bounding_box:0,"default":0,access:0,displai:0,tooldia:0,record:0,limit:0,featur:0,buffered_path:0,creat:0,request:0,dure:0,parser:0,aperture_pars:0,repres:0,"char":[],set_form_item:0,on_row_activ:0,exist:0,file:[],doe:0,check:0,again:0,tick:0,aplic:0,polygon:0,titl:0,to_form:0,when:0,detail:0,invalid:0,field:0,other:0,bool:0,program:0,gline:0,ignor:0,on_options_project2app:0,read_form_item:0,deseri:0,variabl:0,draw:0,initil:[],eval:0,outdat:0,geometr:0,on_filequit:0},objtypes:{"0":"py:module","1":"py:method","2":"py:class","3":"py:attribute"},objnames:{"0":["py","module","Python module"],"1":["py","method","Python method"],"2":["py","class","Python class"],"3":["py","attribute","Python attribute"]},filenames:["index"],titles:["Welcome to FlatCAM’s documentation!"],objects:{"":{FlatCAM:[0,0,0,"-"]},FlatCAM:{CNCjob:[0,2,1,""],FlatCAMExcellon:[0,2,1,""],Geometry:[0,2,1,""],App:[0,2,1,""],FlatCAMObj:[0,2,1,""],Gerber:[0,2,1,""],FlatCAMGeometry:[0,2,1,""],FlatCAMGerber:[0,2,1,""],Excellon:[0,2,1,""],FlatCAMCNCjob:[0,2,1,""]},"FlatCAM.FlatCAMGerber":{convert_units:[0,1,1,""],plot:[0,1,1,""]},"FlatCAM.CNCjob":{gcode_parse:[0,1,1,""],polygon2gcode:[0,1,1,""],generate_from_excellon_by_tool:[0,1,1,""],linear2gcode:[0,1,1,""],pre_parse:[0,1,1,""],generate_from_excellon:[0,1,1,""],scale:[0,1,1,""],generate_from_geometry:[0,1,1,""],offset:[0,1,1,""],plot2:[0,1,1,""]},"FlatCAM.Geometry":{convert_units:[0,1,1,""],scale:[0,1,1,""],to_dict:[0,1,1,""],bounds:[0,1,1,""],get_empty_area:[0,1,1,""],isolation_geometry:[0,1,1,""],from_dict:[0,1,1,""],clear_polygon:[0,1,1,""],offset:[0,1,1,""],size:[0,1,1,""]},"FlatCAM.App":{on_options_object2app:[0,1,1,""],setup_plot:[0,1,1,""],on_tree_selection_changed:[0,1,1,""],on_canvas_configure:[0,1,1,""],on_zoom_in:[0,1,1,""],on_delete:[0,1,1,""],on_about:[0,1,1,""],on_closewindow:[0,1,1,""],on_click_over_plot:[0,1,1,""],on_row_activated:[0,1,1,""],on_fileopengerber:[0,1,1,""],file_chooser_action:[0,1,1,""],on_zoom_out:[0,1,1,""],on_zoom_fit:[0,1,1,""],clear_plots:[0,1,1,""],on_file_savedefaults:[0,1,1,""],on_generate_excellon_cncjob:[0,1,1,""],set_form_item:[0,1,1,""],plot_all:[0,1,1,""],read_form:[0,1,1,""],on_generate_isolation:[0,1,1,""],on_key_over_plot:[0,1,1,""],on_offset_object:[0,1,1,""],on_gerber_generate_noncopper:[0,1,1,""],on_scale_object:[0,1,1,""],new_object:[0,1,1,""],on_activate_name:[0,1,1,""],get_eval:[0,1,1,""],on_cb_plot_toggled:[0,1,1,""],on_update_plot:[0,1,1,""],save_project:[0,1,1,""],on_options_object2project:[0,1,1,""],setup_component_editor:[0,1,1,""],get_current:[0,1,1,""],open_project:[0,1,1,""],on_options_update:[0,1,1,""],on_file_new:[0,1,1,""],on_options_app2object:[0,1,1,""],on_options_project2app:[0,1,1,""],read_form_item:[0,1,1,""],versionCheck:[0,1,1,""],on_toolbar_replot:[0,1,1,""],on_entry_eval_activate:[0,1,1,""],on_tools_doublesided:[0,1,1,""],on_options_combo_change:[0,1,1,""],setup_obj_classes:[0,1,1,""],on_file_saveproject:[0,1,1,""],setup_project_list:[0,1,1,""],on_generate_gerber_bounding_box:[0,1,1,""],on_options_project2object:[0,1,1,""],on_eval_update:[0,1,1,""],build_list:[0,1,1,""],on_toggle_pointbox:[0,1,1,""],set_progress_bar:[0,1,1,""],on_file_saveprojectas:[0,1,1,""],info:[0,1,1,""],on_file_openproject:[0,1,1,""],on_options_app2project:[0,1,1,""],adjust_axes:[0,1,1,""],on_file_saveprojectcopy:[0,1,1,""],on_create_mirror:[0,1,1,""],file_chooser_save_action:[0,1,1,""],on_excellon_tool_choose:[0,1,1,""],on_generate_cncjob:[0,1,1,""],zoom:[0,1,1,""],on_clear_plots:[0,1,1,""],on_mouse_move_over_plot:[0,1,1,""],on_fileopengcode:[0,1,1,""],on_gerber_generate_cutout:[0,1,1,""],load_defaults:[0,1,1,""],populate_objects_combo:[0,1,1,""],on_create_aligndrill:[0,1,1,""],on_generate_paintarea:[0,1,1,""],get_radio_value:[0,1,1,""],on_filequit:[0,1,1,""],on_cncjob_exportgcode:[0,1,1,""],on_toggle_units:[0,1,1,""],options2form:[0,1,1,""],set_list_selection:[0,1,1,""],on_fileopenexcellon:[0,1,1,""]},"FlatCAM.FlatCAMGeometry":{scale:[0,1,1,""],offset:[0,1,1,""]},"FlatCAM.Excellon":{parse_file:[0,1,1,""],parse_lines:[0,1,1,""],scale:[0,1,1,""],offset:[0,1,1,""]},"FlatCAM.FlatCAMObj":{read_form:[0,1,1,""],plot:[0,1,1,""],serialize:[0,1,1,""],deserialize:[0,1,1,""],build_ui:[0,1,1,""],to_form:[0,1,1,""],setup_axes:[0,1,1,""],set_form_item:[0,1,1,""],read_form_item:[0,1,1,""]},"FlatCAM.Gerber":{aperture_parse:[0,1,1,""],scale:[0,1,1,""],frac_digits:[0,3,1,""],buffer_paths:[0,1,1,""],parse_lines:[0,1,1,""],create_geometry:[0,1,1,""],fix_regions:[0,1,1,""],int_digits:[0,3,1,""],offset:[0,1,1,""],parse_file:[0,1,1,""],get_bounding_box:[0,1,1,""],do_flashes:[0,1,1,""]}},titleterms:{document:0,welcom:0,thi:[],indic:0,cirkuix:[],camlib:[],file:[],tabl:0,main:[],flatcam:0}}) \ No newline at end of file