app.html 86 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894
  1. <!DOCTYPE html>
  2. <!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
  3. <!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
  4. <head>
  5. <meta charset="utf-8">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <title>FlatCAM Application &mdash; Cirkuix 0.5 documentation</title>
  8. <link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>
  9. <script type="text/javascript">
  10. var DOCUMENTATION_OPTIONS = {
  11. URL_ROOT:'./',
  12. VERSION:'0.5',
  13. COLLAPSE_INDEX:false,
  14. FILE_SUFFIX:'.html',
  15. HAS_SOURCE: true
  16. };
  17. </script>
  18. <script type="text/javascript" src="_static/jquery.js"></script>
  19. <script type="text/javascript" src="_static/underscore.js"></script>
  20. <script type="text/javascript" src="_static/doctools.js"></script>
  21. <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
  22. <script type="text/javascript" src="_static/js/theme.js"></script>
  23. <script type="text/javascript">
  24. jQuery(function () {
  25. SphinxRtdTheme.StickyNav.enable();
  26. });
  27. </script>
  28. <link rel="top" title="Cirkuix 0.5 documentation" href="index.html"/>
  29. <link rel="next" title="FlatCAM Developer Manual" href="devman.html"/>
  30. <link rel="prev" title="FlatCAM Objects" href="flatcamobj.html"/>
  31. <script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script>
  32. </head>
  33. <body class="wy-body-for-nav" role="document">
  34. <div class="wy-grid-for-nav">
  35. <nav data-toggle="wy-nav-shift" class="wy-nav-side">
  36. <div class="wy-side-nav-search">
  37. <a href="index.html" class="icon icon-home"> Cirkuix</a>
  38. <div role="search">
  39. <form id ="rtd-search-form" class="wy-form" action="search.html" method="get">
  40. <input type="text" name="q" placeholder="Search docs" />
  41. <input type="hidden" name="check_keywords" value="yes" />
  42. <input type="hidden" name="area" value="default" />
  43. </form>
  44. </div>
  45. </div>
  46. <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
  47. <ul class="current">
  48. <li class="toctree-l1"><a class="reference internal" href="camlib.html">Camlib</a><ul>
  49. <li class="toctree-l2"><a class="reference internal" href="camlib.html#geometry">Geometry</a></li>
  50. <li class="toctree-l2"><a class="reference internal" href="camlib.html#gerber">Gerber</a></li>
  51. <li class="toctree-l2"><a class="reference internal" href="camlib.html#aperturemacro">ApertureMacro</a></li>
  52. <li class="toctree-l2"><a class="reference internal" href="camlib.html#excellon">Excellon</a></li>
  53. <li class="toctree-l2"><a class="reference internal" href="camlib.html#cncjob">CNCJob</a></li>
  54. </ul>
  55. </li>
  56. <li class="toctree-l1"><a class="reference internal" href="flatcamobj.html">FlatCAM Objects</a><ul>
  57. <li class="toctree-l2"><a class="reference internal" href="flatcamobj.html#flatcamobj">FlatCAMObj</a></li>
  58. <li class="toctree-l2"><a class="reference internal" href="flatcamobj.html#flatcamgerber">FlatCAMGerber</a></li>
  59. <li class="toctree-l2"><a class="reference internal" href="flatcamobj.html#flatcamexcellon">FlatCAMExcellon</a></li>
  60. <li class="toctree-l2"><a class="reference internal" href="flatcamobj.html#flatcamcncjob">FlatCAMCNCjob</a></li>
  61. <li class="toctree-l2"><a class="reference internal" href="flatcamobj.html#flatcamgeometry">FlatCAMGeometry</a></li>
  62. </ul>
  63. </li>
  64. <li class="toctree-l1 current"><a class="current reference internal" href="">FlatCAM Application</a><ul>
  65. <li class="toctree-l2"><a class="reference internal" href="#app">App</a></li>
  66. <li class="toctree-l2"><a class="reference internal" href="#plotcanvas">PlotCanvas</a></li>
  67. <li class="toctree-l2"><a class="reference internal" href="#objectcollection">ObjectCollection</a></li>
  68. <li class="toctree-l2"><a class="reference internal" href="#measurement">Measurement</a></li>
  69. </ul>
  70. </li>
  71. <li class="toctree-l1"><a class="reference internal" href="devman.html">FlatCAM Developer Manual</a><ul>
  72. <li class="toctree-l2"><a class="reference internal" href="devman.html#options">Options</a></li>
  73. <li class="toctree-l2"><a class="reference internal" href="devman.html#serialization">Serialization</a></li>
  74. <li class="toctree-l2"><a class="reference internal" href="devman.html#geometry-processing">Geometry Processing</a></li>
  75. </ul>
  76. </li>
  77. </ul>
  78. </div>
  79. &nbsp;
  80. </nav>
  81. <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
  82. <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
  83. <i data-toggle="wy-nav-top" class="icon icon-reorder"></i>
  84. <a href="index.html">Cirkuix</a>
  85. </nav>
  86. <div class="wy-nav-content">
  87. <div class="rst-content">
  88. <div role="navigation" aria-label="breadcrumbs navigation">
  89. <ul class="wy-breadcrumbs">
  90. <li><a href="index.html">Docs</a> &raquo;</li>
  91. <li>FlatCAM Application</li>
  92. <li class="wy-breadcrumbs-aside">
  93. <a href="_sources/app.txt" rel="nofollow"> View page source</a>
  94. </li>
  95. </ul>
  96. <hr/>
  97. </div>
  98. <div role="main">
  99. <div class="section" id="module-FlatCAM">
  100. <span id="flatcam-application"></span><h1>FlatCAM Application<a class="headerlink" href="#module-FlatCAM" title="Permalink to this headline">¶</a></h1>
  101. <div class="section" id="app">
  102. <h2>App<a class="headerlink" href="#app" title="Permalink to this headline">¶</a></h2>
  103. <dl class="class">
  104. <dt id="FlatCAM.App">
  105. <em class="property">class </em><tt class="descclassname">FlatCAM.</tt><tt class="descname">App</tt><a class="headerlink" href="#FlatCAM.App" title="Permalink to this definition">¶</a></dt>
  106. <dd><p>The main application class. The constructor starts the GUI.</p>
  107. <dl class="method">
  108. <dt id="FlatCAM.App.disable_plots">
  109. <tt class="descname">disable_plots</tt><big>(</big><em>except_current=False</em><big>)</big><a class="headerlink" href="#FlatCAM.App.disable_plots" title="Permalink to this definition">¶</a></dt>
  110. <dd><p>Disables all plots with exception of the current object if specified.</p>
  111. <table class="docutils field-list" frame="void" rules="none">
  112. <col class="field-name" />
  113. <col class="field-body" />
  114. <tbody valign="top">
  115. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>except_current</strong> &#8211; Wether to skip the current object.</td>
  116. </tr>
  117. <tr class="field-even field"><th class="field-name" colspan="2">Rtype except_current:</th></tr>
  118. <tr class="field-even field"><td>&nbsp;</td><td class="field-body">boolean</td>
  119. </tr>
  120. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  121. </tr>
  122. </tbody>
  123. </table>
  124. </dd></dl>
  125. <dl class="method">
  126. <dt id="FlatCAM.App.file_chooser_action">
  127. <tt class="descname">file_chooser_action</tt><big>(</big><em>on_success</em><big>)</big><a class="headerlink" href="#FlatCAM.App.file_chooser_action" title="Permalink to this definition">¶</a></dt>
  128. <dd><p>Opens the file chooser and runs on_success on a separate thread
  129. upon completion of valid file choice.</p>
  130. <table class="docutils field-list" frame="void" rules="none">
  131. <col class="field-name" />
  132. <col class="field-body" />
  133. <tbody valign="top">
  134. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>on_success</strong> (<em>func</em>) &#8211; A function to run upon completion of a valid file
  135. selection. Takes 2 parameters: The app instance and the filename.
  136. Note that it is run on a separate thread, therefore it must take the
  137. appropriate precautions when accessing shared resources.</td>
  138. </tr>
  139. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  140. </tr>
  141. </tbody>
  142. </table>
  143. </dd></dl>
  144. <dl class="method">
  145. <dt id="FlatCAM.App.file_chooser_save_action">
  146. <tt class="descname">file_chooser_save_action</tt><big>(</big><em>on_success</em><big>)</big><a class="headerlink" href="#FlatCAM.App.file_chooser_save_action" title="Permalink to this definition">¶</a></dt>
  147. <dd><p>Opens the file chooser and runs on_success upon completion of valid file choice.</p>
  148. <table class="docutils field-list" frame="void" rules="none">
  149. <col class="field-name" />
  150. <col class="field-body" />
  151. <tbody valign="top">
  152. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>on_success</strong> &#8211; A function to run upon selection of a filename. Takes 2
  153. parameters: The instance of the application (App) and the chosen filename. This
  154. gets run immediately in the same thread.</td>
  155. </tr>
  156. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  157. </tr>
  158. </tbody>
  159. </table>
  160. </dd></dl>
  161. <dl class="method">
  162. <dt id="FlatCAM.App.get_eval">
  163. <tt class="descname">get_eval</tt><big>(</big><em>widget_name</em><big>)</big><a class="headerlink" href="#FlatCAM.App.get_eval" title="Permalink to this definition">¶</a></dt>
  164. <dd><p>Runs eval() on the on the text entry of name &#8216;widget_name&#8217;
  165. and returns the results.</p>
  166. <table class="docutils field-list" frame="void" rules="none">
  167. <col class="field-name" />
  168. <col class="field-body" />
  169. <tbody valign="top">
  170. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>widget_name</strong> (<em>str</em>) &#8211; Name of Gtk.Entry</td>
  171. </tr>
  172. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Depends on contents of the entry text.</td>
  173. </tr>
  174. </tbody>
  175. </table>
  176. </dd></dl>
  177. <dl class="method">
  178. <dt id="FlatCAM.App.get_radio_value">
  179. <tt class="descname">get_radio_value</tt><big>(</big><em>radio_set</em><big>)</big><a class="headerlink" href="#FlatCAM.App.get_radio_value" title="Permalink to this definition">¶</a></dt>
  180. <dd><p>Returns the radio_set[key] of the radiobutton
  181. whose name is key is active.</p>
  182. <table class="docutils field-list" frame="void" rules="none">
  183. <col class="field-name" />
  184. <col class="field-body" />
  185. <tbody valign="top">
  186. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>radio_set</strong> (<em>dict</em>) &#8211; A dictionary containing widget_name: value pairs.</td>
  187. </tr>
  188. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">radio_set[key]</td>
  189. </tr>
  190. </tbody>
  191. </table>
  192. </dd></dl>
  193. <dl class="method">
  194. <dt id="FlatCAM.App.info">
  195. <tt class="descname">info</tt><big>(</big><em>text</em><big>)</big><a class="headerlink" href="#FlatCAM.App.info" title="Permalink to this definition">¶</a></dt>
  196. <dd><p>Show text on the status bar. This method is thread safe.</p>
  197. <table class="docutils field-list" frame="void" rules="none">
  198. <col class="field-name" />
  199. <col class="field-body" />
  200. <tbody valign="top">
  201. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>text</strong> (<em>str</em>) &#8211; Text to display.</td>
  202. </tr>
  203. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  204. </tr>
  205. </tbody>
  206. </table>
  207. </dd></dl>
  208. <dl class="method">
  209. <dt id="FlatCAM.App.load_defaults">
  210. <tt class="descname">load_defaults</tt><big>(</big><big>)</big><a class="headerlink" href="#FlatCAM.App.load_defaults" title="Permalink to this definition">¶</a></dt>
  211. <dd><p>Loads the aplication&#8217;s default settings from defaults.json into
  212. <tt class="docutils literal"><span class="pre">self.defaults</span></tt>.</p>
  213. <table class="docutils field-list" frame="void" rules="none">
  214. <col class="field-name" />
  215. <col class="field-body" />
  216. <tbody valign="top">
  217. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  218. </tr>
  219. </tbody>
  220. </table>
  221. </dd></dl>
  222. <dl class="method">
  223. <dt id="FlatCAM.App.new_object">
  224. <tt class="descname">new_object</tt><big>(</big><em>kind</em>, <em>name</em>, <em>initialize</em><big>)</big><a class="headerlink" href="#FlatCAM.App.new_object" title="Permalink to this definition">¶</a></dt>
  225. <dd><p>Creates a new specalized FlatCAMObj and attaches it to the application,
  226. this is, updates the GUI accordingly, any other records and plots it.
  227. This method is thread-safe.</p>
  228. <table class="docutils field-list" frame="void" rules="none">
  229. <col class="field-name" />
  230. <col class="field-body" />
  231. <tbody valign="top">
  232. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  233. <li><strong>kind</strong> (<em>str</em>) &#8211; The kind of object to create. One of &#8216;gerber&#8217;,
  234. &#8216;excellon&#8217;, &#8216;cncjob&#8217; and &#8216;geometry&#8217;.</li>
  235. <li><strong>name</strong> (<em>str</em>) &#8211; Name for the object.</li>
  236. <li><strong>initialize</strong> (<em>function</em>) &#8211; Function to run after creation of the object
  237. but before it is attached to the application. The function is
  238. called with 2 parameters: the new object and the App instance.</li>
  239. </ul>
  240. </td>
  241. </tr>
  242. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">None</p>
  243. </td>
  244. </tr>
  245. <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">None</p>
  246. </td>
  247. </tr>
  248. </tbody>
  249. </table>
  250. </dd></dl>
  251. <dl class="method">
  252. <dt id="FlatCAM.App.on_about">
  253. <tt class="descname">on_about</tt><big>(</big><em>widget</em><big>)</big><a class="headerlink" href="#FlatCAM.App.on_about" title="Permalink to this definition">¶</a></dt>
  254. <dd><p>Opens the &#8216;About&#8217; dialog box.</p>
  255. <table class="docutils field-list" frame="void" rules="none">
  256. <col class="field-name" />
  257. <col class="field-body" />
  258. <tbody valign="top">
  259. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>widget</strong> &#8211; Ignored.</td>
  260. </tr>
  261. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  262. </tr>
  263. </tbody>
  264. </table>
  265. </dd></dl>
  266. <dl class="method">
  267. <dt id="FlatCAM.App.on_activate_name">
  268. <tt class="descname">on_activate_name</tt><big>(</big><em>entry</em><big>)</big><a class="headerlink" href="#FlatCAM.App.on_activate_name" title="Permalink to this definition">¶</a></dt>
  269. <dd><p>Hitting &#8216;Enter&#8217; after changing the name of an item
  270. updates the item dictionary and re-builds the item list.</p>
  271. <table class="docutils field-list" frame="void" rules="none">
  272. <col class="field-name" />
  273. <col class="field-body" />
  274. <tbody valign="top">
  275. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>entry</strong> &#8211; The widget from which this was called.</td>
  276. </tr>
  277. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  278. </tr>
  279. </tbody>
  280. </table>
  281. </dd></dl>
  282. <dl class="method">
  283. <dt id="FlatCAM.App.on_canvas_configure">
  284. <tt class="descname">on_canvas_configure</tt><big>(</big><em>widget</em>, <em>event</em><big>)</big><a class="headerlink" href="#FlatCAM.App.on_canvas_configure" title="Permalink to this definition">¶</a></dt>
  285. <dd><p>Called whenever the canvas changes size. The axes are updated such
  286. as to use the whole canvas.</p>
  287. <table class="docutils field-list" frame="void" rules="none">
  288. <col class="field-name" />
  289. <col class="field-body" />
  290. <tbody valign="top">
  291. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  292. <li><strong>widget</strong> &#8211; Ignored.</li>
  293. <li><strong>event</strong> &#8211; Ignored.</li>
  294. </ul>
  295. </td>
  296. </tr>
  297. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">None</p>
  298. </td>
  299. </tr>
  300. </tbody>
  301. </table>
  302. </dd></dl>
  303. <dl class="method">
  304. <dt id="FlatCAM.App.on_cb_plot_toggled">
  305. <tt class="descname">on_cb_plot_toggled</tt><big>(</big><em>widget</em><big>)</big><a class="headerlink" href="#FlatCAM.App.on_cb_plot_toggled" title="Permalink to this definition">¶</a></dt>
  306. <dd><p>Callback for toggling the &#8220;Plot&#8221; checkbox. Re-plots.</p>
  307. <table class="docutils field-list" frame="void" rules="none">
  308. <col class="field-name" />
  309. <col class="field-body" />
  310. <tbody valign="top">
  311. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>widget</strong> &#8211; Ignored.</td>
  312. </tr>
  313. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  314. </tr>
  315. </tbody>
  316. </table>
  317. </dd></dl>
  318. <dl class="method">
  319. <dt id="FlatCAM.App.on_clear_plots">
  320. <tt class="descname">on_clear_plots</tt><big>(</big><em>widget</em><big>)</big><a class="headerlink" href="#FlatCAM.App.on_clear_plots" title="Permalink to this definition">¶</a></dt>
  321. <dd><p>Callback for toolbar button. Clears all plots.</p>
  322. <table class="docutils field-list" frame="void" rules="none">
  323. <col class="field-name" />
  324. <col class="field-body" />
  325. <tbody valign="top">
  326. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>widget</strong> &#8211; The widget from which this was called.</td>
  327. </tr>
  328. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  329. </tr>
  330. </tbody>
  331. </table>
  332. </dd></dl>
  333. <dl class="method">
  334. <dt id="FlatCAM.App.on_click_over_plot">
  335. <tt class="descname">on_click_over_plot</tt><big>(</big><em>event</em><big>)</big><a class="headerlink" href="#FlatCAM.App.on_click_over_plot" title="Permalink to this definition">¶</a></dt>
  336. <dd><p>Callback for the mouse click event over the plot. This event is generated
  337. by the Matplotlib backend and has been registered in <tt class="docutils literal"><span class="pre">self.__init__()</span></tt>.
  338. For details, see: <a class="reference external" href="http://matplotlib.org/users/event_handling.html">http://matplotlib.org/users/event_handling.html</a></p>
  339. <p>Default actions are:</p>
  340. <ul class="simple">
  341. <li>Copy coordinates to clipboard. Ex.: (65.5473, -13.2679)</li>
  342. </ul>
  343. <table class="docutils field-list" frame="void" rules="none">
  344. <col class="field-name" />
  345. <col class="field-body" />
  346. <tbody valign="top">
  347. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>event</strong> &#8211; Contains information about the event, like which button
  348. was clicked, the pixel coordinates and the axes coordinates.</td>
  349. </tr>
  350. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  351. </tr>
  352. </tbody>
  353. </table>
  354. </dd></dl>
  355. <dl class="method">
  356. <dt id="FlatCAM.App.on_closewindow">
  357. <tt class="descname">on_closewindow</tt><big>(</big><em>param</em><big>)</big><a class="headerlink" href="#FlatCAM.App.on_closewindow" title="Permalink to this definition">¶</a></dt>
  358. <dd><p>Callback for closing the main window.</p>
  359. <table class="docutils field-list" frame="void" rules="none">
  360. <col class="field-name" />
  361. <col class="field-body" />
  362. <tbody valign="top">
  363. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>param</strong> &#8211; Whatever is passed by the event. Ignore.</td>
  364. </tr>
  365. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  366. </tr>
  367. </tbody>
  368. </table>
  369. </dd></dl>
  370. <dl class="method">
  371. <dt id="FlatCAM.App.on_cncjob_exportgcode">
  372. <tt class="descname">on_cncjob_exportgcode</tt><big>(</big><em>widget</em><big>)</big><a class="headerlink" href="#FlatCAM.App.on_cncjob_exportgcode" title="Permalink to this definition">¶</a></dt>
  373. <dd><p>Called from button on CNCjob form to save the G-Code from the object.</p>
  374. <table class="docutils field-list" frame="void" rules="none">
  375. <col class="field-name" />
  376. <col class="field-body" />
  377. <tbody valign="top">
  378. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>widget</strong> &#8211; The widget from which this was called.</td>
  379. </tr>
  380. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  381. </tr>
  382. </tbody>
  383. </table>
  384. </dd></dl>
  385. <dl class="method">
  386. <dt id="FlatCAM.App.on_create_aligndrill">
  387. <tt class="descname">on_create_aligndrill</tt><big>(</big><em>widget</em><big>)</big><a class="headerlink" href="#FlatCAM.App.on_create_aligndrill" title="Permalink to this definition">¶</a></dt>
  388. <dd><p>Creates alignment holes Excellon object. Creates mirror duplicates
  389. of the specified holes around the specified axis.</p>
  390. <table class="docutils field-list" frame="void" rules="none">
  391. <col class="field-name" />
  392. <col class="field-body" />
  393. <tbody valign="top">
  394. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>widget</strong> &#8211; Ignored.</td>
  395. </tr>
  396. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  397. </tr>
  398. </tbody>
  399. </table>
  400. </dd></dl>
  401. <dl class="method">
  402. <dt id="FlatCAM.App.on_create_mirror">
  403. <tt class="descname">on_create_mirror</tt><big>(</big><em>widget</em><big>)</big><a class="headerlink" href="#FlatCAM.App.on_create_mirror" title="Permalink to this definition">¶</a></dt>
  404. <dd><p>Creates a mirror image of an object to be used as a bottom layer.</p>
  405. <table class="docutils field-list" frame="void" rules="none">
  406. <col class="field-name" />
  407. <col class="field-body" />
  408. <tbody valign="top">
  409. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>widget</strong> &#8211; Ignored.</td>
  410. </tr>
  411. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  412. </tr>
  413. </tbody>
  414. </table>
  415. </dd></dl>
  416. <dl class="method">
  417. <dt id="FlatCAM.App.on_delete">
  418. <tt class="descname">on_delete</tt><big>(</big><em>widget</em><big>)</big><a class="headerlink" href="#FlatCAM.App.on_delete" title="Permalink to this definition">¶</a></dt>
  419. <dd><p>Delete the currently selected FlatCAMObj.</p>
  420. <table class="docutils field-list" frame="void" rules="none">
  421. <col class="field-name" />
  422. <col class="field-body" />
  423. <tbody valign="top">
  424. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>widget</strong> &#8211; The widget from which this was called. Ignored.</td>
  425. </tr>
  426. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  427. </tr>
  428. </tbody>
  429. </table>
  430. </dd></dl>
  431. <dl class="method">
  432. <dt id="FlatCAM.App.on_entry_eval_activate">
  433. <tt class="descname">on_entry_eval_activate</tt><big>(</big><em>widget</em><big>)</big><a class="headerlink" href="#FlatCAM.App.on_entry_eval_activate" title="Permalink to this definition">¶</a></dt>
  434. <dd><p>Called when an entry is activated (eg. by hitting enter) if
  435. set to do so. Its text is eval()&#8217;d and set to the returned value.
  436. The current object is updated.</p>
  437. <table class="docutils field-list" frame="void" rules="none">
  438. <col class="field-name" />
  439. <col class="field-body" />
  440. <tbody valign="top">
  441. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>widget</strong> &#8211; </td>
  442. </tr>
  443. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"></td>
  444. </tr>
  445. </tbody>
  446. </table>
  447. </dd></dl>
  448. <dl class="method">
  449. <dt id="FlatCAM.App.on_eval_update">
  450. <tt class="descname">on_eval_update</tt><big>(</big><em>widget</em><big>)</big><a class="headerlink" href="#FlatCAM.App.on_eval_update" title="Permalink to this definition">¶</a></dt>
  451. <dd><p>Modifies the content of a Gtk.Entry by running
  452. eval() on its contents and puting it back as a
  453. string.</p>
  454. <table class="docutils field-list" frame="void" rules="none">
  455. <col class="field-name" />
  456. <col class="field-body" />
  457. <tbody valign="top">
  458. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>widget</strong> &#8211; The widget from which this was called.</td>
  459. </tr>
  460. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  461. </tr>
  462. </tbody>
  463. </table>
  464. </dd></dl>
  465. <dl class="method">
  466. <dt id="FlatCAM.App.on_excellon_tool_choose">
  467. <tt class="descname">on_excellon_tool_choose</tt><big>(</big><em>widget</em><big>)</big><a class="headerlink" href="#FlatCAM.App.on_excellon_tool_choose" title="Permalink to this definition">¶</a></dt>
  468. <dd><p>Callback for button on Excellon form to open up a window for
  469. selecting tools.</p>
  470. <table class="docutils field-list" frame="void" rules="none">
  471. <col class="field-name" />
  472. <col class="field-body" />
  473. <tbody valign="top">
  474. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>widget</strong> &#8211; The widget from which this was called.</td>
  475. </tr>
  476. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  477. </tr>
  478. </tbody>
  479. </table>
  480. </dd></dl>
  481. <dl class="method">
  482. <dt id="FlatCAM.App.on_file_new">
  483. <tt class="descname">on_file_new</tt><big>(</big><em>param</em><big>)</big><a class="headerlink" href="#FlatCAM.App.on_file_new" title="Permalink to this definition">¶</a></dt>
  484. <dd><p>Callback for menu item File-&gt;New. Returns the application to its
  485. startup state. This method is thread-safe.</p>
  486. <table class="docutils field-list" frame="void" rules="none">
  487. <col class="field-name" />
  488. <col class="field-body" />
  489. <tbody valign="top">
  490. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>param</strong> &#8211; Whatever is passed by the event. Ignore.</td>
  491. </tr>
  492. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  493. </tr>
  494. </tbody>
  495. </table>
  496. </dd></dl>
  497. <dl class="method">
  498. <dt id="FlatCAM.App.on_file_openproject">
  499. <tt class="descname">on_file_openproject</tt><big>(</big><em>param</em><big>)</big><a class="headerlink" href="#FlatCAM.App.on_file_openproject" title="Permalink to this definition">¶</a></dt>
  500. <dd><p>Callback for menu item File-&gt;Open Project. Opens a file chooser and calls
  501. <tt class="docutils literal"><span class="pre">self.open_project()</span></tt> after successful selection of a filename.</p>
  502. <table class="docutils field-list" frame="void" rules="none">
  503. <col class="field-name" />
  504. <col class="field-body" />
  505. <tbody valign="top">
  506. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>param</strong> &#8211; Ignored.</td>
  507. </tr>
  508. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  509. </tr>
  510. </tbody>
  511. </table>
  512. </dd></dl>
  513. <dl class="method">
  514. <dt id="FlatCAM.App.on_file_savedefaults">
  515. <tt class="descname">on_file_savedefaults</tt><big>(</big><em>param</em><big>)</big><a class="headerlink" href="#FlatCAM.App.on_file_savedefaults" title="Permalink to this definition">¶</a></dt>
  516. <dd><p>Callback for menu item File-&gt;Save Defaults. Saves application default options
  517. <tt class="docutils literal"><span class="pre">self.defaults</span></tt> to defaults.json.</p>
  518. <table class="docutils field-list" frame="void" rules="none">
  519. <col class="field-name" />
  520. <col class="field-body" />
  521. <tbody valign="top">
  522. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>param</strong> &#8211; Ignored.</td>
  523. </tr>
  524. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  525. </tr>
  526. </tbody>
  527. </table>
  528. </dd></dl>
  529. <dl class="method">
  530. <dt id="FlatCAM.App.on_file_saveproject">
  531. <tt class="descname">on_file_saveproject</tt><big>(</big><em>param</em><big>)</big><a class="headerlink" href="#FlatCAM.App.on_file_saveproject" title="Permalink to this definition">¶</a></dt>
  532. <dd><p>Callback for menu item File-&gt;Save Project. Saves the project to
  533. <tt class="docutils literal"><span class="pre">self.project_filename</span></tt> or calls <tt class="docutils literal"><span class="pre">self.on_file_saveprojectas()</span></tt>
  534. if set to None. The project is saved by calling <tt class="docutils literal"><span class="pre">self.save_project()</span></tt>.</p>
  535. <table class="docutils field-list" frame="void" rules="none">
  536. <col class="field-name" />
  537. <col class="field-body" />
  538. <tbody valign="top">
  539. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>param</strong> &#8211; Ignored.</td>
  540. </tr>
  541. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  542. </tr>
  543. </tbody>
  544. </table>
  545. </dd></dl>
  546. <dl class="method">
  547. <dt id="FlatCAM.App.on_file_saveprojectas">
  548. <tt class="descname">on_file_saveprojectas</tt><big>(</big><em>param</em><big>)</big><a class="headerlink" href="#FlatCAM.App.on_file_saveprojectas" title="Permalink to this definition">¶</a></dt>
  549. <dd><p>Callback for menu item File-&gt;Save Project As... Opens a file
  550. chooser and saves the project to the given file via
  551. <tt class="docutils literal"><span class="pre">self.save_project()</span></tt>.</p>
  552. <table class="docutils field-list" frame="void" rules="none">
  553. <col class="field-name" />
  554. <col class="field-body" />
  555. <tbody valign="top">
  556. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>param</strong> &#8211; Ignored.</td>
  557. </tr>
  558. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  559. </tr>
  560. </tbody>
  561. </table>
  562. </dd></dl>
  563. <dl class="method">
  564. <dt id="FlatCAM.App.on_file_saveprojectcopy">
  565. <tt class="descname">on_file_saveprojectcopy</tt><big>(</big><em>param</em><big>)</big><a class="headerlink" href="#FlatCAM.App.on_file_saveprojectcopy" title="Permalink to this definition">¶</a></dt>
  566. <dd><p>Callback for menu item File-&gt;Save Project Copy... Opens a file
  567. chooser and saves the project to the given file via
  568. <tt class="docutils literal"><span class="pre">self.save_project</span></tt>. It does not update <tt class="docutils literal"><span class="pre">self.project_filename</span></tt> so
  569. subsequent save requests are done on the previous known filename.</p>
  570. <table class="docutils field-list" frame="void" rules="none">
  571. <col class="field-name" />
  572. <col class="field-body" />
  573. <tbody valign="top">
  574. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>param</strong> &#8211; Ignore.</td>
  575. </tr>
  576. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  577. </tr>
  578. </tbody>
  579. </table>
  580. </dd></dl>
  581. <dl class="method">
  582. <dt id="FlatCAM.App.on_fileopenexcellon">
  583. <tt class="descname">on_fileopenexcellon</tt><big>(</big><em>param</em><big>)</big><a class="headerlink" href="#FlatCAM.App.on_fileopenexcellon" title="Permalink to this definition">¶</a></dt>
  584. <dd><p>Callback for menu item File-&gt;Open Excellon. Defines a function that is then passed
  585. to <tt class="docutils literal"><span class="pre">self.file_chooser_action()</span></tt>. It requests the creation of a FlatCAMExcellon object
  586. and updates the progress bar throughout the process.</p>
  587. <table class="docutils field-list" frame="void" rules="none">
  588. <col class="field-name" />
  589. <col class="field-body" />
  590. <tbody valign="top">
  591. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>param</strong> &#8211; Ignore</td>
  592. </tr>
  593. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  594. </tr>
  595. </tbody>
  596. </table>
  597. </dd></dl>
  598. <dl class="method">
  599. <dt id="FlatCAM.App.on_fileopengcode">
  600. <tt class="descname">on_fileopengcode</tt><big>(</big><em>param</em><big>)</big><a class="headerlink" href="#FlatCAM.App.on_fileopengcode" title="Permalink to this definition">¶</a></dt>
  601. <dd><p>Callback for menu item File-&gt;Open G-Code. Defines a function that is then passed
  602. to <tt class="docutils literal"><span class="pre">self.file_chooser_action()</span></tt>. It requests the creation of a FlatCAMCNCjob object
  603. and updates the progress bar throughout the process.</p>
  604. <table class="docutils field-list" frame="void" rules="none">
  605. <col class="field-name" />
  606. <col class="field-body" />
  607. <tbody valign="top">
  608. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>param</strong> &#8211; Ignore</td>
  609. </tr>
  610. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  611. </tr>
  612. </tbody>
  613. </table>
  614. </dd></dl>
  615. <dl class="method">
  616. <dt id="FlatCAM.App.on_fileopengerber">
  617. <tt class="descname">on_fileopengerber</tt><big>(</big><em>param</em><big>)</big><a class="headerlink" href="#FlatCAM.App.on_fileopengerber" title="Permalink to this definition">¶</a></dt>
  618. <dd><p>Callback for menu item File-&gt;Open Gerber. Defines a function that is then passed
  619. to <tt class="docutils literal"><span class="pre">self.file_chooser_action()</span></tt>. It requests the creation of a FlatCAMGerber object
  620. and updates the progress bar throughout the process.</p>
  621. <table class="docutils field-list" frame="void" rules="none">
  622. <col class="field-name" />
  623. <col class="field-body" />
  624. <tbody valign="top">
  625. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>param</strong> &#8211; Ignore</td>
  626. </tr>
  627. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  628. </tr>
  629. </tbody>
  630. </table>
  631. </dd></dl>
  632. <dl class="method">
  633. <dt id="FlatCAM.App.on_filequit">
  634. <tt class="descname">on_filequit</tt><big>(</big><em>param</em><big>)</big><a class="headerlink" href="#FlatCAM.App.on_filequit" title="Permalink to this definition">¶</a></dt>
  635. <dd><p>Callback for menu item File-&gt;Quit. Closes the application.</p>
  636. <table class="docutils field-list" frame="void" rules="none">
  637. <col class="field-name" />
  638. <col class="field-body" />
  639. <tbody valign="top">
  640. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>param</strong> &#8211; Whatever is passed by the event. Ignore.</td>
  641. </tr>
  642. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  643. </tr>
  644. </tbody>
  645. </table>
  646. </dd></dl>
  647. <dl class="method">
  648. <dt id="FlatCAM.App.on_generate_cncjob">
  649. <tt class="descname">on_generate_cncjob</tt><big>(</big><em>widget</em><big>)</big><a class="headerlink" href="#FlatCAM.App.on_generate_cncjob" title="Permalink to this definition">¶</a></dt>
  650. <dd><p>Callback for button on geometry form to generate CNC job.</p>
  651. <table class="docutils field-list" frame="void" rules="none">
  652. <col class="field-name" />
  653. <col class="field-body" />
  654. <tbody valign="top">
  655. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>widget</strong> &#8211; The widget from which this was called.</td>
  656. </tr>
  657. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  658. </tr>
  659. </tbody>
  660. </table>
  661. </dd></dl>
  662. <dl class="method">
  663. <dt id="FlatCAM.App.on_generate_excellon_cncjob">
  664. <tt class="descname">on_generate_excellon_cncjob</tt><big>(</big><em>widget</em><big>)</big><a class="headerlink" href="#FlatCAM.App.on_generate_excellon_cncjob" title="Permalink to this definition">¶</a></dt>
  665. <dd><p>Callback for button active/click on Excellon form to
  666. create a CNC Job for the Excellon file.</p>
  667. <table class="docutils field-list" frame="void" rules="none">
  668. <col class="field-name" />
  669. <col class="field-body" />
  670. <tbody valign="top">
  671. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>widget</strong> &#8211; Ignored</td>
  672. </tr>
  673. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  674. </tr>
  675. </tbody>
  676. </table>
  677. </dd></dl>
  678. <dl class="method">
  679. <dt id="FlatCAM.App.on_generate_gerber_bounding_box">
  680. <tt class="descname">on_generate_gerber_bounding_box</tt><big>(</big><em>widget</em><big>)</big><a class="headerlink" href="#FlatCAM.App.on_generate_gerber_bounding_box" title="Permalink to this definition">¶</a></dt>
  681. <dd><p>Callback for request from the Gerber form to generate a bounding box for the
  682. geometry in the object. Creates a FlatCAMGeometry with the bounding box.
  683. The box can have rounded corners if specified in the form.</p>
  684. <table class="docutils field-list" frame="void" rules="none">
  685. <col class="field-name" />
  686. <col class="field-body" />
  687. <tbody valign="top">
  688. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>widget</strong> &#8211; Ignored.</td>
  689. </tr>
  690. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  691. </tr>
  692. </tbody>
  693. </table>
  694. </dd></dl>
  695. <dl class="method">
  696. <dt id="FlatCAM.App.on_generate_isolation">
  697. <tt class="descname">on_generate_isolation</tt><big>(</big><em>widget</em><big>)</big><a class="headerlink" href="#FlatCAM.App.on_generate_isolation" title="Permalink to this definition">¶</a></dt>
  698. <dd><p>Callback for button on Gerber form to create isolation routing geometry.</p>
  699. <table class="docutils field-list" frame="void" rules="none">
  700. <col class="field-name" />
  701. <col class="field-body" />
  702. <tbody valign="top">
  703. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>widget</strong> &#8211; The widget from which this was called.</td>
  704. </tr>
  705. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  706. </tr>
  707. </tbody>
  708. </table>
  709. </dd></dl>
  710. <dl class="method">
  711. <dt id="FlatCAM.App.on_generate_paintarea">
  712. <tt class="descname">on_generate_paintarea</tt><big>(</big><em>widget</em><big>)</big><a class="headerlink" href="#FlatCAM.App.on_generate_paintarea" title="Permalink to this definition">¶</a></dt>
  713. <dd><p>Callback for button on geometry form.
  714. Subscribes to the &#8220;Click on plot&#8221; event and continues
  715. after the click. Finds the polygon containing
  716. the clicked point and runs clear_poly() on it, resulting
  717. in a new FlatCAMGeometry object.</p>
  718. <table class="docutils field-list" frame="void" rules="none">
  719. <col class="field-name" />
  720. <col class="field-body" />
  721. <tbody valign="top">
  722. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>widget</strong> &#8211; The widget from which this was called.</td>
  723. </tr>
  724. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  725. </tr>
  726. </tbody>
  727. </table>
  728. </dd></dl>
  729. <dl class="method">
  730. <dt id="FlatCAM.App.on_gerber_generate_cutout">
  731. <tt class="descname">on_gerber_generate_cutout</tt><big>(</big><em>widget</em><big>)</big><a class="headerlink" href="#FlatCAM.App.on_gerber_generate_cutout" title="Permalink to this definition">¶</a></dt>
  732. <dd><p>Callback for button on Gerber form to create geometry with lines
  733. for cutting off the board.</p>
  734. <table class="docutils field-list" frame="void" rules="none">
  735. <col class="field-name" />
  736. <col class="field-body" />
  737. <tbody valign="top">
  738. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>widget</strong> &#8211; The widget from which this was called.</td>
  739. </tr>
  740. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  741. </tr>
  742. </tbody>
  743. </table>
  744. </dd></dl>
  745. <dl class="method">
  746. <dt id="FlatCAM.App.on_gerber_generate_noncopper">
  747. <tt class="descname">on_gerber_generate_noncopper</tt><big>(</big><em>widget</em><big>)</big><a class="headerlink" href="#FlatCAM.App.on_gerber_generate_noncopper" title="Permalink to this definition">¶</a></dt>
  748. <dd><p>Callback for button on Gerber form to create a geometry object
  749. with polygons covering the area without copper or negative of the
  750. Gerber.</p>
  751. <table class="docutils field-list" frame="void" rules="none">
  752. <col class="field-name" />
  753. <col class="field-body" />
  754. <tbody valign="top">
  755. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>widget</strong> &#8211; The widget from which this was called.</td>
  756. </tr>
  757. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  758. </tr>
  759. </tbody>
  760. </table>
  761. </dd></dl>
  762. <dl class="method">
  763. <dt id="FlatCAM.App.on_key_over_plot">
  764. <tt class="descname">on_key_over_plot</tt><big>(</big><em>event</em><big>)</big><a class="headerlink" href="#FlatCAM.App.on_key_over_plot" title="Permalink to this definition">¶</a></dt>
  765. <dd><p>Callback for the key pressed event when the canvas is focused. Keyboard
  766. shortcuts are handled here. So far, these are the shortcuts:</p>
  767. <table border="1" class="docutils">
  768. <colgroup>
  769. <col width="19%" />
  770. <col width="81%" />
  771. </colgroup>
  772. <thead valign="bottom">
  773. <tr class="row-odd"><th class="head">Key</th>
  774. <th class="head">Action</th>
  775. </tr>
  776. </thead>
  777. <tbody valign="top">
  778. <tr class="row-even"><td>&#8216;1&#8217;</td>
  779. <td>Zoom-fit. Fits the axes limits to the data.</td>
  780. </tr>
  781. <tr class="row-odd"><td>&#8216;2&#8217;</td>
  782. <td>Zoom-out.</td>
  783. </tr>
  784. <tr class="row-even"><td>&#8216;3&#8217;</td>
  785. <td>Zoom-in.</td>
  786. </tr>
  787. <tr class="row-odd"><td>&#8216;m&#8217;</td>
  788. <td>Toggle on-off the measuring tool.</td>
  789. </tr>
  790. </tbody>
  791. </table>
  792. <table class="docutils field-list" frame="void" rules="none">
  793. <col class="field-name" />
  794. <col class="field-body" />
  795. <tbody valign="top">
  796. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>event</strong> &#8211; Ignored.</td>
  797. </tr>
  798. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  799. </tr>
  800. </tbody>
  801. </table>
  802. </dd></dl>
  803. <dl class="method">
  804. <dt id="FlatCAM.App.on_mouse_move_over_plot">
  805. <tt class="descname">on_mouse_move_over_plot</tt><big>(</big><em>event</em><big>)</big><a class="headerlink" href="#FlatCAM.App.on_mouse_move_over_plot" title="Permalink to this definition">¶</a></dt>
  806. <dd><p>Callback for the mouse motion event over the plot. This event is generated
  807. by the Matplotlib backend and has been registered in <tt class="docutils literal"><span class="pre">self.__init__()</span></tt>.
  808. For details, see: <a class="reference external" href="http://matplotlib.org/users/event_handling.html">http://matplotlib.org/users/event_handling.html</a></p>
  809. <table class="docutils field-list" frame="void" rules="none">
  810. <col class="field-name" />
  811. <col class="field-body" />
  812. <tbody valign="top">
  813. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>event</strong> &#8211; Contains information about the event.</td>
  814. </tr>
  815. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  816. </tr>
  817. </tbody>
  818. </table>
  819. </dd></dl>
  820. <dl class="method">
  821. <dt id="FlatCAM.App.on_offset_object">
  822. <tt class="descname">on_offset_object</tt><big>(</big><em>widget</em><big>)</big><a class="headerlink" href="#FlatCAM.App.on_offset_object" title="Permalink to this definition">¶</a></dt>
  823. <dd><p>Offsets the object&#8217;s geometry by the vector specified
  824. in the form. Re-plots.</p>
  825. <table class="docutils field-list" frame="void" rules="none">
  826. <col class="field-name" />
  827. <col class="field-body" />
  828. <tbody valign="top">
  829. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>widget</strong> &#8211; Ignored</td>
  830. </tr>
  831. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  832. </tr>
  833. </tbody>
  834. </table>
  835. </dd></dl>
  836. <dl class="method">
  837. <dt id="FlatCAM.App.on_options_app2object">
  838. <tt class="descname">on_options_app2object</tt><big>(</big><em>param</em><big>)</big><a class="headerlink" href="#FlatCAM.App.on_options_app2object" title="Permalink to this definition">¶</a></dt>
  839. <dd><p>Callback for Options-&gt;Transfer Options-&gt;App=&gt;Object. Copies options
  840. from application defaults to the currently selected object.</p>
  841. <table class="docutils field-list" frame="void" rules="none">
  842. <col class="field-name" />
  843. <col class="field-body" />
  844. <tbody valign="top">
  845. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>param</strong> &#8211; Ignored.</td>
  846. </tr>
  847. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  848. </tr>
  849. </tbody>
  850. </table>
  851. </dd></dl>
  852. <dl class="method">
  853. <dt id="FlatCAM.App.on_options_app2project">
  854. <tt class="descname">on_options_app2project</tt><big>(</big><em>param</em><big>)</big><a class="headerlink" href="#FlatCAM.App.on_options_app2project" title="Permalink to this definition">¶</a></dt>
  855. <dd><p>Callback for Options-&gt;Transfer Options-&gt;App=&gt;Project. Copies options
  856. from application defaults to project defaults.</p>
  857. <table class="docutils field-list" frame="void" rules="none">
  858. <col class="field-name" />
  859. <col class="field-body" />
  860. <tbody valign="top">
  861. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>param</strong> &#8211; Ignored.</td>
  862. </tr>
  863. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  864. </tr>
  865. </tbody>
  866. </table>
  867. </dd></dl>
  868. <dl class="method">
  869. <dt id="FlatCAM.App.on_options_combo_change">
  870. <tt class="descname">on_options_combo_change</tt><big>(</big><em>widget</em><big>)</big><a class="headerlink" href="#FlatCAM.App.on_options_combo_change" title="Permalink to this definition">¶</a></dt>
  871. <dd><p>Called when the combo box to choose between application defaults and
  872. project option changes value. The corresponding variables are
  873. copied to the UI.</p>
  874. <table class="docutils field-list" frame="void" rules="none">
  875. <col class="field-name" />
  876. <col class="field-body" />
  877. <tbody valign="top">
  878. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>widget</strong> &#8211; The widget from which this was called. Ignore.</td>
  879. </tr>
  880. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  881. </tr>
  882. </tbody>
  883. </table>
  884. </dd></dl>
  885. <dl class="method">
  886. <dt id="FlatCAM.App.on_options_object2app">
  887. <tt class="descname">on_options_object2app</tt><big>(</big><em>param</em><big>)</big><a class="headerlink" href="#FlatCAM.App.on_options_object2app" title="Permalink to this definition">¶</a></dt>
  888. <dd><p>Callback for Options-&gt;Transfer Options-&gt;Object=&gt;App. Copies options
  889. from the currently selected object to application defaults.</p>
  890. <table class="docutils field-list" frame="void" rules="none">
  891. <col class="field-name" />
  892. <col class="field-body" />
  893. <tbody valign="top">
  894. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>param</strong> &#8211; Ignored.</td>
  895. </tr>
  896. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  897. </tr>
  898. </tbody>
  899. </table>
  900. </dd></dl>
  901. <dl class="method">
  902. <dt id="FlatCAM.App.on_options_object2project">
  903. <tt class="descname">on_options_object2project</tt><big>(</big><em>param</em><big>)</big><a class="headerlink" href="#FlatCAM.App.on_options_object2project" title="Permalink to this definition">¶</a></dt>
  904. <dd><p>Callback for Options-&gt;Transfer Options-&gt;Object=&gt;Project. Copies options
  905. from the currently selected object to project defaults.</p>
  906. <table class="docutils field-list" frame="void" rules="none">
  907. <col class="field-name" />
  908. <col class="field-body" />
  909. <tbody valign="top">
  910. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>param</strong> &#8211; Ignored.</td>
  911. </tr>
  912. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  913. </tr>
  914. </tbody>
  915. </table>
  916. </dd></dl>
  917. <dl class="method">
  918. <dt id="FlatCAM.App.on_options_project2app">
  919. <tt class="descname">on_options_project2app</tt><big>(</big><em>param</em><big>)</big><a class="headerlink" href="#FlatCAM.App.on_options_project2app" title="Permalink to this definition">¶</a></dt>
  920. <dd><p>Callback for Options-&gt;Transfer Options-&gt;Project=&gt;App. Copies options
  921. from project defaults to application defaults.</p>
  922. <table class="docutils field-list" frame="void" rules="none">
  923. <col class="field-name" />
  924. <col class="field-body" />
  925. <tbody valign="top">
  926. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>param</strong> &#8211; Ignored.</td>
  927. </tr>
  928. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  929. </tr>
  930. </tbody>
  931. </table>
  932. </dd></dl>
  933. <dl class="method">
  934. <dt id="FlatCAM.App.on_options_project2object">
  935. <tt class="descname">on_options_project2object</tt><big>(</big><em>param</em><big>)</big><a class="headerlink" href="#FlatCAM.App.on_options_project2object" title="Permalink to this definition">¶</a></dt>
  936. <dd><p>Callback for Options-&gt;Transfer Options-&gt;Project=&gt;Object. Copies options
  937. from project defaults to the currently selected object.</p>
  938. <table class="docutils field-list" frame="void" rules="none">
  939. <col class="field-name" />
  940. <col class="field-body" />
  941. <tbody valign="top">
  942. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>param</strong> &#8211; Ignored.</td>
  943. </tr>
  944. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  945. </tr>
  946. </tbody>
  947. </table>
  948. </dd></dl>
  949. <dl class="method">
  950. <dt id="FlatCAM.App.on_options_update">
  951. <tt class="descname">on_options_update</tt><big>(</big><em>widget</em><big>)</big><a class="headerlink" href="#FlatCAM.App.on_options_update" title="Permalink to this definition">¶</a></dt>
  952. <dd><p>Called whenever a value in the options/defaults form changes.
  953. All values are updated. Can be inhibited by setting <tt class="docutils literal"><span class="pre">self.options_update_ignore</span> <span class="pre">=</span> <span class="pre">True</span></tt>,
  954. which may be necessary when updating the UI from code and not by the user.</p>
  955. <table class="docutils field-list" frame="void" rules="none">
  956. <col class="field-name" />
  957. <col class="field-body" />
  958. <tbody valign="top">
  959. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>widget</strong> &#8211; The widget from which this was called. Ignore.</td>
  960. </tr>
  961. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  962. </tr>
  963. </tbody>
  964. </table>
  965. </dd></dl>
  966. <dl class="method">
  967. <dt id="FlatCAM.App.on_row_activated">
  968. <tt class="descname">on_row_activated</tt><big>(</big><em>widget</em>, <em>path</em>, <em>col</em><big>)</big><a class="headerlink" href="#FlatCAM.App.on_row_activated" title="Permalink to this definition">¶</a></dt>
  969. <dd><p>Callback for selection activation (Enter or double-click) on the Project list.
  970. Switches the notebook page to the object properties form. Calls
  971. <tt class="docutils literal"><span class="pre">self.notebook.set_current_page(1)</span></tt>.</p>
  972. <table class="docutils field-list" frame="void" rules="none">
  973. <col class="field-name" />
  974. <col class="field-body" />
  975. <tbody valign="top">
  976. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  977. <li><strong>widget</strong> &#8211; Ignored.</li>
  978. <li><strong>path</strong> &#8211; Ignored.</li>
  979. <li><strong>col</strong> &#8211; Ignored.</li>
  980. </ul>
  981. </td>
  982. </tr>
  983. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">None</p>
  984. </td>
  985. </tr>
  986. </tbody>
  987. </table>
  988. </dd></dl>
  989. <dl class="method">
  990. <dt id="FlatCAM.App.on_scale_object">
  991. <tt class="descname">on_scale_object</tt><big>(</big><em>widget</em><big>)</big><a class="headerlink" href="#FlatCAM.App.on_scale_object" title="Permalink to this definition">¶</a></dt>
  992. <dd><p>Callback for request to change an objects geometry scale. The object
  993. is re-scaled and replotted.</p>
  994. <table class="docutils field-list" frame="void" rules="none">
  995. <col class="field-name" />
  996. <col class="field-body" />
  997. <tbody valign="top">
  998. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>widget</strong> &#8211; Ignored.</td>
  999. </tr>
  1000. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  1001. </tr>
  1002. </tbody>
  1003. </table>
  1004. </dd></dl>
  1005. <dl class="method">
  1006. <dt id="FlatCAM.App.on_toggle_pointbox">
  1007. <tt class="descname">on_toggle_pointbox</tt><big>(</big><em>widget</em><big>)</big><a class="headerlink" href="#FlatCAM.App.on_toggle_pointbox" title="Permalink to this definition">¶</a></dt>
  1008. <dd><p>Callback for radio selection change between point and box in the
  1009. Double-sided PCB tool. Updates the UI accordingly.</p>
  1010. <table class="docutils field-list" frame="void" rules="none">
  1011. <col class="field-name" />
  1012. <col class="field-body" />
  1013. <tbody valign="top">
  1014. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>widget</strong> &#8211; Ignored.</td>
  1015. </tr>
  1016. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  1017. </tr>
  1018. </tbody>
  1019. </table>
  1020. </dd></dl>
  1021. <dl class="method">
  1022. <dt id="FlatCAM.App.on_toggle_units">
  1023. <tt class="descname">on_toggle_units</tt><big>(</big><em>widget</em><big>)</big><a class="headerlink" href="#FlatCAM.App.on_toggle_units" title="Permalink to this definition">¶</a></dt>
  1024. <dd><p>Callback for the Units radio-button change in the Options tab.
  1025. Changes the application&#8217;s default units or the current project&#8217;s units.
  1026. If changing the project&#8217;s units, the change propagates to all of
  1027. the objects in the project.</p>
  1028. <table class="docutils field-list" frame="void" rules="none">
  1029. <col class="field-name" />
  1030. <col class="field-body" />
  1031. <tbody valign="top">
  1032. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>widget</strong> &#8211; Ignored.</td>
  1033. </tr>
  1034. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  1035. </tr>
  1036. </tbody>
  1037. </table>
  1038. </dd></dl>
  1039. <dl class="method">
  1040. <dt id="FlatCAM.App.on_toolbar_replot">
  1041. <tt class="descname">on_toolbar_replot</tt><big>(</big><em>widget</em><big>)</big><a class="headerlink" href="#FlatCAM.App.on_toolbar_replot" title="Permalink to this definition">¶</a></dt>
  1042. <dd><p>Callback for toolbar button. Re-plots all objects.</p>
  1043. <table class="docutils field-list" frame="void" rules="none">
  1044. <col class="field-name" />
  1045. <col class="field-body" />
  1046. <tbody valign="top">
  1047. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>widget</strong> &#8211; The widget from which this was called.</td>
  1048. </tr>
  1049. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  1050. </tr>
  1051. </tbody>
  1052. </table>
  1053. </dd></dl>
  1054. <dl class="method">
  1055. <dt id="FlatCAM.App.on_tools_doublesided">
  1056. <tt class="descname">on_tools_doublesided</tt><big>(</big><em>param</em><big>)</big><a class="headerlink" href="#FlatCAM.App.on_tools_doublesided" title="Permalink to this definition">¶</a></dt>
  1057. <dd><p>Callback for menu item Tools-&gt;Double Sided PCB Tool. Launches the
  1058. tool placing its UI in the &#8220;Tool&#8221; tab in the notebook.</p>
  1059. <table class="docutils field-list" frame="void" rules="none">
  1060. <col class="field-name" />
  1061. <col class="field-body" />
  1062. <tbody valign="top">
  1063. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>param</strong> &#8211; Ignored.</td>
  1064. </tr>
  1065. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  1066. </tr>
  1067. </tbody>
  1068. </table>
  1069. </dd></dl>
  1070. <dl class="method">
  1071. <dt id="FlatCAM.App.on_update_plot">
  1072. <tt class="descname">on_update_plot</tt><big>(</big><em>widget</em><big>)</big><a class="headerlink" href="#FlatCAM.App.on_update_plot" title="Permalink to this definition">¶</a></dt>
  1073. <dd><p>Callback for button on form for all kinds of objects.
  1074. Re-plots the current object only.</p>
  1075. <table class="docutils field-list" frame="void" rules="none">
  1076. <col class="field-name" />
  1077. <col class="field-body" />
  1078. <tbody valign="top">
  1079. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>widget</strong> &#8211; The widget from which this was called. Ignored.</td>
  1080. </tr>
  1081. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  1082. </tr>
  1083. </tbody>
  1084. </table>
  1085. </dd></dl>
  1086. <dl class="method">
  1087. <dt id="FlatCAM.App.on_zoom_fit">
  1088. <tt class="descname">on_zoom_fit</tt><big>(</big><em>event</em><big>)</big><a class="headerlink" href="#FlatCAM.App.on_zoom_fit" title="Permalink to this definition">¶</a></dt>
  1089. <dd><p>Callback for zoom-out request. This can be either from the corresponding
  1090. toolbar button or the &#8216;1&#8217; key when the canvas is focused. Calls <tt class="docutils literal"><span class="pre">self.adjust_axes()</span></tt>
  1091. with axes limits from the geometry bounds of all objects.</p>
  1092. <table class="docutils field-list" frame="void" rules="none">
  1093. <col class="field-name" />
  1094. <col class="field-body" />
  1095. <tbody valign="top">
  1096. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>event</strong> &#8211; Ignored.</td>
  1097. </tr>
  1098. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  1099. </tr>
  1100. </tbody>
  1101. </table>
  1102. </dd></dl>
  1103. <dl class="method">
  1104. <dt id="FlatCAM.App.on_zoom_in">
  1105. <tt class="descname">on_zoom_in</tt><big>(</big><em>event</em><big>)</big><a class="headerlink" href="#FlatCAM.App.on_zoom_in" title="Permalink to this definition">¶</a></dt>
  1106. <dd><p>Callback for zoom-in request. This can be either from the corresponding
  1107. toolbar button or the &#8216;3&#8217; key when the canvas is focused. Calls <tt class="docutils literal"><span class="pre">self.zoom()</span></tt>.</p>
  1108. <table class="docutils field-list" frame="void" rules="none">
  1109. <col class="field-name" />
  1110. <col class="field-body" />
  1111. <tbody valign="top">
  1112. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>event</strong> &#8211; Ignored.</td>
  1113. </tr>
  1114. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  1115. </tr>
  1116. </tbody>
  1117. </table>
  1118. </dd></dl>
  1119. <dl class="method">
  1120. <dt id="FlatCAM.App.on_zoom_out">
  1121. <tt class="descname">on_zoom_out</tt><big>(</big><em>event</em><big>)</big><a class="headerlink" href="#FlatCAM.App.on_zoom_out" title="Permalink to this definition">¶</a></dt>
  1122. <dd><p>Callback for zoom-out request. This can be either from the corresponding
  1123. toolbar button or the &#8216;2&#8217; key when the canvas is focused. Calls <tt class="docutils literal"><span class="pre">self.zoom()</span></tt>.</p>
  1124. <table class="docutils field-list" frame="void" rules="none">
  1125. <col class="field-name" />
  1126. <col class="field-body" />
  1127. <tbody valign="top">
  1128. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>event</strong> &#8211; Ignored.</td>
  1129. </tr>
  1130. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  1131. </tr>
  1132. </tbody>
  1133. </table>
  1134. </dd></dl>
  1135. <dl class="method">
  1136. <dt id="FlatCAM.App.open_project">
  1137. <tt class="descname">open_project</tt><big>(</big><em>filename</em><big>)</big><a class="headerlink" href="#FlatCAM.App.open_project" title="Permalink to this definition">¶</a></dt>
  1138. <dd><p>Loads a project from the specified file.</p>
  1139. <table class="docutils field-list" frame="void" rules="none">
  1140. <col class="field-name" />
  1141. <col class="field-body" />
  1142. <tbody valign="top">
  1143. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> (<em>str</em>) &#8211; Name of the file from which to load.</td>
  1144. </tr>
  1145. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  1146. </tr>
  1147. </tbody>
  1148. </table>
  1149. </dd></dl>
  1150. <dl class="method">
  1151. <dt id="FlatCAM.App.options2form">
  1152. <tt class="descname">options2form</tt><big>(</big><big>)</big><a class="headerlink" href="#FlatCAM.App.options2form" title="Permalink to this definition">¶</a></dt>
  1153. <dd><p>Sets the &#8216;Project Options&#8217; or &#8216;Application Defaults&#8217; form with values from
  1154. <tt class="docutils literal"><span class="pre">self.options</span></tt> or <tt class="docutils literal"><span class="pre">self.defaults</span></tt>.</p>
  1155. <table class="docutils field-list" frame="void" rules="none">
  1156. <col class="field-name" />
  1157. <col class="field-body" />
  1158. <tbody valign="top">
  1159. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  1160. </tr>
  1161. <tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">None</td>
  1162. </tr>
  1163. </tbody>
  1164. </table>
  1165. </dd></dl>
  1166. <dl class="method">
  1167. <dt id="FlatCAM.App.plot_all">
  1168. <tt class="descname">plot_all</tt><big>(</big><big>)</big><a class="headerlink" href="#FlatCAM.App.plot_all" title="Permalink to this definition">¶</a></dt>
  1169. <dd><p>Re-generates all plots from all objects.</p>
  1170. <table class="docutils field-list" frame="void" rules="none">
  1171. <col class="field-name" />
  1172. <col class="field-body" />
  1173. <tbody valign="top">
  1174. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  1175. </tr>
  1176. </tbody>
  1177. </table>
  1178. </dd></dl>
  1179. <dl class="method">
  1180. <dt id="FlatCAM.App.populate_objects_combo">
  1181. <tt class="descname">populate_objects_combo</tt><big>(</big><em>combo</em><big>)</big><a class="headerlink" href="#FlatCAM.App.populate_objects_combo" title="Permalink to this definition">¶</a></dt>
  1182. <dd><p>Populates a Gtk.Comboboxtext with the list of the object in the project.</p>
  1183. <table class="docutils field-list" frame="void" rules="none">
  1184. <col class="field-name" />
  1185. <col class="field-body" />
  1186. <tbody valign="top">
  1187. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>combo</strong> (<em>str or Gtk.ComboBoxText</em>) &#8211; Name or instance of the comboboxtext.</td>
  1188. </tr>
  1189. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  1190. </tr>
  1191. </tbody>
  1192. </table>
  1193. </dd></dl>
  1194. <dl class="method">
  1195. <dt id="FlatCAM.App.read_form">
  1196. <tt class="descname">read_form</tt><big>(</big><big>)</big><a class="headerlink" href="#FlatCAM.App.read_form" title="Permalink to this definition">¶</a></dt>
  1197. <dd><p>Reads the options form into self.defaults/self.options.</p>
  1198. <table class="docutils field-list" frame="void" rules="none">
  1199. <col class="field-name" />
  1200. <col class="field-body" />
  1201. <tbody valign="top">
  1202. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  1203. </tr>
  1204. <tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">None</td>
  1205. </tr>
  1206. </tbody>
  1207. </table>
  1208. </dd></dl>
  1209. <dl class="method">
  1210. <dt id="FlatCAM.App.read_form_item">
  1211. <tt class="descname">read_form_item</tt><big>(</big><em>name</em>, <em>dest</em><big>)</big><a class="headerlink" href="#FlatCAM.App.read_form_item" title="Permalink to this definition">¶</a></dt>
  1212. <dd><p>Reads the value of a form item in the defaults/options form and
  1213. saves it to the corresponding dictionary.</p>
  1214. <table class="docutils field-list" frame="void" rules="none">
  1215. <col class="field-name" />
  1216. <col class="field-body" />
  1217. <tbody valign="top">
  1218. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  1219. <li><strong>name</strong> (<em>str</em>) &#8211; Name of the form item. A key in <tt class="docutils literal"><span class="pre">self.defaults</span></tt> or
  1220. <tt class="docutils literal"><span class="pre">self.options</span></tt>.</li>
  1221. <li><strong>dest</strong> (<em>dict</em>) &#8211; Dictionary to which to save the value.</li>
  1222. </ul>
  1223. </td>
  1224. </tr>
  1225. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">None</p>
  1226. </td>
  1227. </tr>
  1228. </tbody>
  1229. </table>
  1230. </dd></dl>
  1231. <dl class="method">
  1232. <dt id="FlatCAM.App.save_project">
  1233. <tt class="descname">save_project</tt><big>(</big><em>filename</em><big>)</big><a class="headerlink" href="#FlatCAM.App.save_project" title="Permalink to this definition">¶</a></dt>
  1234. <dd><p>Saves the current project to the specified file.</p>
  1235. <table class="docutils field-list" frame="void" rules="none">
  1236. <col class="field-name" />
  1237. <col class="field-body" />
  1238. <tbody valign="top">
  1239. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> (<em>str</em>) &#8211; Name of the file in which to save.</td>
  1240. </tr>
  1241. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  1242. </tr>
  1243. </tbody>
  1244. </table>
  1245. </dd></dl>
  1246. <dl class="method">
  1247. <dt id="FlatCAM.App.set_form_item">
  1248. <tt class="descname">set_form_item</tt><big>(</big><em>name</em>, <em>value</em><big>)</big><a class="headerlink" href="#FlatCAM.App.set_form_item" title="Permalink to this definition">¶</a></dt>
  1249. <dd><p>Sets a form item &#8216;name&#8217; in the GUI with the given &#8216;value&#8217;. The syntax of
  1250. form names in the GUI is &lt;kind&gt;_app_&lt;name&gt;, where kind is one of: rb (radio button),
  1251. cb (check button), entry_eval or entry_text (entry), combo (combo box). name is
  1252. whatever name it&#8217;s been given. For self.defaults, name is a key in the dictionary.</p>
  1253. <table class="docutils field-list" frame="void" rules="none">
  1254. <col class="field-name" />
  1255. <col class="field-body" />
  1256. <tbody valign="top">
  1257. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  1258. <li><strong>name</strong> (<em>str</em>) &#8211; Name of the form field.</li>
  1259. <li><strong>value</strong> (<em>Depends on field kind.</em>) &#8211; The value to set the form field to.</li>
  1260. </ul>
  1261. </td>
  1262. </tr>
  1263. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">None</p>
  1264. </td>
  1265. </tr>
  1266. </tbody>
  1267. </table>
  1268. </dd></dl>
  1269. <dl class="method">
  1270. <dt id="FlatCAM.App.set_progress_bar">
  1271. <tt class="descname">set_progress_bar</tt><big>(</big><em>percentage</em>, <em>text=''</em><big>)</big><a class="headerlink" href="#FlatCAM.App.set_progress_bar" title="Permalink to this definition">¶</a></dt>
  1272. <dd><p>Sets the application&#8217;s progress bar to a given frac_digits and text.</p>
  1273. <table class="docutils field-list" frame="void" rules="none">
  1274. <col class="field-name" />
  1275. <col class="field-body" />
  1276. <tbody valign="top">
  1277. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  1278. <li><strong>percentage</strong> (<em>float</em>) &#8211; The frac_digits (0.0-1.0) of the progress.</li>
  1279. <li><strong>text</strong> (<em>str</em>) &#8211; Text to display on the progress bar.</li>
  1280. </ul>
  1281. </td>
  1282. </tr>
  1283. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">None</p>
  1284. </td>
  1285. </tr>
  1286. </tbody>
  1287. </table>
  1288. </dd></dl>
  1289. <dl class="method">
  1290. <dt id="FlatCAM.App.setup_component_editor">
  1291. <tt class="descname">setup_component_editor</tt><big>(</big><big>)</big><a class="headerlink" href="#FlatCAM.App.setup_component_editor" title="Permalink to this definition">¶</a></dt>
  1292. <dd><p>Initial configuration of the component editor. Creates
  1293. a page titled &#8220;Selection&#8221; on the notebook on the left
  1294. side of the main window.</p>
  1295. <table class="docutils field-list" frame="void" rules="none">
  1296. <col class="field-name" />
  1297. <col class="field-body" />
  1298. <tbody valign="top">
  1299. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  1300. </tr>
  1301. </tbody>
  1302. </table>
  1303. </dd></dl>
  1304. <dl class="method">
  1305. <dt id="FlatCAM.App.setup_obj_classes">
  1306. <tt class="descname">setup_obj_classes</tt><big>(</big><big>)</big><a class="headerlink" href="#FlatCAM.App.setup_obj_classes" title="Permalink to this definition">¶</a></dt>
  1307. <dd><p>Sets up application specifics on the FlatCAMObj class.</p>
  1308. <table class="docutils field-list" frame="void" rules="none">
  1309. <col class="field-name" />
  1310. <col class="field-body" />
  1311. <tbody valign="top">
  1312. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  1313. </tr>
  1314. </tbody>
  1315. </table>
  1316. </dd></dl>
  1317. <dl class="method">
  1318. <dt id="FlatCAM.App.version_check">
  1319. <tt class="descname">version_check</tt><big>(</big><em>*args</em><big>)</big><a class="headerlink" href="#FlatCAM.App.version_check" title="Permalink to this definition">¶</a></dt>
  1320. <dd><p>Checks for the latest version of the program. Alerts the
  1321. user if theirs is outdated. This method is meant to be run
  1322. in a saeparate thread.</p>
  1323. <table class="docutils field-list" frame="void" rules="none">
  1324. <col class="field-name" />
  1325. <col class="field-body" />
  1326. <tbody valign="top">
  1327. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  1328. </tr>
  1329. </tbody>
  1330. </table>
  1331. </dd></dl>
  1332. </dd></dl>
  1333. </div>
  1334. <div class="section" id="plotcanvas">
  1335. <h2>PlotCanvas<a class="headerlink" href="#plotcanvas" title="Permalink to this headline">¶</a></h2>
  1336. <dl class="class">
  1337. <dt id="FlatCAM.PlotCanvas">
  1338. <em class="property">class </em><tt class="descclassname">FlatCAM.</tt><tt class="descname">PlotCanvas</tt><big>(</big><em>container</em><big>)</big><a class="headerlink" href="#FlatCAM.PlotCanvas" title="Permalink to this definition">¶</a></dt>
  1339. <dd><p>Class handling the plotting area in the application.</p>
  1340. <dl class="method">
  1341. <dt id="FlatCAM.PlotCanvas.adjust_axes">
  1342. <tt class="descname">adjust_axes</tt><big>(</big><em>xmin</em>, <em>ymin</em>, <em>xmax</em>, <em>ymax</em><big>)</big><a class="headerlink" href="#FlatCAM.PlotCanvas.adjust_axes" title="Permalink to this definition">¶</a></dt>
  1343. <dd><p>Adjusts all axes while maintaining the use of the whole canvas
  1344. and an aspect ratio to 1:1 between x and y axes. The parameters are an original
  1345. request that will be modified to fit these restrictions.</p>
  1346. <table class="docutils field-list" frame="void" rules="none">
  1347. <col class="field-name" />
  1348. <col class="field-body" />
  1349. <tbody valign="top">
  1350. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  1351. <li><strong>xmin</strong> (<em>float</em>) &#8211; Requested minimum value for the X axis.</li>
  1352. <li><strong>ymin</strong> (<em>float</em>) &#8211; Requested minimum value for the Y axis.</li>
  1353. <li><strong>xmax</strong> (<em>float</em>) &#8211; Requested maximum value for the X axis.</li>
  1354. <li><strong>ymax</strong> (<em>float</em>) &#8211; Requested maximum value for the Y axis.</li>
  1355. </ul>
  1356. </td>
  1357. </tr>
  1358. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">None</p>
  1359. </td>
  1360. </tr>
  1361. </tbody>
  1362. </table>
  1363. </dd></dl>
  1364. <dl class="method">
  1365. <dt id="FlatCAM.PlotCanvas.auto_adjust_axes">
  1366. <tt class="descname">auto_adjust_axes</tt><big>(</big><em>*args</em><big>)</big><a class="headerlink" href="#FlatCAM.PlotCanvas.auto_adjust_axes" title="Permalink to this definition">¶</a></dt>
  1367. <dd><p>Calls <tt class="docutils literal"><span class="pre">adjust_axes()</span></tt> using the extents of the base axes.</p>
  1368. <p>:rtype : None
  1369. :return: None</p>
  1370. </dd></dl>
  1371. <dl class="method">
  1372. <dt id="FlatCAM.PlotCanvas.clear">
  1373. <tt class="descname">clear</tt><big>(</big><big>)</big><a class="headerlink" href="#FlatCAM.PlotCanvas.clear" title="Permalink to this definition">¶</a></dt>
  1374. <dd><p>Clears axes and figure.</p>
  1375. <table class="docutils field-list" frame="void" rules="none">
  1376. <col class="field-name" />
  1377. <col class="field-body" />
  1378. <tbody valign="top">
  1379. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  1380. </tr>
  1381. </tbody>
  1382. </table>
  1383. </dd></dl>
  1384. <dl class="method">
  1385. <dt id="FlatCAM.PlotCanvas.connect">
  1386. <tt class="descname">connect</tt><big>(</big><em>event_name</em>, <em>callback</em><big>)</big><a class="headerlink" href="#FlatCAM.PlotCanvas.connect" title="Permalink to this definition">¶</a></dt>
  1387. <dd><p>Attach an event handler to the canvas through the native GTK interface.</p>
  1388. <table class="docutils field-list" frame="void" rules="none">
  1389. <col class="field-name" />
  1390. <col class="field-body" />
  1391. <tbody valign="top">
  1392. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  1393. <li><strong>event_name</strong> (<em>str</em>) &#8211; Name of the event</li>
  1394. <li><strong>callback</strong> (<em>function</em>) &#8211; Function to call</li>
  1395. </ul>
  1396. </td>
  1397. </tr>
  1398. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">Nothing</p>
  1399. </td>
  1400. </tr>
  1401. </tbody>
  1402. </table>
  1403. </dd></dl>
  1404. <dl class="method">
  1405. <dt id="FlatCAM.PlotCanvas.mpl_connect">
  1406. <tt class="descname">mpl_connect</tt><big>(</big><em>event_name</em>, <em>callback</em><big>)</big><a class="headerlink" href="#FlatCAM.PlotCanvas.mpl_connect" title="Permalink to this definition">¶</a></dt>
  1407. <dd><p>Attach an event handler to the canvas through the Matplotlib interface.</p>
  1408. <table class="docutils field-list" frame="void" rules="none">
  1409. <col class="field-name" />
  1410. <col class="field-body" />
  1411. <tbody valign="top">
  1412. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  1413. <li><strong>event_name</strong> (<em>str</em>) &#8211; Name of the event</li>
  1414. <li><strong>callback</strong> (<em>func</em>) &#8211; Function to call</li>
  1415. </ul>
  1416. </td>
  1417. </tr>
  1418. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Connection id</p>
  1419. </td>
  1420. </tr>
  1421. <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">int</p>
  1422. </td>
  1423. </tr>
  1424. </tbody>
  1425. </table>
  1426. </dd></dl>
  1427. <dl class="method">
  1428. <dt id="FlatCAM.PlotCanvas.mpl_disconnect">
  1429. <tt class="descname">mpl_disconnect</tt><big>(</big><em>cid</em><big>)</big><a class="headerlink" href="#FlatCAM.PlotCanvas.mpl_disconnect" title="Permalink to this definition">¶</a></dt>
  1430. <dd><p>Disconnect callback with the give id.
  1431. :param cid: Callback id.
  1432. :return: None</p>
  1433. </dd></dl>
  1434. <dl class="method">
  1435. <dt id="FlatCAM.PlotCanvas.new_axes">
  1436. <tt class="descname">new_axes</tt><big>(</big><em>name</em><big>)</big><a class="headerlink" href="#FlatCAM.PlotCanvas.new_axes" title="Permalink to this definition">¶</a></dt>
  1437. <dd><p>Creates and returns an Axes object attached to this object&#8217;s Figure.</p>
  1438. <table class="docutils field-list" frame="void" rules="none">
  1439. <col class="field-name" />
  1440. <col class="field-body" />
  1441. <tbody valign="top">
  1442. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> &#8211; Unique label for the axes.</td>
  1443. </tr>
  1444. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Axes attached to the figure.</td>
  1445. </tr>
  1446. <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">Axes</td>
  1447. </tr>
  1448. </tbody>
  1449. </table>
  1450. </dd></dl>
  1451. <dl class="method">
  1452. <dt id="FlatCAM.PlotCanvas.on_key_down">
  1453. <tt class="descname">on_key_down</tt><big>(</big><em>event</em><big>)</big><a class="headerlink" href="#FlatCAM.PlotCanvas.on_key_down" title="Permalink to this definition">¶</a></dt>
  1454. <dd><table class="docutils field-list" frame="void" rules="none">
  1455. <col class="field-name" />
  1456. <col class="field-body" />
  1457. <tbody valign="top">
  1458. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>event</strong> &#8211; </td>
  1459. </tr>
  1460. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"></td>
  1461. </tr>
  1462. </tbody>
  1463. </table>
  1464. </dd></dl>
  1465. <dl class="method">
  1466. <dt id="FlatCAM.PlotCanvas.on_key_up">
  1467. <tt class="descname">on_key_up</tt><big>(</big><em>event</em><big>)</big><a class="headerlink" href="#FlatCAM.PlotCanvas.on_key_up" title="Permalink to this definition">¶</a></dt>
  1468. <dd><table class="docutils field-list" frame="void" rules="none">
  1469. <col class="field-name" />
  1470. <col class="field-body" />
  1471. <tbody valign="top">
  1472. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>event</strong> &#8211; </td>
  1473. </tr>
  1474. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"></td>
  1475. </tr>
  1476. </tbody>
  1477. </table>
  1478. </dd></dl>
  1479. <dl class="method">
  1480. <dt id="FlatCAM.PlotCanvas.on_mouse_move">
  1481. <tt class="descname">on_mouse_move</tt><big>(</big><em>event</em><big>)</big><a class="headerlink" href="#FlatCAM.PlotCanvas.on_mouse_move" title="Permalink to this definition">¶</a></dt>
  1482. <dd><p>Mouse movement event hadler.</p>
  1483. <table class="docutils field-list" frame="void" rules="none">
  1484. <col class="field-name" />
  1485. <col class="field-body" />
  1486. <tbody valign="top">
  1487. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>event</strong> &#8211; Contains information about the event.</td>
  1488. </tr>
  1489. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  1490. </tr>
  1491. </tbody>
  1492. </table>
  1493. </dd></dl>
  1494. <dl class="method">
  1495. <dt id="FlatCAM.PlotCanvas.on_scroll">
  1496. <tt class="descname">on_scroll</tt><big>(</big><em>canvas</em>, <em>event</em><big>)</big><a class="headerlink" href="#FlatCAM.PlotCanvas.on_scroll" title="Permalink to this definition">¶</a></dt>
  1497. <dd><p>Scroll event handler.</p>
  1498. <table class="docutils field-list" frame="void" rules="none">
  1499. <col class="field-name" />
  1500. <col class="field-body" />
  1501. <tbody valign="top">
  1502. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  1503. <li><strong>canvas</strong> &#8211; The widget generating the event. Ignored.</li>
  1504. <li><strong>event</strong> &#8211; Event object containing the event information.</li>
  1505. </ul>
  1506. </td>
  1507. </tr>
  1508. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">None</p>
  1509. </td>
  1510. </tr>
  1511. </tbody>
  1512. </table>
  1513. </dd></dl>
  1514. <dl class="method">
  1515. <dt id="FlatCAM.PlotCanvas.zoom">
  1516. <tt class="descname">zoom</tt><big>(</big><em>factor</em>, <em>center=None</em><big>)</big><a class="headerlink" href="#FlatCAM.PlotCanvas.zoom" title="Permalink to this definition">¶</a></dt>
  1517. <dd><p>Zooms the plot by factor around a given
  1518. center point. Takes care of re-drawing.</p>
  1519. <table class="docutils field-list" frame="void" rules="none">
  1520. <col class="field-name" />
  1521. <col class="field-body" />
  1522. <tbody valign="top">
  1523. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  1524. <li><strong>factor</strong> (<em>float</em>) &#8211; Number by which to scale the plot.</li>
  1525. <li><strong>center</strong> (<em>list</em>) &#8211; Coordinates [x, y] of the point around which to scale the plot.</li>
  1526. </ul>
  1527. </td>
  1528. </tr>
  1529. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">None</p>
  1530. </td>
  1531. </tr>
  1532. </tbody>
  1533. </table>
  1534. </dd></dl>
  1535. </dd></dl>
  1536. </div>
  1537. <div class="section" id="objectcollection">
  1538. <h2>ObjectCollection<a class="headerlink" href="#objectcollection" title="Permalink to this headline">¶</a></h2>
  1539. <dl class="class">
  1540. <dt id="FlatCAM.ObjectCollection">
  1541. <em class="property">class </em><tt class="descclassname">FlatCAM.</tt><tt class="descname">ObjectCollection</tt><a class="headerlink" href="#FlatCAM.ObjectCollection" title="Permalink to this definition">¶</a></dt>
  1542. <dd><dl class="method">
  1543. <dt id="FlatCAM.ObjectCollection.append">
  1544. <tt class="descname">append</tt><big>(</big><em>obj</em>, <em>active=False</em><big>)</big><a class="headerlink" href="#FlatCAM.ObjectCollection.append" title="Permalink to this definition">¶</a></dt>
  1545. <dd><p>Add a FlatCAMObj the the collection. This method is thread-safe.</p>
  1546. <table class="docutils field-list" frame="void" rules="none">
  1547. <col class="field-name" />
  1548. <col class="field-body" />
  1549. <tbody valign="top">
  1550. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  1551. <li><strong>obj</strong> (<em>FlatCAMObj</em>) &#8211; FlatCAMObj to append</li>
  1552. <li><strong>active</strong> (<em>bool</em>) &#8211; If it is to become the active object after appending</li>
  1553. </ul>
  1554. </td>
  1555. </tr>
  1556. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">None</p>
  1557. </td>
  1558. </tr>
  1559. </tbody>
  1560. </table>
  1561. </dd></dl>
  1562. <dl class="method">
  1563. <dt id="FlatCAM.ObjectCollection.change_name">
  1564. <tt class="descname">change_name</tt><big>(</big><em>old_name</em>, <em>new_name</em><big>)</big><a class="headerlink" href="#FlatCAM.ObjectCollection.change_name" title="Permalink to this definition">¶</a></dt>
  1565. <dd><p>Changes the name of <cite>FlatCAMObj</cite> named <cite>old_name</cite> to <cite>new_name</cite>.</p>
  1566. <table class="docutils field-list" frame="void" rules="none">
  1567. <col class="field-name" />
  1568. <col class="field-body" />
  1569. <tbody valign="top">
  1570. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  1571. <li><strong>old_name</strong> (<em>str</em>) &#8211; Name of the object to change.</li>
  1572. <li><strong>new_name</strong> (<em>str</em>) &#8211; New name.</li>
  1573. </ul>
  1574. </td>
  1575. </tr>
  1576. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">True if name change succeeded, False otherwise. Will fail
  1577. if no object with <cite>old_name</cite> is found.</p>
  1578. </td>
  1579. </tr>
  1580. <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">bool</p>
  1581. </td>
  1582. </tr>
  1583. </tbody>
  1584. </table>
  1585. </dd></dl>
  1586. <dl class="method">
  1587. <dt id="FlatCAM.ObjectCollection.get_bounds">
  1588. <tt class="descname">get_bounds</tt><big>(</big><big>)</big><a class="headerlink" href="#FlatCAM.ObjectCollection.get_bounds" title="Permalink to this definition">¶</a></dt>
  1589. <dd><p>Finds coordinates bounding all objects in the collection.</p>
  1590. <table class="docutils field-list" frame="void" rules="none">
  1591. <col class="field-name" />
  1592. <col class="field-body" />
  1593. <tbody valign="top">
  1594. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">[xmin, ymin, xmax, ymax]</td>
  1595. </tr>
  1596. <tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">list</td>
  1597. </tr>
  1598. </tbody>
  1599. </table>
  1600. </dd></dl>
  1601. <dl class="method">
  1602. <dt id="FlatCAM.ObjectCollection.get_by_name">
  1603. <tt class="descname">get_by_name</tt><big>(</big><em>name</em><big>)</big><a class="headerlink" href="#FlatCAM.ObjectCollection.get_by_name" title="Permalink to this definition">¶</a></dt>
  1604. <dd><p>Fetches the FlatCAMObj with the given <cite>name</cite>.</p>
  1605. <table class="docutils field-list" frame="void" rules="none">
  1606. <col class="field-name" />
  1607. <col class="field-body" />
  1608. <tbody valign="top">
  1609. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<em>str</em>) &#8211; The name of the object.</td>
  1610. </tr>
  1611. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">The requested object or None if no such object.</td>
  1612. </tr>
  1613. <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">FlatCAMObj or None</td>
  1614. </tr>
  1615. </tbody>
  1616. </table>
  1617. </dd></dl>
  1618. <dl class="method">
  1619. <dt id="FlatCAM.ObjectCollection.get_list">
  1620. <tt class="descname">get_list</tt><big>(</big><big>)</big><a class="headerlink" href="#FlatCAM.ObjectCollection.get_list" title="Permalink to this definition">¶</a></dt>
  1621. <dd><p>Returns a list with all FlatCAMObj.</p>
  1622. <table class="docutils field-list" frame="void" rules="none">
  1623. <col class="field-name" />
  1624. <col class="field-body" />
  1625. <tbody valign="top">
  1626. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">List with all FlatCAMObj.</td>
  1627. </tr>
  1628. <tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">list</td>
  1629. </tr>
  1630. </tbody>
  1631. </table>
  1632. </dd></dl>
  1633. <dl class="method">
  1634. <dt id="FlatCAM.ObjectCollection.get_names">
  1635. <tt class="descname">get_names</tt><big>(</big><big>)</big><a class="headerlink" href="#FlatCAM.ObjectCollection.get_names" title="Permalink to this definition">¶</a></dt>
  1636. <dd><p>Gets a list of the names of all objects in the collection.</p>
  1637. <table class="docutils field-list" frame="void" rules="none">
  1638. <col class="field-name" />
  1639. <col class="field-body" />
  1640. <tbody valign="top">
  1641. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">List of names.</td>
  1642. </tr>
  1643. <tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">list</td>
  1644. </tr>
  1645. </tbody>
  1646. </table>
  1647. </dd></dl>
  1648. <dl class="method">
  1649. <dt id="FlatCAM.ObjectCollection.on_list_selection_change">
  1650. <tt class="descname">on_list_selection_change</tt><big>(</big><em>selection</em><big>)</big><a class="headerlink" href="#FlatCAM.ObjectCollection.on_list_selection_change" title="Permalink to this definition">¶</a></dt>
  1651. <dd><p>Callback for change in selection on the objects&#8217; list.
  1652. Instructs the new selection to build the UI for its options.</p>
  1653. <table class="docutils field-list" frame="void" rules="none">
  1654. <col class="field-name" />
  1655. <col class="field-body" />
  1656. <tbody valign="top">
  1657. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>selection</strong> &#8211; Ignored.</td>
  1658. </tr>
  1659. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  1660. </tr>
  1661. </tbody>
  1662. </table>
  1663. </dd></dl>
  1664. <dl class="method">
  1665. <dt id="FlatCAM.ObjectCollection.on_row_activated">
  1666. <tt class="descname">on_row_activated</tt><big>(</big><em>*args</em><big>)</big><a class="headerlink" href="#FlatCAM.ObjectCollection.on_row_activated" title="Permalink to this definition">¶</a></dt>
  1667. <dd><p>Does nothing right now.
  1668. :param args: Ignored.
  1669. :return: None</p>
  1670. </dd></dl>
  1671. <dl class="method">
  1672. <dt id="FlatCAM.ObjectCollection.set_active">
  1673. <tt class="descname">set_active</tt><big>(</big><em>name</em><big>)</big><a class="headerlink" href="#FlatCAM.ObjectCollection.set_active" title="Permalink to this definition">¶</a></dt>
  1674. <dd><p>Sets an object as the active object in the program. Same
  1675. as <cite>set_list_selection()</cite>.</p>
  1676. <table class="docutils field-list" frame="void" rules="none">
  1677. <col class="field-name" />
  1678. <col class="field-body" />
  1679. <tbody valign="top">
  1680. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<em>str</em>) &#8211; Name of the object.</td>
  1681. </tr>
  1682. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  1683. </tr>
  1684. </tbody>
  1685. </table>
  1686. </dd></dl>
  1687. <dl class="method">
  1688. <dt id="FlatCAM.ObjectCollection.set_list_selection">
  1689. <tt class="descname">set_list_selection</tt><big>(</big><em>name</em><big>)</big><a class="headerlink" href="#FlatCAM.ObjectCollection.set_list_selection" title="Permalink to this definition">¶</a></dt>
  1690. <dd><p>Sets which object should be selected in the list.</p>
  1691. <table class="docutils field-list" frame="void" rules="none">
  1692. <col class="field-name" />
  1693. <col class="field-body" />
  1694. <tbody valign="top">
  1695. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> &#8211; Name of the object.</td>
  1696. </tr>
  1697. <tr class="field-even field"><th class="field-name">Rtype name:</th><td class="field-body">str</td>
  1698. </tr>
  1699. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  1700. </tr>
  1701. </tbody>
  1702. </table>
  1703. </dd></dl>
  1704. </dd></dl>
  1705. </div>
  1706. <div class="section" id="measurement">
  1707. <h2>Measurement<a class="headerlink" href="#measurement" title="Permalink to this headline">¶</a></h2>
  1708. <dl class="class">
  1709. <dt id="FlatCAM.Measurement">
  1710. <em class="property">class </em><tt class="descclassname">FlatCAM.</tt><tt class="descname">Measurement</tt><big>(</big><em>container</em>, <em>plotcanvas</em>, <em>update=None</em><big>)</big><a class="headerlink" href="#FlatCAM.Measurement" title="Permalink to this definition">¶</a></dt>
  1711. <dd></dd></dl>
  1712. </div>
  1713. </div>
  1714. </div>
  1715. <footer>
  1716. <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
  1717. <a href="devman.html" class="btn btn-neutral float-right" title="FlatCAM Developer Manual"/>Next <span class="icon icon-circle-arrow-right"></span></a>
  1718. <a href="flatcamobj.html" class="btn btn-neutral" title="FlatCAM Objects"><span class="icon icon-circle-arrow-left"></span> Previous</a>
  1719. </div>
  1720. <hr/>
  1721. <div role="contentinfo">
  1722. <p>
  1723. &copy; Copyright 2014, Juan Pablo Caram.
  1724. </p>
  1725. </div>
  1726. <a href="https://github.com/snide/sphinx_rtd_theme">Sphinx theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>
  1727. </footer>
  1728. </div>
  1729. </div>
  1730. </section>
  1731. </div>
  1732. </body>
  1733. </html>