diff --git a/FlatCAM.py b/FlatCAM.py index 711fb9e..3f807e0 100644 --- a/FlatCAM.py +++ b/FlatCAM.py @@ -19,7 +19,7 @@ import simplejson as json from matplotlib.figure import Figure from numpy import arange, sin, pi from matplotlib.backends.backend_gtk3agg import FigureCanvasGTK3Agg as FigureCanvas -from mpl_toolkits.axes_grid.anchored_artists import AnchoredText +#from mpl_toolkits.axes_grid.anchored_artists import AnchoredText from camlib import * import sys @@ -218,7 +218,7 @@ class FlatCAMObj: :param obj_dict: Dictionary representing a FlatCAMObj :type obj_dict: dict - :return None + :return: None """ return @@ -310,8 +310,8 @@ class FlatCAMGerber(FlatCAMObj, Gerber): geometry = self.solid_geometry else: geometry = self.buffered_paths + \ - [poly['polygon'] for poly in self.regions] + \ - self.flash_geometry + [poly['polygon'] for poly in self.regions] + \ + self.flash_geometry if self.options["multicolored"]: linespec = '-' @@ -418,7 +418,8 @@ class FlatCAMExcellon(FlatCAMObj, Excellon): x, y = ints.coords.xy self.axes.plot(x, y, 'g-') - self.app.plotcanvas.auto_adjust_axes() + #self.app.plotcanvas.auto_adjust_axes() + GLib.idle_add(self.app.plotcanvas.auto_adjust_axes) def show_tool_chooser(self): win = Gtk.Window() @@ -435,9 +436,9 @@ class FlatCAMExcellon(FlatCAMObj, Excellon): def on_accept(widget): win.destroy() tool_list = [] - for tool in self.tool_cbs: - if self.tool_cbs[tool].get_active(): - tool_list.append(tool) + for toolx in self.tool_cbs: + if self.tool_cbs[toolx].get_active(): + tool_list.append(toolx) self.options["toolselection"] = ", ".join(tool_list) self.to_form() @@ -758,10 +759,10 @@ class App: t1.start() #### For debugging only ### - def someThreadFunc(app_obj): + def somethreadfunc(app_obj): print "Hello World!" - t = threading.Thread(target=someThreadFunc, args=(self,)) + t = threading.Thread(target=somethreadfunc, args=(self,)) t.daemon = True t.start() @@ -1060,7 +1061,9 @@ class App: # Plot # TODO: (Thread-safe?) obj.plot() - self.on_zoom_fit(None) + + # TODO: Threading dissaster! + GLib.idle_add(lambda: self.on_zoom_fit(None)) return obj @@ -1420,19 +1423,26 @@ class App: def on_create_mirror(self, widget): """ - Creates a mirror image of a Gerber object to be used as a bottom - copper layer. + Creates a mirror image of an object to be used as a bottom layer. :param widget: Ignored. :return: None """ + # TODO: Move (some of) this to camlib! - # Layer to mirror - gerb_name = self.builder.get_object("comboboxtext_bottomlayer").get_active_text() - gerb = self.stuff[gerb_name] + # Object to mirror + try: + obj_name = self.builder.get_object("comboboxtext_bottomlayer").get_active_text() + fcobj = self.stuff[obj_name] + except KeyError: + self.info("WARNING: Cannot mirror that object.") + return - # For now, lets limit to Gerbers. - assert isinstance(gerb, FlatCAMGerber) + # For now, lets limit to Gerbers and Excellons. + # assert isinstance(gerb, FlatCAMGerber) + if not isinstance(fcobj, FlatCAMGerber) and not isinstance(fcobj, FlatCAMExcellon): + self.info("ERROR: Only Gerber and Excellon objects can be mirrored.") + return # Mirror axis "X" or "Y axis = self.get_radio_value({"rb_mirror_x": "X", @@ -1450,13 +1460,17 @@ class App: py = 0.5*(ymin+ymax) # Do the mirroring - xscale, yscale = {"X": (1.0, -1.0), "Y": (-1.0, 1.0)}[axis] - mirrored = affinity.scale(gerb.solid_geometry, xscale, yscale, origin=(px, py)) + # xscale, yscale = {"X": (1.0, -1.0), "Y": (-1.0, 1.0)}[axis] + # mirrored = affinity.scale(fcobj.solid_geometry, xscale, yscale, origin=(px, py)) + # + # def obj_init(obj_inst, app_inst): + # obj_inst.solid_geometry = mirrored + # + # self.new_object("gerber", fcobj.options["name"] + "_mirror", obj_init) - def obj_init(obj_inst, app_inst): - obj_inst.solid_geometry = mirrored - - self.new_object("gerber", gerb.options["name"] + "_mirror", obj_init) + fcobj.mirror(axis, [px, py]) + fcobj.plot() + #self.on_update_plot(None) def on_create_aligndrill(self, widget): """ @@ -1484,7 +1498,8 @@ class App: xscale, yscale = {"X": (1.0, -1.0), "Y": (-1.0, 1.0)}[axis] # Tools - tools = {"1": self.get_eval("entry_dblsided_alignholediam")} + dia = self.get_eval("entry_dblsided_alignholediam") + tools = {"1": {"C": dia}} # Parse hole list # TODO: Better parsing @@ -1967,7 +1982,7 @@ class App: Callback for button on form for all kinds of objects. Re-plots the current object only. - :param widget: The widget from which this was called. + :param widget: The widget from which this was called. Ignored. :return: None """ diff --git a/camlib.py b/camlib.py index 16ccb45..79d2b17 100644 --- a/camlib.py +++ b/camlib.py @@ -237,7 +237,7 @@ class ApertureMacro: val = re.sub(r'\$[0-9a-zA-Z](?![0-9a-zA-Z])', "0", val) # Change x with * - val = re.sub(r'x', "\*", val) + val = re.sub(r'[xX]', "*", val) # Eval() and store. self.locvars[var] = eval(val) @@ -258,7 +258,7 @@ class ApertureMacro: part = re.sub(r'\$[0-9a-zA-Z](?![0-9a-zA-Z])', "0", part) # Change x with * - part = re.sub(r'x', "\*", part) + part = re.sub(r'[xX]', "*", part) ## Store elements = part.split(",") @@ -391,7 +391,7 @@ class ApertureMacro: pol, nverts, x, y, dia, angle = ApertureMacro.default2zero(6, mods) points = [(0, 0)]*nverts - for i in nverts: + for i in range(nverts): points[i] = (x + 0.5 * dia * cos(2*pi * i/nverts), y + 0.5 * dia * sin(2*pi * i/nverts)) @@ -483,8 +483,8 @@ class ApertureMacro: modifiers = modifiers or [] modifiers = [float(m) for m in modifiers] self.locvars = {} - for i in range(1, len(modifiers)+1): - self.locvars[str(i)] = modifiers[i] + for i in range(0, len(modifiers)): + self.locvars[str(i+1)] = modifiers[i] ## Parse self.primitives = [] # Cleanup @@ -543,7 +543,7 @@ class Gerber (Geometry): +------------+------------------------------------------------+ | Key | Value | +============+================================================+ - | loc | (list) [x (float), y (float)] coordinates. | + | loc | (Point) Shapely Point indicating location. | +------------+------------------------------------------------+ | aperture | (str) The key for an aperture in apertures. | +------------+------------------------------------------------+ @@ -560,6 +560,11 @@ class Gerber (Geometry): | aperture | (str) The key for an aperture in apertures. | +------------+-----------------------------------------------------+ + * ``aperture_macros`` (dictionary): Are predefined geometrical structures + that can be instanciated with different parameters in an aperture + definition. See ``apertures`` above. The key is the name of the macro, + and the macro itself, the value, is a ``Aperture_Macro`` object. + * ``flash_geometry`` (list): List of (Shapely) geometric object resulting from ``flashes``. These are generated from ``flashes`` in ``do_flashes()``. @@ -574,7 +579,6 @@ class Gerber (Geometry): g.create_geometry() do_something(s.solid_geometry) - """ def __init__(self): @@ -738,9 +742,7 @@ class Gerber (Geometry): ## Flashes for fl in self.flashes: - # TODO: Shouldn't 'loc' be a numpy.array()? - fl['loc'][0] *= factor - fl['loc'][1] *= factor + fl['loc'] = affinity.scale(fl['loc'], factor, factor, origin=(0, 0)) ## Regions for reg in self.regions: @@ -776,9 +778,7 @@ class Gerber (Geometry): ## Flashes for fl in self.flashes: - # TODO: Shouldn't 'loc' be a numpy.array()? - fl['loc'][0] += dx - fl['loc'][1] += dy + fl['loc'] = affinity.translate(fl['loc'], xoff=dx, yoff=dy) ## Regions for reg in self.regions: @@ -788,6 +788,36 @@ class Gerber (Geometry): # Now buffered_paths, flash_geometry and solid_geometry self.create_geometry() + def mirror(self, axis, point): + """ + + :param axis: "X" or "Y" indicates around which axis to mirror. + :type axis: str + :param point: [x, y] point belonging to the mirror axis. + :type point: list + :return: None + """ + + px, py = point + xscale, yscale = {"X": (1.0, -1.0), "Y": (-1.0, 1.0)}[axis] + + ## Paths + for path in self.paths: + path['linestring'] = affinity.scale(path['linestring'], xscale, yscale, + origin=(px, py)) + + ## Flashes + for fl in self.flashes: + fl['loc'] = affinity.scale(fl['loc'], xscale, yscale, origin=(px, py)) + + ## Regions + for reg in self.regions: + reg['polygon'] = affinity.scale(reg['polygon'], xscale, yscale, + origin=(px, py)) + + # Now buffered_paths, flash_geometry and solid_geometry + self.create_geometry() + def fix_regions(self): """ Overwrites the region polygons with fixed @@ -1005,7 +1035,7 @@ class Gerber (Geometry): # Flash elif current_operation_code == 3: - self.flashes.append({"loc": [current_x, current_y], + self.flashes.append({"loc": Point([current_x, current_y]), "aperture": current_aperture}) continue @@ -1202,12 +1232,13 @@ class Gerber (Geometry): continue if aperture['type'] == 'C': # Circles - circle = Point(flash['loc']).buffer(aperture['size']/2) + #circle = Point(flash['loc']).buffer(aperture['size']/2) + circle = flash['loc'].buffer(aperture['size']/2) self.flash_geometry.append(circle) continue if aperture['type'] == 'R': # Rectangles - loc = flash['loc'] + loc = flash['loc'].coords[0] width = aperture['width'] height = aperture['height'] minx = loc[0] - width/2 @@ -1219,7 +1250,7 @@ class Gerber (Geometry): continue if aperture['type'] == 'O': # Obround - loc = flash['loc'] + loc = flash['loc'].coords[0] width = aperture['width'] height = aperture['height'] if width > height: @@ -1237,7 +1268,7 @@ class Gerber (Geometry): continue if aperture['type'] == 'P': # Regular polygon - loc = flash['loc'] + loc = flash['loc'].coords[0] diam = aperture['diam'] n_vertices = aperture['nVertices'] points = [] @@ -1252,7 +1283,7 @@ class Gerber (Geometry): continue if aperture['type'] == 'AM': # Aperture Macro - loc = flash['loc'] + loc = flash['loc'].coords[0] flash_geo = aperture['macro'].make_geometry(aperture['modifiers']) flash_geo_final = affinity.translate(flash_geo, xoff=loc[0], yoff=loc[1]) self.flash_geometry.append(flash_geo_final) @@ -1307,7 +1338,14 @@ class Excellon(Geometry): *ATTRIBUTES* * ``tools`` (dict): The key is the tool name and the value is - the size (diameter). + a dictionary specifying the tool: + + ================ ==================================== + Key Value + ================ ==================================== + C Diameter of the tool + Others Not supported (Ignored). + ================ ==================================== * ``drills`` (list): Each is a dictionary: @@ -1524,14 +1562,20 @@ class Excellon(Geometry): print "WARNING: Line ignored:", eline def create_geometry(self): + """ + Creates circles of the tool diameter at every point + specified in ``self.drills``. + + :return: None + """ self.solid_geometry = [] for drill in self.drills: - poly = Point(drill['point']).buffer(self.tools[drill['tool']]["C"]/2.0) + #poly = drill['point'].buffer(self.tools[drill['tool']]["C"]/2.0) + tooldia = self.tools[drill['tool']]['C'] + poly = drill['point'].buffer(tooldia/2.0) self.solid_geometry.append(poly) - #self.solid_geometry = cascaded_union(self.solid_geometry) - def scale(self, factor): """ Scales geometry on the XY plane in the object by a given factor. @@ -1564,6 +1608,27 @@ class Excellon(Geometry): for drill in self.drills: drill['point'] = affinity.translate(drill['point'], xoff=dx, yoff=dy) + # Recreate geometry + self.create_geometry() + + def mirror(self, axis, point): + """ + + :param axis: "X" or "Y" indicates around which axis to mirror. + :type axis: str + :param point: [x, y] point belonging to the mirror axis. + :type point: list + :return: None + """ + + px, py = point + xscale, yscale = {"X": (1.0, -1.0), "Y": (-1.0, 1.0)}[axis] + + # Modify data + for drill in self.drills: + drill['point'] = affinity.scale(drill['point'], xscale, yscale, origin=(px, py)) + + # Recreate geometry self.create_geometry() def convert_units(self, units): @@ -2258,6 +2323,7 @@ def plotg(geo): print "Cannot plot:", str(type(g)) continue + def parse_gerber_number(strnumber, frac_digits): """ Parse a single number of Gerber coordinates. diff --git a/doc/build/.doctrees/camlib.doctree b/doc/build/.doctrees/camlib.doctree index e4445f1..6eafcfd 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 ee78c22..845703a 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 2b6da04..2a44d65 100644 Binary files a/doc/build/.doctrees/index.doctree and b/doc/build/.doctrees/index.doctree differ diff --git a/doc/build/_sources/camlib.txt b/doc/build/_sources/camlib.txt index 67a5341..6d18fa6 100644 --- a/doc/build/_sources/camlib.txt +++ b/doc/build/_sources/camlib.txt @@ -3,14 +3,32 @@ Camlib .. automodule:: camlib +Geometry +~~~~~~~~ + .. autoclass:: Geometry :members: +Gerber +~~~~~~ + .. autoclass:: Gerber(Geometry) :members: -.. autoclass:: Excellon +ApertureMacro +~~~~~~~~~~~~~ + +.. autoclass:: ApertureMacro :members: -.. autoclass:: CNCjob +Excellon +~~~~~~~~ + +.. autoclass:: Excellon(Geometry) + :members: + +CNCJob +~~~~~~ + +.. autoclass:: CNCjob(Geometry) :members: diff --git a/doc/build/_sources/index.txt b/doc/build/_sources/index.txt index a022f95..ad3a734 100644 --- a/doc/build/_sources/index.txt +++ b/doc/build/_sources/index.txt @@ -16,6 +16,7 @@ Contents: camlib flatcamobj app + devman diff --git a/doc/build/camlib.html b/doc/build/camlib.html index f02aa0b..07dd232 100644 --- a/doc/build/camlib.html +++ b/doc/build/camlib.html @@ -81,11 +81,29 @@ @@ -124,6 +142,8 @@

