Warning before overwriting. More flexible Excellon parser (tool numbers). Other small fixes.

This commit is contained in:
Juan Pablo Caram
2014-04-05 00:36:23 -04:00
parent 9740739f05
commit 6c13b7dc59
16 changed files with 519 additions and 315 deletions

Binary file not shown.

Binary file not shown.

87
doc/build/camlib.html vendored
View File

@@ -100,10 +100,14 @@
<li class="toctree-l1"><a class="reference internal" href="app.html">FlatCAM Application</a><ul>
<li class="toctree-l2"><a class="reference internal" href="app.html#app">App</a></li>
<li class="toctree-l2"><a class="reference internal" href="app.html#plotcanvas">PlotCanvas</a></li>
<li class="toctree-l2"><a class="reference internal" href="app.html#objectcollection">ObjectCollection</a></li>
<li class="toctree-l2"><a class="reference internal" href="app.html#measurement">Measurement</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="devman.html">FlatCAM Developer Manual</a><ul>
<li class="toctree-l2"><a class="reference internal" href="devman.html#options">Options</a></li>
<li class="toctree-l2"><a class="reference internal" href="devman.html#serialization">Serialization</a></li>
<li class="toctree-l2"><a class="reference internal" href="devman.html#geometry-processing">Geometry Processing</a></li>
</ul>
</li>
</ul>
@@ -523,7 +527,19 @@ box in both positive and negative, x and y axes.</li>
<dl class="method">
<dt id="camlib.Gerber.mirror">
<tt class="descname">mirror</tt><big>(</big><em>axis</em>, <em>point</em><big>)</big><a class="headerlink" href="#camlib.Gerber.mirror" title="Permalink to this definition"></a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<dd><p>Mirrors the object around a specified axis passign through
the given point. What is affected:</p>
<ul class="simple">
<li><tt class="docutils literal"><span class="pre">buffered_paths</span></tt></li>
<li><tt class="docutils literal"><span class="pre">flash_geometry</span></tt></li>
<li><tt class="docutils literal"><span class="pre">solid_geometry</span></tt></li>
<li><tt class="docutils literal"><span class="pre">regions</span></tt></li>
</ul>
<p>NOTE:
Does not modify the data used to create these elements. If these
are recreated, the scaling will be lost. This behavior was modified
because of the complexity reached in this class.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
@@ -546,12 +562,15 @@ box in both positive and negative, x and y axes.</li>
<dd><p>Offsets the objects&#8217; geometry on the XY plane by a given vector.
These are:</p>
<ul class="simple">
<li><tt class="docutils literal"><span class="pre">paths</span></tt></li>
<li><tt class="docutils literal"><span class="pre">buffered_paths</span></tt></li>
<li><tt class="docutils literal"><span class="pre">flash_geometry</span></tt></li>
<li><tt class="docutils literal"><span class="pre">solid_geometry</span></tt></li>
<li><tt class="docutils literal"><span class="pre">regions</span></tt></li>
<li><tt class="docutils literal"><span class="pre">flashes</span></tt></li>
</ul>
<p>Then <tt class="docutils literal"><span class="pre">buffered_paths</span></tt>, <tt class="docutils literal"><span class="pre">flash_geometry</span></tt> and <tt class="docutils literal"><span class="pre">solid_geometry</span></tt>
are re-created with <tt class="docutils literal"><span class="pre">self.create_geometry()</span></tt>.</p>
<p>NOTE:
Does not modify the data used to create these elements. If these
are recreated, the scaling will be lost. This behavior was modified
because of the complexity reached in this class.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
@@ -607,16 +626,24 @@ one line of the source file.</td>
<dd><p>Scales the objects&#8217; geometry on the XY plane by a given factor.
These are:</p>
<ul class="simple">
<li><tt class="docutils literal"><span class="pre">apertures</span></tt></li>
<li><tt class="docutils literal"><span class="pre">paths</span></tt></li>
<li><tt class="docutils literal"><span class="pre">buffered_paths</span></tt></li>
<li><tt class="docutils literal"><span class="pre">flash_geometry</span></tt></li>
<li><tt class="docutils literal"><span class="pre">solid_geometry</span></tt></li>
<li><tt class="docutils literal"><span class="pre">regions</span></tt></li>
<li><tt class="docutils literal"><span class="pre">flashes</span></tt></li>
</ul>
<p>Then <tt class="docutils literal"><span class="pre">buffered_paths</span></tt>, <tt class="docutils literal"><span class="pre">flash_geometry</span></tt> and <tt class="docutils literal"><span class="pre">solid_geometry</span></tt>
are re-created with <tt class="docutils literal"><span class="pre">self.create_geometry()</span></tt>.
:param factor: Number by which to scale.
:type factor: float
:rtype : None</p>
<p>NOTE:
Does not modify the data used to create these elements. If these
are recreated, the scaling will be lost. This behavior was modified
because of the complexity reached in this class.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>factor</strong> (<em>float</em>) &#8211; Number by which to scale.</td>
</tr>
</tbody>
</table>
<p>:rtype : None</p>
</dd></dl>
</dd></dl>
@@ -668,6 +695,23 @@ list of length n.</p>
</table>
</dd></dl>
<dl class="method">
<dt id="camlib.ApertureMacro.from_dict">
<tt class="descname">from_dict</tt><big>(</big><em>d</em><big>)</big><a class="headerlink" href="#camlib.ApertureMacro.from_dict" title="Permalink to this definition"></a></dt>
<dd><p>Populates the object from a serial representation created
with <tt class="docutils literal"><span class="pre">self.to_dict()</span></tt>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>d</strong> &#8211; Serial representation of an ApertureMacro object.</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="staticmethod">
<dt id="camlib.ApertureMacro.make_centerline">
<em class="property">static </em><tt class="descname">make_centerline</tt><big>(</big><em>mods</em><big>)</big><a class="headerlink" href="#camlib.ApertureMacro.make_centerline" title="Permalink to this definition"></a></dt>
@@ -833,6 +877,23 @@ are stored in <tt class="docutils literal"><span class="pre">self.primitives</sp
</table>
</dd></dl>
<dl class="method">
<dt id="camlib.ApertureMacro.to_dict">
<tt class="descname">to_dict</tt><big>(</big><big>)</big><a class="headerlink" href="#camlib.ApertureMacro.to_dict" title="Permalink to this definition"></a></dt>
<dd><p>Returns the object in a serializable form. Only the name and
raw are required.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Dictionary representing the object. JSON ready.</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">dict</td>
</tr>
</tbody>
</table>
</dd></dl>
</dd></dl>
</div>

