| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451 |
- <!DOCTYPE html>
- <!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
- <!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
-
- <title>FlatCAM Objects — Cirkuix 0.5 documentation</title>
-
-
-
-
- <link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>
-
-
- <script type="text/javascript">
- var DOCUMENTATION_OPTIONS = {
- URL_ROOT:'./',
- VERSION:'0.5',
- COLLAPSE_INDEX:false,
- FILE_SUFFIX:'.html',
- HAS_SOURCE: true
- };
- </script>
- <script type="text/javascript" src="_static/jquery.js"></script>
- <script type="text/javascript" src="_static/underscore.js"></script>
- <script type="text/javascript" src="_static/doctools.js"></script>
-
-
-
-
- <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
- <script type="text/javascript" src="_static/js/theme.js"></script>
-
-
-
- <script type="text/javascript">
- jQuery(function () {
- SphinxRtdTheme.StickyNav.enable();
- });
- </script>
-
-
- <link rel="top" title="Cirkuix 0.5 documentation" href="index.html"/>
- <link rel="next" title="FlatCAM Application" href="app.html"/>
- <link rel="prev" title="Camlib" href="camlib.html"/>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script>
- </head>
- <body class="wy-body-for-nav" role="document">
- <div class="wy-grid-for-nav">
-
- <nav data-toggle="wy-nav-shift" class="wy-nav-side">
- <div class="wy-side-nav-search">
- <a href="index.html" class="icon icon-home"> Cirkuix</a>
- <div role="search">
- <form id ="rtd-search-form" class="wy-form" action="search.html" method="get">
- <input type="text" name="q" placeholder="Search docs" />
- <input type="hidden" name="check_keywords" value="yes" />
- <input type="hidden" name="area" value="default" />
- </form>
- </div>
- </div>
- <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
-
-
- <ul class="current">
- <li class="toctree-l1"><a class="reference internal" href="camlib.html">Camlib</a><ul>
- <li class="toctree-l2"><a class="reference internal" href="camlib.html#geometry">Geometry</a></li>
- <li class="toctree-l2"><a class="reference internal" href="camlib.html#gerber">Gerber</a></li>
- <li class="toctree-l2"><a class="reference internal" href="camlib.html#aperturemacro">ApertureMacro</a></li>
- <li class="toctree-l2"><a class="reference internal" href="camlib.html#excellon">Excellon</a></li>
- <li class="toctree-l2"><a class="reference internal" href="camlib.html#cncjob">CNCJob</a></li>
- </ul>
- </li>
- <li class="toctree-l1 current"><a class="current reference internal" href="">FlatCAM Objects</a><ul>
- <li class="toctree-l2"><a class="reference internal" href="#flatcamobj">FlatCAMObj</a></li>
- <li class="toctree-l2"><a class="reference internal" href="#flatcamgerber">FlatCAMGerber</a></li>
- <li class="toctree-l2"><a class="reference internal" href="#flatcamexcellon">FlatCAMExcellon</a></li>
- <li class="toctree-l2"><a class="reference internal" href="#flatcamcncjob">FlatCAMCNCjob</a></li>
- <li class="toctree-l2"><a class="reference internal" href="#flatcamgeometry">FlatCAMGeometry</a></li>
- </ul>
- </li>
- <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>
-
- </div>
-
- </nav>
- <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
-
- <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
- <i data-toggle="wy-nav-top" class="icon icon-reorder"></i>
- <a href="index.html">Cirkuix</a>
- </nav>
-
- <div class="wy-nav-content">
- <div class="rst-content">
- <div role="navigation" aria-label="breadcrumbs navigation">
- <ul class="wy-breadcrumbs">
- <li><a href="index.html">Docs</a> »</li>
-
- <li>FlatCAM Objects</li>
- <li class="wy-breadcrumbs-aside">
-
- <a href="_sources/flatcamobj.txt" rel="nofollow"> View page source</a>
-
- </li>
- </ul>
- <hr/>
- </div>
- <div role="main">
-
- <div class="section" id="module-FlatCAM">
- <span id="flatcam-objects"></span><h1>FlatCAM Objects<a class="headerlink" href="#module-FlatCAM" title="Permalink to this headline">¶</a></h1>
- <div class="section" id="flatcamobj">
- <h2>FlatCAMObj<a class="headerlink" href="#flatcamobj" title="Permalink to this headline">¶</a></h2>
- <dl class="class">
- <dt id="FlatCAM.FlatCAMObj">
- <em class="property">class </em><tt class="descclassname">FlatCAM.</tt><tt class="descname">FlatCAMObj</tt><big>(</big><em>name</em><big>)</big><a class="headerlink" href="#FlatCAM.FlatCAMObj" title="Permalink to this definition">¶</a></dt>
- <dd><p>Base type of objects handled in FlatCAM. These become interactive
- in the GUI, can be plotted, and their options can be modified
- by the user in their respective forms.</p>
- <dl class="method">
- <dt id="FlatCAM.FlatCAMObj.build_ui">
- <tt class="descname">build_ui</tt><big>(</big><big>)</big><a class="headerlink" href="#FlatCAM.FlatCAMObj.build_ui" title="Permalink to this definition">¶</a></dt>
- <dd><p>Sets up the UI/form for this object.</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">None</td>
- </tr>
- <tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">None</td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
- <dl class="method">
- <dt id="FlatCAM.FlatCAMObj.deserialize">
- <tt class="descname">deserialize</tt><big>(</big><em>obj_dict</em><big>)</big><a class="headerlink" href="#FlatCAM.FlatCAMObj.deserialize" title="Permalink to this definition">¶</a></dt>
- <dd><p>Re-builds an object from its serialized version.</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>obj_dict</strong> (<em>dict</em>) – Dictionary representing a FlatCAMObj</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="method">
- <dt id="FlatCAM.FlatCAMObj.plot">
- <tt class="descname">plot</tt><big>(</big><big>)</big><a class="headerlink" href="#FlatCAM.FlatCAMObj.plot" title="Permalink to this definition">¶</a></dt>
- <dd><p>Plot this object (Extend this method to implement the actual plotting).
- Axes get created, appended to canvas and cleared before plotting.
- Call this in descendants before doing the plotting.</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">Whether to continue plotting or not depending on the “plot” option.</td>
- </tr>
- <tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">bool</td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
- <dl class="method">
- <dt id="FlatCAM.FlatCAMObj.read_form">
- <tt class="descname">read_form</tt><big>(</big><big>)</big><a class="headerlink" href="#FlatCAM.FlatCAMObj.read_form" title="Permalink to this definition">¶</a></dt>
- <dd><p>Reads form into <tt class="docutils literal"><span class="pre">self.options</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">Returns:</th><td class="field-body">None</td>
- </tr>
- <tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">None</td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
- <dl class="method">
- <dt id="FlatCAM.FlatCAMObj.read_form_item">
- <tt class="descname">read_form_item</tt><big>(</big><em>option</em><big>)</big><a class="headerlink" href="#FlatCAM.FlatCAMObj.read_form_item" title="Permalink to this definition">¶</a></dt>
- <dd><p>Reads the specified option from the UI form into <tt class="docutils literal"><span class="pre">self.options</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>option</strong> (<em>str</em>) – Name of the option.</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="method">
- <dt id="FlatCAM.FlatCAMObj.serialize">
- <tt class="descname">serialize</tt><big>(</big><big>)</big><a class="headerlink" href="#FlatCAM.FlatCAMObj.serialize" title="Permalink to this definition">¶</a></dt>
- <dd><p>Returns a representation of the object as a dictionary so
- it can be later exported as JSON. Override this method.</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</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>
- <dl class="method">
- <dt id="FlatCAM.FlatCAMObj.set_form_item">
- <tt class="descname">set_form_item</tt><big>(</big><em>option</em><big>)</big><a class="headerlink" href="#FlatCAM.FlatCAMObj.set_form_item" title="Permalink to this definition">¶</a></dt>
- <dd><p>Copies the specified option to the UI form.</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>option</strong> (<em>str</em>) – Name of the option (Key in <tt class="docutils literal"><span class="pre">self.options</span></tt>).</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="method">
- <dt id="FlatCAM.FlatCAMObj.setup_axes">
- <tt class="descname">setup_axes</tt><big>(</big><em>figure</em><big>)</big><a class="headerlink" href="#FlatCAM.FlatCAMObj.setup_axes" title="Permalink to this definition">¶</a></dt>
- <dd><p>1) Creates axes if they don’t exist. 2) Clears axes. 3) Attaches
- them to figure if not part of the figure. 4) Sets transparent
- background. 5) Sets 1:1 scale aspect ratio.</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>figure</strong> (<em>matplotlib.figure.Figure</em>) – A Matplotlib.Figure on which to add/configure axes.</td>
- </tr>
- <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
- </tr>
- <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">None</td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
- <dl class="method">
- <dt id="FlatCAM.FlatCAMObj.to_form">
- <tt class="descname">to_form</tt><big>(</big><big>)</big><a class="headerlink" href="#FlatCAM.FlatCAMObj.to_form" title="Permalink to this definition">¶</a></dt>
- <dd><p>Copies options to the UI form.</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">None</td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
- </dd></dl>
- </div>
- <div class="section" id="flatcamgerber">
- <h2>FlatCAMGerber<a class="headerlink" href="#flatcamgerber" title="Permalink to this headline">¶</a></h2>
- <dl class="class">
- <dt id="FlatCAM.FlatCAMGerber">
- <em class="property">class </em><tt class="descclassname">FlatCAM.</tt><tt class="descname">FlatCAMGerber</tt><big>(</big><em>name</em><big>)</big><a class="headerlink" href="#FlatCAM.FlatCAMGerber" title="Permalink to this definition">¶</a></dt>
- <dd><p>Represents Gerber code.</p>
- <dl class="method">
- <dt id="FlatCAM.FlatCAMGerber.convert_units">
- <tt class="descname">convert_units</tt><big>(</big><em>units</em><big>)</big><a class="headerlink" href="#FlatCAM.FlatCAMGerber.convert_units" title="Permalink to this definition">¶</a></dt>
- <dd><p>Converts the units of the object by scaling dimensions in all geometry
- and options.</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>units</strong> (<em>str</em>) – Units to which to convert the object: “IN” or “MM”.</td>
- </tr>
- <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
- </tr>
- <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">None</td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
- </dd></dl>
- </div>
- <div class="section" id="flatcamexcellon">
- <h2>FlatCAMExcellon<a class="headerlink" href="#flatcamexcellon" title="Permalink to this headline">¶</a></h2>
- <dl class="class">
- <dt id="FlatCAM.FlatCAMExcellon">
- <em class="property">class </em><tt class="descclassname">FlatCAM.</tt><tt class="descname">FlatCAMExcellon</tt><big>(</big><em>name</em><big>)</big><a class="headerlink" href="#FlatCAM.FlatCAMExcellon" title="Permalink to this definition">¶</a></dt>
- <dd><p>Represents Excellon/Drill code.</p>
- </dd></dl>
- </div>
- <div class="section" id="flatcamcncjob">
- <h2>FlatCAMCNCjob<a class="headerlink" href="#flatcamcncjob" title="Permalink to this headline">¶</a></h2>
- <dl class="class">
- <dt id="FlatCAM.FlatCAMCNCjob">
- <em class="property">class </em><tt class="descclassname">FlatCAM.</tt><tt class="descname">FlatCAMCNCjob</tt><big>(</big><em>name</em>, <em>units='in'</em>, <em>kind='generic'</em>, <em>z_move=0.1</em>, <em>feedrate=3.0</em>, <em>z_cut=-0.002</em>, <em>tooldia=0.0</em><big>)</big><a class="headerlink" href="#FlatCAM.FlatCAMCNCjob" title="Permalink to this definition">¶</a></dt>
- <dd><p>Represents G-Code.</p>
- </dd></dl>
- </div>
- <div class="section" id="flatcamgeometry">
- <h2>FlatCAMGeometry<a class="headerlink" href="#flatcamgeometry" title="Permalink to this headline">¶</a></h2>
- <dl class="class">
- <dt id="FlatCAM.FlatCAMGeometry">
- <em class="property">class </em><tt class="descclassname">FlatCAM.</tt><tt class="descname">FlatCAMGeometry</tt><big>(</big><em>name</em><big>)</big><a class="headerlink" href="#FlatCAM.FlatCAMGeometry" title="Permalink to this definition">¶</a></dt>
- <dd><p>Geometric object not associated with a specific
- format.</p>
- <dl class="method">
- <dt id="FlatCAM.FlatCAMGeometry.offset">
- <tt class="descname">offset</tt><big>(</big><em>vect</em><big>)</big><a class="headerlink" href="#FlatCAM.FlatCAMGeometry.offset" title="Permalink to this definition">¶</a></dt>
- <dd><p>Offsets all geometry by a given vector/</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>vect</strong> (<em>tuple</em>) – (x, y) vector by which to offset the object’s geometry.</td>
- </tr>
- <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
- </tr>
- <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">None</td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
- <dl class="method">
- <dt id="FlatCAM.FlatCAMGeometry.plot">
- <tt class="descname">plot</tt><big>(</big><big>)</big><a class="headerlink" href="#FlatCAM.FlatCAMGeometry.plot" title="Permalink to this definition">¶</a></dt>
- <dd><p>Plots the object into its axes. If None, of if the axes
- are not part of the app’s figure, it fetches new ones.</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">None</td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
- <dl class="method">
- <dt id="FlatCAM.FlatCAMGeometry.scale">
- <tt class="descname">scale</tt><big>(</big><em>factor</em><big>)</big><a class="headerlink" href="#FlatCAM.FlatCAMGeometry.scale" title="Permalink to this definition">¶</a></dt>
- <dd><p>Scales all geometry by a given factor.</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>) – Factor by which to scale the object’s geometry/</td>
- </tr>
- <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
- </tr>
- <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">None</td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
- </dd></dl>
- </div>
- </div>
- </div>
- <footer>
-
- <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
-
- <a href="app.html" class="btn btn-neutral float-right" title="FlatCAM Application"/>Next <span class="icon icon-circle-arrow-right"></span></a>
-
-
- <a href="camlib.html" class="btn btn-neutral" title="Camlib"><span class="icon icon-circle-arrow-left"></span> Previous</a>
-
- </div>
-
- <hr/>
- <div role="contentinfo">
- <p>
- © Copyright 2014, Juan Pablo Caram.
- </p>
- </div>
- <a href="https://github.com/snide/sphinx_rtd_theme">Sphinx theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>
- </footer>
- </div>
- </div>
- </section>
- </div>
-
- </body>
- </html>
|