Camlib

+
+

Geometry

class camlib.Geometry
@@ -262,6 +282,9 @@ Attributes to include are listed in +

Gerber

class camlib.Gerber(Geometry)
@@ -283,7 +306,7 @@ type key is always present and the rest depend on the key: type -(str) “C”, “R”, or “O” +(str) “C”, “R”, “O”, “P”, or “AP” others Depend on type @@ -329,7 +352,7 @@ is a dictionary: loc -(list) [x (float), y (float)] coordinates. +(Point) Shapely Point indicating location. aperture (str) The key for an aperture in apertures. @@ -361,6 +384,10 @@ associated with a region. Each is a dictionary:
    +
  • aperture_macros (dictionary): Are predefined geometrical structures +that can be instanciated with different parameters in an aperture +definition. See apertures above. The key is the name of the macro, +and the macro itself, the value, is a Aperture_Macro object.
  • flash_geometry (list): List of (Shapely) geometric object resulting from flashes. These are generated from flashes in do_flashes().
  • buffered_paths (list): List of (Shapely) polygons resulting from @@ -376,23 +403,32 @@ generated from paths
-aperture_parse(gline)
+aperture_parse(apertureId, apertureType, apParameters)

Parse gerber aperture definition into dictionary of apertures. The following kinds and their attributes are supported:

  • Circular (C): size (float)
  • Rectangle (R): width (float), height (float)
  • Obround (O): width (float), height (float).
  • +
  • Polygon (P): diameter(float), vertices(int), [rotation(float)]
  • +
  • Aperture Macro (AM): macro (ApertureMacro), modifiers (list)
- + - + - +
Parameters:gline (str) – Line of Gerber code known to have an aperture definition.
Parameters:
    +
  • apertureId (str) – Id of the aperture being defined.
  • +
  • apertureType (str) – Type of the aperture.
  • +
  • apParameters (str) – Parameters of the aperture.
  • +
+
Returns:Identifier of the aperture.
Returns:

Identifier of the aperture.

+
Return type:str
Return type:

str

+
@@ -402,8 +438,15 @@ The following kinds and their attributes are supported:

buffer_paths()

This is part of the parsing process. “Thickens” the paths -by their appertures. This will only work for circular appertures. -:return: None

+by their appertures. This will only work for circular appertures.

+ +++ + + + +
Returns:None
@@ -428,6 +471,14 @@ and regions naturally do as well.

fix_regions()

Overwrites the region polygons with fixed versions if found to be invalid (according to Shapely).

+ +++ + + + +
Returns:None
@@ -469,6 +520,26 @@ box in both positive and negative, x and y axes.

Number of integer digits in Gerber numbers. Used during parsing.

+
+
+mirror(axis, point)
+
+++ + + + + + +
Parameters:
    +
  • axis (str) – “X” or “Y” indicates around which axis to mirror.
  • +
  • point (list) – [x, y] point belonging to the mirror axis.
  • +
+
Returns:

None