View File

@@ -99,11 +99,14 @@
<li class="toctree-l1"><a class="reference internal" href="app.html">FlatCAM Application</a><ul>
<li class="toctree-l2"><a class="reference internal" href="app.html#app">App</a></li>
<li class="toctree-l2"><a class="reference internal" href="app.html#plotcanvas">PlotCanvas</a></li>
<li class="toctree-l2"><a class="reference internal" href="app.html#objectcollection">ObjectCollection</a></li>
<li class="toctree-l2"><a class="reference internal" href="app.html#measurement">Measurement</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="devman.html">FlatCAM Developer Manual</a><ul>
<li class="toctree-l2"><a class="reference internal" href="devman.html#options">Options</a></li>
<li class="toctree-l2"><a class="reference internal" href="devman.html#serialization">Serialization</a></li>
<li class="toctree-l2"><a class="reference internal" href="devman.html#geometry-processing">Geometry Processing</a></li>
</ul>
</li>
</ul>
@@ -187,6 +190,12 @@
<dt><a href="camlib.html#camlib.ApertureMacro.append">append() (camlib.ApertureMacro method)</a>
</dt>
<dd><dl>
<dt><a href="app.html#FlatCAM.ObjectCollection.append">(FlatCAM.ObjectCollection method)</a>
</dt>
</dl></dd>
<dt><a href="app.html#FlatCAM.PlotCanvas.auto_adjust_axes">auto_adjust_axes() (FlatCAM.PlotCanvas method)</a>
</dt>
@@ -208,10 +217,6 @@
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="app.html#FlatCAM.App.build_list">build_list() (FlatCAM.App method)</a>
</dt>
<dt><a href="flatcamobj.html#FlatCAM.FlatCAMObj.build_ui">build_ui() (FlatCAM.FlatCAMObj method)</a>
</dt>
@@ -226,6 +231,10 @@
</dt>
<dt><a href="app.html#FlatCAM.ObjectCollection.change_name">change_name() (FlatCAM.ObjectCollection method)</a>
</dt>
<dt><a href="app.html#FlatCAM.PlotCanvas.clear">clear() (FlatCAM.PlotCanvas method)</a>
</dt>
@@ -233,12 +242,12 @@
<dt><a href="camlib.html#camlib.Geometry.clear_polygon">clear_polygon() (camlib.Geometry method)</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="camlib.html#camlib.CNCjob">CNCjob (class in camlib)</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="app.html#FlatCAM.PlotCanvas.connect">connect() (FlatCAM.PlotCanvas method)</a>
</dt>
@@ -280,6 +289,10 @@
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="app.html#FlatCAM.App.disable_plots">disable_plots() (FlatCAM.App method)</a>
</dt>
<dt><a href="camlib.html#camlib.Gerber.do_flashes">do_flashes() (camlib.Gerber method)</a>
</dt>
@@ -342,9 +355,15 @@
</dt>
<dt><a href="camlib.html#camlib.Geometry.from_dict">from_dict() (camlib.Geometry method)</a>
<dt><a href="camlib.html#camlib.ApertureMacro.from_dict">from_dict() (camlib.ApertureMacro method)</a>
</dt>
<dd><dl>
<dt><a href="camlib.html#camlib.Geometry.from_dict">(camlib.Geometry method)</a>
</dt>
</dl></dd>
</dl></td>
</tr></table>
@@ -375,14 +394,18 @@
<dt><a href="camlib.html#camlib.Gerber">Gerber (class in camlib)</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="camlib.html#camlib.Gerber.get_bounding_box">get_bounding_box() (camlib.Gerber method)</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="app.html#FlatCAM.App.get_current">get_current() (FlatCAM.App method)</a>
<dt><a href="app.html#FlatCAM.ObjectCollection.get_bounds">get_bounds() (FlatCAM.ObjectCollection method)</a>
</dt>
<dt><a href="app.html#FlatCAM.ObjectCollection.get_by_name">get_by_name() (FlatCAM.ObjectCollection method)</a>
</dt>
@@ -394,6 +417,14 @@
</dt>
<dt><a href="app.html#FlatCAM.ObjectCollection.get_list">get_list() (FlatCAM.ObjectCollection method)</a>
</dt>
<dt><a href="app.html#FlatCAM.ObjectCollection.get_names">get_names() (FlatCAM.ObjectCollection method)</a>
</dt>
<dt><a href="app.html#FlatCAM.App.get_radio_value">get_radio_value() (FlatCAM.App method)</a>
</dt>
@@ -463,12 +494,12 @@
<dt><a href="camlib.html#camlib.ApertureMacro.make_outline">make_outline() (camlib.ApertureMacro static method)</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="camlib.html#camlib.ApertureMacro.make_polygon">make_polygon() (camlib.ApertureMacro static method)</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="camlib.html#camlib.ApertureMacro.make_thermal">make_thermal() (camlib.ApertureMacro static method)</a>
</dt>
@@ -478,6 +509,10 @@
</dt>
<dt><a href="app.html#FlatCAM.Measurement">Measurement (class in FlatCAM)</a>
</dt>
<dt><a href="camlib.html#camlib.Excellon.mirror">mirror() (camlib.Excellon method)</a>
</dt>
@@ -491,6 +526,10 @@
<dt><a href="app.html#FlatCAM.PlotCanvas.mpl_connect">mpl_connect() (FlatCAM.PlotCanvas method)</a>
</dt>
<dt><a href="app.html#FlatCAM.PlotCanvas.mpl_disconnect">mpl_disconnect() (FlatCAM.PlotCanvas method)</a>
</dt>
</dl></td>
</tr></table>
@@ -514,6 +553,10 @@
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="app.html#FlatCAM.ObjectCollection">ObjectCollection (class in FlatCAM)</a>
</dt>
<dt><a href="camlib.html#camlib.CNCjob.offset">offset() (camlib.CNCjob method)</a>
</dt>
@@ -647,12 +690,12 @@
<dt><a href="app.html#FlatCAM.App.on_generate_isolation">on_generate_isolation() (FlatCAM.App method)</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="app.html#FlatCAM.App.on_generate_paintarea">on_generate_paintarea() (FlatCAM.App method)</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="app.html#FlatCAM.App.on_gerber_generate_cutout">on_gerber_generate_cutout() (FlatCAM.App method)</a>
</dt>
@@ -662,10 +705,22 @@
</dt>
<dt><a href="app.html#FlatCAM.PlotCanvas.on_key_down">on_key_down() (FlatCAM.PlotCanvas method)</a>
</dt>
<dt><a href="app.html#FlatCAM.App.on_key_over_plot">on_key_over_plot() (FlatCAM.App method)</a>
</dt>
<dt><a href="app.html#FlatCAM.PlotCanvas.on_key_up">on_key_up() (FlatCAM.PlotCanvas method)</a>
</dt>
<dt><a href="app.html#FlatCAM.ObjectCollection.on_list_selection_change">on_list_selection_change() (FlatCAM.ObjectCollection method)</a>
</dt>
<dt><a href="app.html#FlatCAM.PlotCanvas.on_mouse_move">on_mouse_move() (FlatCAM.PlotCanvas method)</a>
</dt>
@@ -713,6 +768,12 @@
<dt><a href="app.html#FlatCAM.App.on_row_activated">on_row_activated() (FlatCAM.App method)</a>
</dt>
<dd><dl>
<dt><a href="app.html#FlatCAM.ObjectCollection.on_row_activated">(FlatCAM.ObjectCollection method)</a>
</dt>
</dl></dd>
<dt><a href="app.html#FlatCAM.App.on_scale_object">on_scale_object() (FlatCAM.App method)</a>
</dt>
@@ -738,10 +799,6 @@
</dt>
<dt><a href="app.html#FlatCAM.App.on_tree_selection_changed">on_tree_selection_changed() (FlatCAM.App method)</a>
</dt>
<dt><a href="app.html#FlatCAM.App.on_update_plot">on_update_plot() (FlatCAM.App method)</a>
</dt>
@@ -896,6 +953,10 @@
</dt>
<dt><a href="app.html#FlatCAM.ObjectCollection.set_active">set_active() (FlatCAM.ObjectCollection method)</a>
</dt>
<dt><a href="app.html#FlatCAM.App.set_form_item">set_form_item() (FlatCAM.App method)</a>
</dt>
@@ -906,16 +967,16 @@
</dl></dd>
<dt><a href="app.html#FlatCAM.App.set_list_selection">set_list_selection() (FlatCAM.App method)</a>
</dt>
<dt><a href="app.html#FlatCAM.App.set_progress_bar">set_progress_bar() (FlatCAM.App method)</a>
<dt><a href="app.html#FlatCAM.ObjectCollection.set_list_selection">set_list_selection() (FlatCAM.ObjectCollection method)</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="app.html#FlatCAM.App.set_progress_bar">set_progress_bar() (FlatCAM.App method)</a>
</dt>
<dt><a href="flatcamobj.html#FlatCAM.FlatCAMObj.setup_axes">setup_axes() (FlatCAM.FlatCAMObj method)</a>
</dt>
@@ -928,10 +989,6 @@
</dt>
<dt><a href="app.html#FlatCAM.App.setup_project_list">setup_project_list() (FlatCAM.App method)</a>
</dt>
<dt><a href="camlib.html#camlib.Geometry.size">size() (camlib.Geometry method)</a>
</dt>
@@ -942,9 +999,15 @@
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="camlib.html#camlib.Geometry.to_dict">to_dict() (camlib.Geometry method)</a>
<dt><a href="camlib.html#camlib.ApertureMacro.to_dict">to_dict() (camlib.ApertureMacro method)</a>
</dt>
<dd><dl>
<dt><a href="camlib.html#camlib.Geometry.to_dict">(camlib.Geometry method)</a>
</dt>
</dl></dd>
</dl></td>
<td style="width: 33%" valign="top"><dl>

View File

@@ -99,11 +99,14 @@
<li class="toctree-l1"><a class="reference internal" href="app.html">FlatCAM Application</a><ul>
<li class="toctree-l2"><a class="reference internal" href="app.html#app">App</a></li>
<li class="toctree-l2"><a class="reference internal" href="app.html#plotcanvas">PlotCanvas</a></li>
<li class="toctree-l2"><a class="reference internal" href="app.html#objectcollection">ObjectCollection</a></li>
<li class="toctree-l2"><a class="reference internal" href="app.html#measurement">Measurement</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="devman.html">FlatCAM Developer Manual</a><ul>
<li class="toctree-l2"><a class="reference internal" href="devman.html#options">Options</a></li>
<li class="toctree-l2"><a class="reference internal" href="devman.html#serialization">Serialization</a></li>
<li class="toctree-l2"><a class="reference internal" href="devman.html#geometry-processing">Geometry Processing</a></li>
</ul>
</li>
</ul>
@@ -164,11 +167,14 @@
<li class="toctree-l1"><a class="reference internal" href="app.html">FlatCAM Application</a><ul>
<li class="toctree-l2"><a class="reference internal" href="app.html#app">App</a></li>
<li class="toctree-l2"><a class="reference internal" href="app.html#plotcanvas">PlotCanvas</a></li>
<li class="toctree-l2"><a class="reference internal" href="app.html#objectcollection">ObjectCollection</a></li>
<li class="toctree-l2"><a class="reference internal" href="app.html#measurement">Measurement</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="devman.html">FlatCAM Developer Manual</a><ul>
<li class="toctree-l2"><a class="reference internal" href="devman.html#options">Options</a></li>
<li class="toctree-l2"><a class="reference internal" href="devman.html#serialization">Serialization</a></li>
<li class="toctree-l2"><a class="reference internal" href="devman.html#geometry-processing">Geometry Processing</a></li>
</ul>
</li>
</ul>