+
+
+
offset(vect)
@@ -480,10 +551,17 @@ These are:

  • flashes
  • Then buffered_paths, flash_geometry and solid_geometry -are re-created with self.create_geometry(). -:param vect: (x, y) offset vector. -:type vect: tuple -:return: None

    +are re-created with self.create_geometry().

    + +++ + + + + + +
    Parameters:vect (tuple) – (x, y) offset vector.
    Returns:None
    @@ -491,6 +569,16 @@ are re-created with self.create_g parse_file(filename)

    Calls Gerber.parse_lines() with array of lines read from the given file.

    + +++ + + + + + +
    Parameters:filename (str) – Gerber file to parse.
    Returns:None
    @@ -533,13 +621,251 @@ are re-created with self.create_g
    +
    +
    +

    ApertureMacro

    +
    +
    +class camlib.ApertureMacro(name=None)
    +
    +
    +append(data)
    +

    Appends a string to the raw macro.

    + +++ + + + + + +
    Parameters:data (str) – Part of the macro.
    Returns:None
    +
    + +
    +
    +static default2zero(n, mods)
    +

    Pads the mods list with zeros resulting in an +list of length n.

    + +++ + + + + + + + +
    Parameters:
      +
    • n (int) – Length of the resulting list.
    • +
    • mods (list) – List to be padded.
    • +
    +
    Returns:

    Zero-padded list.

    +
    Return type:

    list

    +
    +
    + +
    +
    +static make_centerline(mods)
    +
    +++ + + + + + +
    Parameters:mods – (Exposure 0/1, width >=0, height >=0, x-center, y-center, +rotation angle around origin in degrees)
    Returns:
    +
    + +
    +
    +static make_circle(mods)
    +
    +++ + + + + + +
    Parameters:mods – (Exposure 0/1, Diameter >=0, X-coord, Y-coord)
    Returns:
    +
    + +
    +
    +make_geometry(modifiers)
    +

    Runs the macro for the given modifiers and generates +the corresponding geometry.

    + +++ + + + +
    Parameters:modifiers (list) – Modifiers (parameters) for this macro
    +
    + +
    +
    +static make_lowerleftline(mods)
    +
    +++ + + + + + +
    Parameters:mods – (exposure 0/1, width >=0, height >=0, x-lowerleft, y-lowerleft, +rotation angle around origin in degrees)
    Returns:
    +
    + +
    +
    +static make_moire(mods)
    +

    Note: Specs indicate that rotation is only allowed if the center +(x, y) == (0, 0). I will tolerate breaking this rule.

    + +++ + + + + + +
    Parameters:mods – (x-center, y-center, outer_dia_outer_ring, ring thickness, +gap, max_rings, crosshair_thickness, crosshair_len, rotation +angle around origin in degrees)
    Returns:
    +
    + +
    +
    +static make_outline(mods)
    +
    +++ + + + + + +
    Parameters:mods
    Returns:
    +
    + +
    +
    +static make_polygon(mods)
    +

    Note: Specs indicate that rotation is only allowed if the center +(x, y) == (0, 0). I will tolerate breaking this rule.

    + +++ + + + + + +
    Parameters:mods – (exposure 0/1, n_verts 3<=n<=12, x-center, y-center, +diameter of circumscribed circle >=0, rotation angle around origin)
    Returns:
    +
    + +
    +
    +static make_thermal(mods)
    +

    Note: Specs indicate that rotation is only allowed if the center +(x, y) == (0, 0). I will tolerate breaking this rule.

    + +++ + + + + + +
    Parameters:mods – [x-center, y-center, diameter-outside, diameter-inside, +gap-thickness, rotation angle around origin]
    Returns:
    +
    + +
    +
    +static make_vectorline(mods)
    +
    +++ + + + + + +
    Parameters:mods – (Exposure 0/1, Line width >= 0, X-start, Y-start, X-end, Y-end, +rotation angle around origin in degrees)
    Returns:
    +
    + +
    +
    +parse_content()
    +

    Creates numerical lists for all primitives in the aperture +macro (in self.raw) by replacing all variables by their +values iteratively and evaluating expressions. Results +are stored in self.primitives.

    + +++ + + + +
    Returns:None
    +
    + +
    + +
    +
    +

    Excellon

    -class camlib.Excellon
    +class camlib.Excellon(Geometry)

    ATTRIBUTES

    • tools (dict): The key is the tool name and the value is -the size (diameter).
    • +a dictionary specifying the tool: +
    + ++++ + + + + + + + + + + + + + +
    KeyValue
    CDiameter of the tool
    OthersNot supported (Ignored).
    +
    • drills (list): Each is a dictionary:
    @@ -561,6 +887,41 @@ the size (diameter).
    +
    +
    +create_geometry()
    +

    Creates circles of the tool diameter at every point +specified in self.drills.

    + +++ + + + +
    Returns:None
    +
    + +
    +
    +mirror(axis, point)
    +
    +++ + + + + + +
    Parameters:
      +
    • axis (str) – “X” or “Y” indicates around which axis to mirror.
    • +
    • point (list) – [x, y] point belonging to the mirror axis.
    • +
    +
    Returns:

    None

    +
    +
    +
    offset(vect)
    @@ -631,9 +992,12 @@ Tool sizes, feedrates an Z-plane dimensions are untouched.

    +
    +
    +

    CNCJob

    -class camlib.CNCjob(units='in', kind='generic', z_move=0.1, feedrate=3.0, z_cut=-0.002, tooldia=0.0)
    +class camlib.CNCjob(Geometry)

    Represents work to be done by a CNC machine.

    ATTRIBUTES

      @@ -865,6 +1229,7 @@ not altered.

    +
    diff --git a/doc/build/genindex.html b/doc/build/genindex.html index a710b24..09641e6 100644 --- a/doc/build/genindex.html +++ b/doc/build/genindex.html @@ -80,11 +80,29 @@ @@ -132,19 +150,46 @@ | G | I | L + | M + | N | O | P + | R | S | T + | V + | Z

    A

    +
    +
    adjust_axes() (FlatCAM.PlotCanvas method) +
    + +
    aperture_parse() (camlib.Gerber method)
    + +
    ApertureMacro (class in camlib) +
    + +
    + +
    App (class in FlatCAM) +
    + + +
    append() (camlib.ApertureMacro method) +
    + + +
    auto_adjust_axes() (FlatCAM.PlotCanvas method) +
    +
    @@ -155,10 +200,18 @@
    bounds() (camlib.Geometry method)
    + +
    buffer_paths() (camlib.Gerber method) +
    +
    -
    buffer_paths() (camlib.Gerber method) +
    build_list() (FlatCAM.App method) +
    + + +
    build_ui() (FlatCAM.FlatCAMObj method)
    @@ -172,6 +225,10 @@ +
    clear() (FlatCAM.PlotCanvas method) +
    + +
    clear_polygon() (camlib.Geometry method)
    @@ -182,13 +239,29 @@
    -
    convert_units() (camlib.Geometry method) +
    connect() (FlatCAM.PlotCanvas method)
    -
    create_geometry() (camlib.Gerber method) +
    convert_units() (camlib.Geometry method)
    +
    + +
    (FlatCAM.FlatCAMGerber method) +
    + +
    + +
    create_geometry() (camlib.Excellon method) +
    + +
    + +
    (camlib.Gerber method) +
    + +
    @@ -196,6 +269,16 @@ + +
    +
    default2zero() (camlib.ApertureMacro static method) +
    + + +
    deserialize() (FlatCAM.FlatCAMObj method) +
    + +
    +
    do_flashes() (camlib.Gerber method)
    @@ -216,15 +299,47 @@ + - - +
    +
    file_chooser_action() (FlatCAM.App method) +
    + + +
    file_chooser_save_action() (FlatCAM.App method) +
    + +
    fix_regions() (camlib.Gerber method)
    +
    FlatCAM (module), [1] +
    + + +
    FlatCAMCNCjob (class in FlatCAM) +
    + + +
    FlatCAMExcellon (class in FlatCAM) +
    + +
    + +
    FlatCAMGeometry (class in FlatCAM) +
    + + +
    FlatCAMGerber (class in FlatCAM) +
    + + +
    FlatCAMObj (class in FlatCAM) +
    + +
    frac_digits (camlib.Gerber attribute)
    -
    from_dict() (camlib.Geometry method)
    @@ -251,8 +366,6 @@
    generate_from_geometry() (camlib.CNCjob method)
    -
    Geometry (class in camlib)
    @@ -261,14 +374,28 @@
    Gerber (class in camlib)
    +
    get_bounding_box() (camlib.Gerber method)
    +
    get_current() (FlatCAM.App method) +
    + +
    get_empty_area() (camlib.Geometry method)
    + +
    get_eval() (FlatCAM.App method) +
    + + +
    get_radio_value() (FlatCAM.App method) +
    +
    @@ -276,6 +403,10 @@ + +
    +
    info() (FlatCAM.App method) +
    + +
    int_digits (camlib.Gerber attribute)
    @@ -295,6 +426,86 @@
    linear2gcode() (camlib.CNCjob method)
    +
    + +
    load_defaults() (FlatCAM.App method) +
    + +
    + +

    M

    + + + +
    + +
    make_centerline() (camlib.ApertureMacro static method) +
    + + +
    make_circle() (camlib.ApertureMacro static method) +
    + + +
    make_geometry() (camlib.ApertureMacro method) +
    + + +
    make_lowerleftline() (camlib.ApertureMacro static method) +
    + + +
    make_moire() (camlib.ApertureMacro static method) +
    + + +
    make_outline() (camlib.ApertureMacro static method) +
    + +
    + +
    make_polygon() (camlib.ApertureMacro static method) +
    + + +
    make_thermal() (camlib.ApertureMacro static method) +
    + + +
    make_vectorline() (camlib.ApertureMacro static method) +
    + + +
    mirror() (camlib.Excellon method) +
    + +
    + +
    (camlib.Gerber method) +
    + +
    + +
    mpl_connect() (FlatCAM.PlotCanvas method) +
    + +
    + +

    N

    + + +
    + +
    new_axes() (FlatCAM.PlotCanvas method) +
    + +
    + +
    new_object() (FlatCAM.App method) +
    +
    @@ -307,6 +518,10 @@
    +
    (FlatCAM.FlatCAMGeometry method) +
    + +
    (camlib.Excellon method)
    @@ -319,6 +534,236 @@
    + +
    on_about() (FlatCAM.App method) +
    + + +
    on_activate_name() (FlatCAM.App method) +
    + + +
    on_canvas_configure() (FlatCAM.App method) +
    + + +
    on_cb_plot_toggled() (FlatCAM.App method) +
    + + +
    on_clear_plots() (FlatCAM.App method) +
    + + +
    on_click_over_plot() (FlatCAM.App method) +
    + + +
    on_closewindow() (FlatCAM.App method) +
    + + +
    on_cncjob_exportgcode() (FlatCAM.App method) +
    + + +
    on_create_aligndrill() (FlatCAM.App method) +
    + + +
    on_create_mirror() (FlatCAM.App method) +
    + + +
    on_delete() (FlatCAM.App method) +
    + + +
    on_entry_eval_activate() (FlatCAM.App method) +
    + + +
    on_eval_update() (FlatCAM.App method) +
    + + +
    on_excellon_tool_choose() (FlatCAM.App method) +
    + + +
    on_file_new() (FlatCAM.App method) +
    + + +
    on_file_openproject() (FlatCAM.App method) +
    + + +
    on_file_savedefaults() (FlatCAM.App method) +
    + + +
    on_file_saveproject() (FlatCAM.App method) +
    + + +
    on_file_saveprojectas() (FlatCAM.App method) +
    + + +
    on_file_saveprojectcopy() (FlatCAM.App method) +
    + + +
    on_fileopenexcellon() (FlatCAM.App method) +
    + + +
    on_fileopengcode() (FlatCAM.App method) +
    + + +
    on_fileopengerber() (FlatCAM.App method) +
    + + +
    on_filequit() (FlatCAM.App method) +
    + + +
    on_generate_cncjob() (FlatCAM.App method) +
    + + +
    on_generate_excellon_cncjob() (FlatCAM.App method) +
    + + +
    on_generate_gerber_bounding_box() (FlatCAM.App method) +
    + + +
    on_generate_isolation() (FlatCAM.App method) +
    + +
    + +
    on_generate_paintarea() (FlatCAM.App method) +
    + + +
    on_gerber_generate_cutout() (FlatCAM.App method) +
    + + +
    on_gerber_generate_noncopper() (FlatCAM.App method) +
    + + +
    on_key_over_plot() (FlatCAM.App method) +
    + + +
    on_mouse_move() (FlatCAM.PlotCanvas method) +
    + + +
    on_mouse_move_over_plot() (FlatCAM.App method) +
    + + +
    on_offset_object() (FlatCAM.App method) +
    + + +
    on_options_app2object() (FlatCAM.App method) +
    + + +
    on_options_app2project() (FlatCAM.App method) +
    + + +
    on_options_combo_change() (FlatCAM.App method) +
    + + +
    on_options_object2app() (FlatCAM.App method) +
    + + +
    on_options_object2project() (FlatCAM.App method) +
    + + +
    on_options_project2app() (FlatCAM.App method) +
    + + +
    on_options_project2object() (FlatCAM.App method) +
    + + +
    on_options_update() (FlatCAM.App method) +
    + + +
    on_row_activated() (FlatCAM.App method) +
    + + +
    on_scale_object() (FlatCAM.App method) +
    + + +
    on_scroll() (FlatCAM.PlotCanvas method) +
    + + +
    on_toggle_pointbox() (FlatCAM.App method) +
    + + +
    on_toggle_units() (FlatCAM.App method) +
    + + +
    on_toolbar_replot() (FlatCAM.App method) +
    + + +
    on_tools_doublesided() (FlatCAM.App method) +
    + + +
    on_tree_selection_changed() (FlatCAM.App method) +
    + + +
    on_update_plot() (FlatCAM.App method) +
    + + +
    on_zoom_fit() (FlatCAM.App method) +
    + + +
    on_zoom_in() (FlatCAM.App method) +
    + + +
    on_zoom_out() (FlatCAM.App method) +
    + + +
    open_project() (FlatCAM.App method) +
    + + +
    options2form() (FlatCAM.App method) +
    +
    @@ -326,6 +771,10 @@
    +
    parse_content() (camlib.ApertureMacro method) +
    + +
    parse_file() (camlib.Excellon method)
    @@ -346,31 +795,89 @@
    +
    plot() (FlatCAM.FlatCAMGeometry method) +
    + +
    + +
    (FlatCAM.FlatCAMObj method) +
    + +
    +
    plot2() (camlib.CNCjob method)
    +
    plot_all() (FlatCAM.App method) +
    + + +
    PlotCanvas (class in FlatCAM) +
    + +
    polygon2gcode() (camlib.CNCjob method)
    +
    populate_objects_combo() (FlatCAM.App method) +
    + +
    pre_parse() (camlib.CNCjob method)
    +

    R

    + + + +
    + +
    read_form() (FlatCAM.App method) +
    + +
    + +
    (FlatCAM.FlatCAMObj method) +
    + +
    +
    + +
    read_form_item() (FlatCAM.App method) +
    + +
    + +
    (FlatCAM.FlatCAMObj method) +
    + +
    +
    +

    S

    + +
    +
    save_project() (FlatCAM.App method) +
    + +
    scale() (camlib.CNCjob method)
    +
    (FlatCAM.FlatCAMGeometry method) +
    + +
    (camlib.Excellon method)
    @@ -383,9 +890,47 @@
    + +
    serialize() (FlatCAM.FlatCAMObj method) +
    + + +
    set_form_item() (FlatCAM.App method) +
    + +
    + +
    (FlatCAM.FlatCAMObj method) +
    + +
    + +
    set_list_selection() (FlatCAM.App method) +
    + + +
    set_progress_bar() (FlatCAM.App method) +
    +
    +
    setup_axes() (FlatCAM.FlatCAMObj method) +
    + + +
    setup_component_editor() (FlatCAM.App method) +
    + + +
    setup_obj_classes() (FlatCAM.App method) +
    + + +
    setup_project_list() (FlatCAM.App method) +
    + +
    size() (camlib.Geometry method)
    @@ -399,6 +944,32 @@
    to_dict() (camlib.Geometry method)
    +
    + +
    to_form() (FlatCAM.FlatCAMObj method) +
    + +
    + +

    V

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

    Z

    + +
    + +
    zoom() (FlatCAM.PlotCanvas method) +
    +
    diff --git a/doc/build/index.html b/doc/build/index.html index 6c3d79d..1b9a032 100644 --- a/doc/build/index.html +++ b/doc/build/index.html @@ -80,11 +80,29 @@ @@ -126,11 +144,29 @@

    Contents:

    diff --git a/doc/build/objects.inv b/doc/build/objects.inv index c6a6fd8..4813174 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 6a942a4..765eb2f 100644 --- a/doc/build/py-modindex.html +++ b/doc/build/py-modindex.html @@ -86,11 +86,29 @@ @@ -129,7 +147,8 @@

    Python Module Index

    - c + c | + f
    @@ -141,6 +160,14 @@ + + + + +
    camlib
     
    + f
    + FlatCAM +
    diff --git a/doc/build/search.html b/doc/build/search.html index 37fd385..4be7b0b 100644 --- a/doc/build/search.html +++ b/doc/build/search.html @@ -87,11 +87,29 @@ diff --git a/doc/build/searchindex.js b/doc/build/searchindex.js index e04bdf1..ec8e1fa 100644 --- a/doc/build/searchindex.js +++ b/doc/build/searchindex.js @@ -1 +1 @@ -Search.setIndex({envversion:42,terms:{represent:[],all:[1,3],code:3,whatev:[],toolpath:3,replot:[],focus:[],follow:3,pute:[],on_key_over_plot:[],whose:1,get_ev:[],on_options_upd:1,flash:3,gerber:3,program:[],text:3,plot_al:[],geom:3,cnc:3,digit:3,sourc:3,everi:3,string:3,far:[],mous:[],"5e6cff":3,obround:3,untouch:3,on_cb_plot_toggl:[],toolshap:3,button:[],list:3,iter:1,item:[],vector:3,specal:[],round:3,get_radio_valu:[],create_geometri:3,natur:3,dimens:3,zero:3,pass:3,rectangular:3,click:[],append:3,index:0,what:1,new_ax:[],neg:3,current:[],delet:[],version:3,"new":1,method:3,movement:[],widget:1,flatcamgeometri:[],gener:3,load_default:[],matplotlib:3,adjust_ax:[],on_create_aligndril:[],path:3,along:[1,3],do_someth:3,modifi:1,valu:[1,3],box:3,convert:3,on_file_saveprojectcopi:[],action:[],chang:[1,3],on_activate_nam:[],on_options_object2app:[],diamet:3,via:[],app:1,on_fileopengerb:[],filenam:3,ymin:3,select:[],frac_digit:3,plot:3,from:[1,3],describ:3,doubl:[],regist:[],setup_component_editor:[],call:[1,3],flash_geometri:3,suppos:1,type:[1,3],toggl:[],more:3,on_toolbar_replot:[],on_delet:[],combo:[],on_toggle_unit:[],on_gerber_generate_cutout:[],parse_fil:3,known:3,hole:[],must:[1,3],on_file_openproject:[],none:3,left:[],ser_attr:3,work:3,uniqu:[],gtext:3,can:[1,3],drill:3,z_move:3,fetch:1,overrid:3,overwritten:1,polygon2gcod:3,give:3,process:3,share:[],indic:[],stroke:3,minimum:[],tab:1,xmin:3,serial:[],z_cut:3,alwai:3,surfac:3,hadler:[],fix_region:3,write:3,fals:3,circular:3,b5ab3a:3,resourc:[],after:[],befor:[],plane:3,mai:[],setup_obj_class:[],data:[],subsequ:[],entry_text:[],correspond:[],element:[1,3],callback:[],"switch":[],maintain:[],enter:[],on_file_saveprojecta:[],travel:3,checkbox:[],over:1,through:1,affect:3,on_excellon_tool_choos:[],paramet:3,fit:[],save_project:[],chosen:[],fix:3,gtk:[],set_list_select:[],window:[],pcb:[],on_options_app2object:[],main:3,pixel:[],on_zoom_out:[],non:3,"float":3,"return":3,thei:[1,3],handl:[],rectangl:3,number:3,vect:3,build_list:[],project_filenam:[],choic:[],name:[1,3],edit:1,separ:3,solid_geometri:3,each:[1,3],found:3,updat:1,gui:1,read_form:[],parse_lin:3,on_closewindow:[],continu:[],connect:[],recogn:1,event:[],out:[],variabl:[],on_eval_upd:[],generate_from_excellon_by_tool:3,content:0,adjust:[],set_current_pag:[],clear_polygon:3,on_scrol:[],flatcamcncjob:[],linear:3,insid:3,precaut:[],differ:3,flatcamexcellon:[],base:[],dictionari:3,org:[],care:[],generate_from_geometri:3,thread:[],launch:[],success:[],motion:[],turn:[],notebook:[],place:1,geometri:3,treeselect:[],onto:3,first:1,origin:3,copper:[],on_zoom_in:[],arrai:3,independ:1,file_chooser_act:[],restrict:[],saepar:[],done:[1,3],overwrit:3,thick:3,open:1,size:3,given:3,start:[],associ:3,interact:[],flatcamobj:[],attach:[],store:[1,3],editor:[],option:[],tool:3,copi:3,specifi:3,get_empty_area:3,generate_from_excellon:3,part:3,pars:3,get_bounding_box:3,kind:[1,3],whenev:[],tree:[],entry_ev:[],project:1,str:3,entri:[],posit:3,thereaft:1,ani:3,do_flash:3,inherit:1,have:3,inform:[],self:3,note:[],also:3,on_options_object2project:[],build:[],which:[1,3],event_handl:[],interior:3,on_success:[],singl:3,simplifi:3,buffer:3,previou:[],on_mouse_mov:[],pair:3,alpha:3,segment:3,"class":3,set_progress_bar:[],appertur:3,clear:[],later:[],cover:3,on_mouse_move_over_plot:[],populate_objects_combo:[],axi:3,thicken:3,show:[],on_click_over_plot:[],apertur:3,radiu:3,syntax:1,radio:[],corner:3,find:[],on_scale_object:[],new_object:[],slow:3,ratio:[],menu:[],configur:[],activ:[],state:[],comboboxtext:[],clipboard:[],dict:3,factor:3,elin:3,on_options_combo_chang:[],meant:[],hit:[],get:1,nativ:[],on_options_app2project:[],mpl_connect:[],multipolygon:3,bar:[],on_create_mirror:[],to_dict:3,xmax:3,contain:1,comma:3,where:[1,3],dpi:3,user:[],set:3,keyboard:[],startup:1,on_cncjob_exportgcod:[],displai:[],"4650bd":3,see:[],result:3,arg:[],close:[],contour:3,statu:[],detect:1,boundari:3,label:[],written:1,between:[],progress:[],previous:1,attribut:3,accord:3,kei:[1,3],complement:3,isol:[],job:3,entir:3,here:[],extent:[],toler:3,auto_adjust_ax:[],popul:[1,3],both:3,feedrat:3,rtype:3,options2form:[],alon:3,setup_project_list:[],instanc:[],whole:3,col:[],obj_dict:[],load:[],cncjob:3,figur:[],color:3,on_gerber_generate_noncopp:[],enlarg:3,param:3,respect:[],throughout:[],backend:[],quit:[],becom:3,creat:3,addition:3,been:[],mark:[],compon:[],json:1,get_curr:[],toolbar:[],open_project:[],subscrib:[],immedi:[],radio_set:[],gcode:3,imag:[],search:0,on_file_savedefault:1,coordin:3,on_options_project2object:[],func:[],present:3,versioncheck:[],inhibit:[],onli:3,look:3,align:[],properti:3,alter:3,dest:[],defin:3,"while":[],setup_ax:[],margin:3,region:3,propag:[],layer:[],therefor:1,them:[],equal:3,exterior:3,on_fileopengcod:[],"__init__":[],around:3,transpar:3,same:1,respresent:3,html:[],descend:3,tool_toler:3,complet:[],http:[],widget_nam:[],upon:1,alert:[],initi:[],canva:[],appropri:3,off:[],center:[],build_ui:[],well:3,"_app_":1,without:[],on_file_new:[],thi:[1,3],choos:[],on_generate_paintarea:[],rout:[],latest:[],distanc:3,identifi:[1,3],isolation_geometri:3,"true":3,flatcamgerb:[],rest:3,shape:3,aspect:[],linestr:3,speed:3,wether:3,cut:3,on_tools_doublesid:[],trigger:[],point:3,shortcut:[],add:[],other:3,board:[],save:[1,3],modul:0,pre_pars:3,take:[],gcode_pars:3,format:[],read:[1,3],on_file_saveproject:[],background:[],press:[],height:3,like:[],specif:3,zoom:[],integ:3,noth:[],from_dict:3,necessari:[],either:[],exobj:3,on_clear_plot:[],page:0,depend:3,int_digit:3,creation:1,back:[],percentag:[],on_zoom_fit:[],radiobutton:[],"export":[],mirror:[],set_form_item:[],on_generate_excellon_cncjob:[],scale:3,bottom:[],definit:3,overlap:3,on_update_plot:[],buffer_path:3,unit:3,duplic:[],refer:1,machin:3,object:[],run:[],usag:3,how:1,offset:3,on_toggle_pointbox:[],about:[],actual:3,file_chooser_save_act:[],on_generate_cncjob:[],side:[],dialog:[],constructor:[],options_update_ignor:[],on_fileopenexcellon:[],on_about:[],chooser:[],within:3,encod:3,bound:3,excellon:3,loc:3,accordingli:[],ymax:3,wai:[1,3],area:3,transfer:[],support:3,fast:3,width:3,clear_poli:[],handler:[],interfac:[],includ:3,fraction:3,on_canvas_configur:[],"function":1,on_generate_isol:[],linear2gcod:3,form:[],tupl:3,on_offset_object:[],don:3,line:3,on_entry_eval_activ:[],info:[],made:3,on_generate_gerber_bounding_box:[],"default":[1,3],access:[],maximum:[],tooldia:3,record:[],limit:[],featur:3,buffered_path:3,convert_unit:3,request:[],dure:3,parser:3,aperture_pars:3,repres:3,plot2:3,on_row_activ:[],exist:[],file:[1,3],doe:3,check:[],again:3,aplic:[],polygon:3,titl:[],to_form:[],when:[1,3],detail:[],invalid:3,field:[],valid:[],bool:3,gline:3,ignor:[],on_options_project2app:[],read_form_item:[],deseri:3,on_tree_selection_chang:[],draw:3,event_nam:[],eval:[],plotcanva:[],outdat:[],geometr:3,f0e24d:3,on_filequit:[],scroll:[]},objtypes:{"0":"py:module","1":"py:method","2":"py:attribute","3":"py:class"},objnames:{"0":["py","module","Python module"],"1":["py","method","Python method"],"2":["py","attribute","Python attribute"],"3":["py","class","Python class"]},filenames:["index","app","flatcamobj","camlib"],titles:["Welcome to FlatCAM’s documentation!","FlatCAM Application","FlatCAM Objects","Camlib"],objects:{"":{camlib:[3,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,""]},"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,""]},"camlib.Gerber":{parse_lines:[3,1,1,""],scale:[3,1,1,""],frac_digits:[3,2,1,""],offset:[3,1,1,""],aperture_parse:[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,2,1,""]},camlib:{Excellon:[3,3,1,""],CNCjob:[3,3,1,""],Geometry:[3,3,1,""],Gerber:[3,3,1,""]},"camlib.Excellon":{parse_file:[3,1,1,""],parse_lines:[3,1,1,""],scale:[3,1,1,""],offset:[3,1,1,""]}},titleterms:{applic:1,flatcam:[0,1,2],object:2,indic:0,api:1,camlib:3,option:1,tabl:0,document:0,welcom:0}}) \ No newline at end of file +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,gerber:1,program:1,text:[1,3],plot_al:1,geom:3,spec:3,cnc:[1,3],digit:3,sourc:3,everi:3,string:[1,3],far:1,mous:1,"5e6cff":3,obround:3,affect:3,on_cb_plot_toggl:1,toolshap:3,button:1,list:[1,3],iter:[3,4],item:1,vector:[1,2,3],specal:1,vertic:3,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:[2,3],index:0,what:4,load_default:1,new_ax:1,neg:[1,3],current:1,delet:1,clipboard:1,"new":[1,2,4],method:[1,2,3],whatev:1,widget:[1,4],default2zero:3,flatcamgeometri:1,gener:[1,2,3],onli:[1,3],matplotlib:[1,2,3],adjust_ax:1,on_create_aligndril:1,path:[1,3],along:[3,4],do_someth:3,modifi:[1,2,3,4],make_moir:3,valu:[1,3,4],box:[1,3],convert:[2,3],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],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],type:[1,2,3,4],start:[1,3],toggl:1,more:3,on_toolbar_replot:1,on_delet:1,combo:1,on_gerber_generate_cutout:1,parse_fil:3,known:1,hole:1,must:[1,3,4],on_file_openproject:1,none:[1,2,3],left:1,ser_attr:3,work:3,uniqu:1,gtext:3,crosshair_thick:3,can:[1,2,3,4],drill:[2,3],z_move:2,fetch:[2,4],overrid:[2,3],meant:1,polygon2gcod:3,give:3,process:[1,3],share:1,indic:3,stroke:3,minimum:1,tab:[1,4],xmin:[1,3],serial:2,z_cut:2,apertureid:3,alwai:3,surfac:3,end:3,hadler:1,fix_region:3,write:3,fals:3,circular:3,b5ab3a:3,recogn:4,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,parse_cont:3,travel:3,checkbox:1,rotat:3,over:[1,4],through:[1,4],untouch:3,on_excellon_tool_choos:1,paramet:[1,2,3],fit:1,save_project:1,chosen:1,fix:3,gtk:1,set_list_select:1,window:1,html:1,creat:[1,2,3],pcb:1,on_options_app2object:1,main:[1,3],alter:3,on_zoom_out:1,non:3,"float":[1,2,3],"return":[1,2,3],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,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,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:1,linear:3,insid:3,written:4,precaut:1,given:[1,2,3],flatcamexcellon:1,base:[1,2],dictionari:[1,2,3],org:1,care:1,file_chooser_act:1,generate_from_geometri:3,thread:1,launch:1,angl:3,success:1,motion:1,turn:1,length:3,notebook:1,place:[1,4],outsid:3,geometri:1,treeselect:1,onto:3,support: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],overwrit:3,thick:3,open:[1,4],predefin:3,size:[1,3],differ:3,setup_obj_class:1,on_toggle_unit:1,associ:[1,2,3],interact:2,flatcamobj:1,attach:[1,2],circl:3,store:[3,4],editor:1,option:[1,3],ratio:[1,2],tool:[1,3],copi:[1,2,3],specifi:[1,2,3],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:1,entry_ev:1,structur:3,project:[1,4],str:[1,2,3],macro:3,posit:3,"function":[1,4],thereaft:4,ani:[1,3],compon:1,do_flash:3,raw:3,"_app_":[1,4],have:[1,3],inform:1,self:[1,2,3],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,cover:[1,3],on_mouse_move_over_plot:1,populate_objects_combo:1,make_centerlin:3,axi:[1,3],thicken:3,show:1,on_click_over_plot:1,apertur:3,radiu:3,syntax:[1,4],radio:1,corner:[1,3],find:1,crosshair_len:3,on_scale_object:1,new_object:1,slow:3,locat:3,menu:1,configur:[1,2],activ:1,state: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,mpl_connect:1,multipolygon:3,bar:1,on_create_mirror:1,coord:3,"default":[1,3,4],to_dict:3,xmax:[1,3],contain:[1,4],comma:3,movement:1,where:[1,3,4],dpi:3,user:[1,2],set:[1,2,3],noth:1,keyboard:1,startup:[1,4],on_cncjob_exportgcod:1,displai:1,"4650bd":3,see:[1,3],result:[1,3],arg:1,transpar:[2,3],close:1,contour:3,statu:1,detect:4,kei:[1,2,3,4],boundari:3,label:1,figur:[1,2],max_r:3,between:1,progress:1,wether:3,attribut:3,accord:3,extend:2,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],options2form:1,alon:3,setup_project_list:1,on_generate_gerber_bounding_box:1,lowerleft:3,whole:[1,3],col:1,obj_dict:2,load:1,cncjob:1,point:[1,3],color:3,on_gerber_generate_noncopp:1,enlarg:3,param:[1,3],respect:2,throughout:1,backend:1,quit:1,becom:[2,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,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],pixel:1,dest:1,defin:[1,3],"while":1,setup_ax:2,abov:3,margin:3,region:3,propag:1,layer:1,them:2,equal:3,itself:3,exterior:3,on_fileopengcod:1,"__init__":1,around:[1,3],make_lowerleftlin:3,belong:3,same:[1,4],respresent:3,instanc:1,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,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],entri:1,isolation_geometri:3,"true":[1,3],flatcamgerb:1,rest:3,shape:3,aspect:[1,2],linestr:3,speed:3,previous:4,cut:[1,3],on_tools_doublesid:1,trigger:1,shortcut:1,add:2,other:[1,3],board:1,save:[1,3,4],pre_pars:3,take:1,gcode_pars:3,format:2,read:[1,2,3,4],on_file_saveproject:1,background:2,press:1,height:3,mod:3,like:1,specif:[1,2,3],ring:3,zoom:1,integ:3,instanci:3,from_dict:3,necessari:1,either:1,exobj:3,on_clear_plot:1,page:[0,1],depend:[1,2,3],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,buffer_path:3,unit:[1,2,3],duplic:1,refer:4,machin:3,object:[1,3,4],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,make_therm:3,on_about:1,chooser:1,within:3,encod:3,bound:[1,3],excellon:1,loc:3,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,width:3,clear_poli:1,handler:1,interfac:1,includ:3,fraction:3,on_canvas_configur:1,on_offset_object:1,on_generate_isol:1,linear2gcod:3,form:[1,2],tupl:[2,3],don:[2,3],line:[1,3],on_entry_eval_activ:1,info:1,made:3,whether:2,access:1,maximum:1,tooldia:[2,3],record:1,limit:1,featur:3,buffered_path:3,evalu:3,"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,valid:1,bool:[2,3],gline:3,ignor:[1,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,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,""],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":{read_form:[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_options_object2app:[1,1,1,""],on_file_savedefaults:[1,1,1,""],plot_all:[1,1,1,""],set_form_item:[1,1,1,""],on_generate_excellon_cncjob:[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,""],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_tools_doublesided:[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_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,""],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,""],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,""],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,""],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,""],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,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,manual:4,geometri:3}}) \ No newline at end of file diff --git a/doc/source/app.rst b/doc/source/app.rst index 346e8d2..323ee53 100644 --- a/doc/source/app.rst +++ b/doc/source/app.rst @@ -1,26 +1,16 @@ FlatCAM Application =================== -Options -~~~~~~~ - -There are **Application Defaults**, **Project Options** and **Object Options** in FlatCAM. - -**Application Defaults** are stored in ``app.defaults``. This gets populated (updated) from the ``defaults.json`` file upon startup. These can be edited from the Options tab, where each widget calls ``app.on_options_update()`` if a change is detected. This function iterates over the keys of ``app.defaults`` and reads the GUI elements whose name is ``type + "_app_" key``. Therefore, for an option to be recognized, it must be added to ``defaults.json`` in the first place. When saving, done in ``app.on_file_savedefaults()``, the file is updated, not overwritten. - -**Project Options** inherit all options from Application Defaults upon startup. They can be changed thereafter from the UI or by opening a project, which contain previously saved Project Options. These are store in ``app.options`` and can be written and read from the Options tab in the same way as with Application defaults. - -**Object Options** for each object are inherited from Project Options upon creation of each new object. They can be modified independently from the Project's options thereafter through the UI, where the widget containing the option is identified by name: ``type + kind + "_" + option``. They are stored in ``object.options``. They are saved along the Project options when saving the project. - -The syntax of UI widget names contain a ``type``, which identifies what *type of widget* it is and how its value is supposed to be fetched, and a ``kind``, which refer to what *kind of FlatCAM Object* it is for. - -API -~~~ - .. automodule:: FlatCAM +App +~~~ + .. autoclass:: App :members: +PlotCanvas +~~~~~~~~~~ + .. autoclass:: PlotCanvas :members: diff --git a/doc/source/camlib.rst b/doc/source/camlib.rst index 67a5341..6d18fa6 100644 --- a/doc/source/camlib.rst +++ b/doc/source/camlib.rst @@ -3,14 +3,32 @@ Camlib .. automodule:: camlib +Geometry +~~~~~~~~ + .. autoclass:: Geometry :members: +Gerber +~~~~~~ + .. autoclass:: Gerber(Geometry) :members: -.. autoclass:: Excellon +ApertureMacro +~~~~~~~~~~~~~ + +.. autoclass:: ApertureMacro :members: -.. autoclass:: CNCjob +Excellon +~~~~~~~~ + +.. autoclass:: Excellon(Geometry) + :members: + +CNCJob +~~~~~~ + +.. autoclass:: CNCjob(Geometry) :members: diff --git a/doc/source/devman.rst b/doc/source/devman.rst new file mode 100644 index 0000000..0edff32 --- /dev/null +++ b/doc/source/devman.rst @@ -0,0 +1,15 @@ +FlatCAM Developer Manual +======================== + +Options +~~~~~~~ + +There are **Application Defaults**, **Project Options** and **Object Options** in FlatCAM. + +**Application Defaults** are stored in ``app.defaults``. This gets populated (updated) from the ``defaults.json`` file upon startup. These can be edited from the Options tab, where each widget calls ``app.on_options_update()`` if a change is detected. This function iterates over the keys of ``app.defaults`` and reads the GUI elements whose name is ``type + "_app_" key``. Therefore, for an option to be recognized, it must be added to ``defaults.json`` in the first place. When saving, done in ``app.on_file_savedefaults()``, the file is updated, not overwritten. + +**Project Options** inherit all options from Application Defaults upon startup. They can be changed thereafter from the UI or by opening a project, which contain previously saved Project Options. These are store in ``app.options`` and can be written and read from the Options tab in the same way as with Application defaults. + +**Object Options** for each object are inherited from Project Options upon creation of each new object. They can be modified independently from the Project's options thereafter through the UI, where the widget containing the option is identified by name: ``type + kind + "_" + option``. They are stored in ``object.options``. They are saved along the Project options when saving the project. + +The syntax of UI widget names contain a ``type``, which identifies what *type of widget* it is and how its value is supposed to be fetched, and a ``kind``, which refer to what *kind of FlatCAM Object* it is for. \ No newline at end of file diff --git a/doc/source/flatcamobj.rst b/doc/source/flatcamobj.rst index 9bc0192..f7cf1c9 100644 --- a/doc/source/flatcamobj.rst +++ b/doc/source/flatcamobj.rst @@ -3,17 +3,32 @@ FlatCAM Objects .. automodule:: FlatCAM +FlatCAMObj +~~~~~~~~~~ + .. autoclass:: FlatCAMObj :members: +FlatCAMGerber +~~~~~~~~~~~~~ + .. autoclass:: FlatCAMGerber :members: +FlatCAMExcellon +~~~~~~~~~~~~~~~ + .. autoclass:: FlatCAMExcellon :members: +FlatCAMCNCjob +~~~~~~~~~~~~~ + .. autoclass:: FlatCAMCNCjob :members: +FlatCAMGeometry +~~~~~~~~~~~~~~~ + .. autoclass:: FlatCAMGeometry :members: diff --git a/doc/source/index.rst b/doc/source/index.rst index a022f95..ad3a734 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -16,6 +16,7 @@ Contents: camlib flatcamobj app + devman