BIN
doc/build/objects.inv vendored

Binary file not shown.

View File

@@ -105,11 +105,14 @@
<li class="toctree-l1"><a class="reference internal" href="app.html">FlatCAM Application</a><ul>
<li class="toctree-l2"><a class="reference internal" href="app.html#app">App</a></li>
<li class="toctree-l2"><a class="reference internal" href="app.html#plotcanvas">PlotCanvas</a></li>
<li class="toctree-l2"><a class="reference internal" href="app.html#objectcollection">ObjectCollection</a></li>
<li class="toctree-l2"><a class="reference internal" href="app.html#measurement">Measurement</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="devman.html">FlatCAM Developer Manual</a><ul>
<li class="toctree-l2"><a class="reference internal" href="devman.html#options">Options</a></li>
<li class="toctree-l2"><a class="reference internal" href="devman.html#serialization">Serialization</a></li>
<li class="toctree-l2"><a class="reference internal" href="devman.html#geometry-processing">Geometry Processing</a></li>
</ul>
</li>
</ul>

View File

@@ -106,11 +106,14 @@
<li class="toctree-l1"><a class="reference internal" href="app.html">FlatCAM Application</a><ul>
<li class="toctree-l2"><a class="reference internal" href="app.html#app">App</a></li>
<li class="toctree-l2"><a class="reference internal" href="app.html#plotcanvas">PlotCanvas</a></li>
<li class="toctree-l2"><a class="reference internal" href="app.html#objectcollection">ObjectCollection</a></li>
<li class="toctree-l2"><a class="reference internal" href="app.html#measurement">Measurement</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="devman.html">FlatCAM Developer Manual</a><ul>
<li class="toctree-l2"><a class="reference internal" href="devman.html#options">Options</a></li>
<li class="toctree-l2"><a class="reference internal" href="devman.html#serialization">Serialization</a></li>
<li class="toctree-l2"><a class="reference internal" href="devman.html#geometry-processing">Geometry Processing</a></li>
</ul>
</li>
</ul>

File diff suppressed because one or more lines are too long

View File

@@ -14,3 +14,15 @@ PlotCanvas
.. autoclass:: PlotCanvas
:members:
ObjectCollection
~~~~~~~~~~~~~~~~
.. autoclass:: ObjectCollection
:members:
Measurement
~~~~~~~~~~~
.. autoclass:: Measurement
:members: