index.html 108 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395
  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>Welcome to FlatCAM’s documentation! &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="#"/>
  29. <script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script>
  30. </head>
  31. <body class="wy-body-for-nav" role="document">
  32. <div class="wy-grid-for-nav">
  33. <nav data-toggle="wy-nav-shift" class="wy-nav-side">
  34. <div class="wy-side-nav-search">
  35. <a href="#" class="icon icon-home"> Cirkuix</a>
  36. <div role="search">
  37. <form id ="rtd-search-form" class="wy-form" action="search.html" method="get">
  38. <input type="text" name="q" placeholder="Search docs" />
  39. <input type="hidden" name="check_keywords" value="yes" />
  40. <input type="hidden" name="area" value="default" />
  41. </form>
  42. </div>
  43. </div>
  44. <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
  45. <ul class="simple">
  46. </ul>
  47. </div>
  48. &nbsp;
  49. </nav>
  50. <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
  51. <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
  52. <i data-toggle="wy-nav-top" class="icon icon-reorder"></i>
  53. <a href="#">Cirkuix</a>
  54. </nav>
  55. <div class="wy-nav-content">
  56. <div class="rst-content">
  57. <div role="navigation" aria-label="breadcrumbs navigation">
  58. <ul class="wy-breadcrumbs">
  59. <li><a href="#">Docs</a> &raquo;</li>
  60. <li>Welcome to FlatCAM&#8217;s documentation!</li>
  61. <li class="wy-breadcrumbs-aside">
  62. <a href="_sources/index.txt" rel="nofollow"> View page source</a>
  63. </li>
  64. </ul>
  65. <hr/>
  66. </div>
  67. <div role="main">
  68. <div class="section" id="welcome-to-flatcam-s-documentation">
  69. <h1>Welcome to FlatCAM&#8217;s documentation!<a class="headerlink" href="#welcome-to-flatcam-s-documentation" title="Permalink to this headline">¶</a></h1>
  70. <p>Contents:</p>
  71. <div class="toctree-wrapper compound">
  72. <ul class="simple">
  73. </ul>
  74. </div>
  75. <span class="target" id="module-FlatCAM"></span><dl class="class">
  76. <dt id="FlatCAM.App">
  77. <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>
  78. <dd><p>The main application class. The constructor starts the GUI.</p>
  79. <dl class="method">
  80. <dt id="FlatCAM.App.adjust_axes">
  81. <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.App.adjust_axes" title="Permalink to this definition">¶</a></dt>
  82. <dd><p>Adjusts axes of all plots while maintaining the use of the whole canvas
  83. and an aspect ratio to 1:1 between x and y axes. The parameters are an original
  84. request that will be modified to fit these restrictions.</p>
  85. <table class="docutils field-list" frame="void" rules="none">
  86. <col class="field-name" />
  87. <col class="field-body" />
  88. <tbody valign="top">
  89. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  90. <li><strong>xmin</strong> (<em>float</em>) &#8211; Requested minimum value for the X axis.</li>
  91. <li><strong>ymin</strong> (<em>float</em>) &#8211; Requested minimum value for the Y axis.</li>
  92. <li><strong>xmax</strong> (<em>float</em>) &#8211; Requested maximum value for the X axis.</li>
  93. <li><strong>ymax</strong> (<em>float</em>) &#8211; Requested maximum value for the Y axis.</li>
  94. </ul>
  95. </td>
  96. </tr>
  97. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">None</p>
  98. </td>
  99. </tr>
  100. </tbody>
  101. </table>
  102. </dd></dl>
  103. <dl class="method">
  104. <dt id="FlatCAM.App.build_list">
  105. <tt class="descname">build_list</tt><big>(</big><big>)</big><a class="headerlink" href="#FlatCAM.App.build_list" title="Permalink to this definition">¶</a></dt>
  106. <dd><p>Clears and re-populates the list of objects in currently
  107. in the project.</p>
  108. <table class="docutils field-list" frame="void" rules="none">
  109. <col class="field-name" />
  110. <col class="field-body" />
  111. <tbody valign="top">
  112. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  113. </tr>
  114. </tbody>
  115. </table>
  116. </dd></dl>
  117. <dl class="method">
  118. <dt id="FlatCAM.App.clear_plots">
  119. <tt class="descname">clear_plots</tt><big>(</big><big>)</big><a class="headerlink" href="#FlatCAM.App.clear_plots" title="Permalink to this definition">¶</a></dt>
  120. <dd><p>Clears self.axes and self.figure.</p>
  121. <table class="docutils field-list" frame="void" rules="none">
  122. <col class="field-name" />
  123. <col class="field-body" />
  124. <tbody valign="top">
  125. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  126. </tr>
  127. </tbody>
  128. </table>
  129. </dd></dl>
  130. <dl class="method">
  131. <dt id="FlatCAM.App.file_chooser_action">
  132. <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>
  133. <dd><p>Opens the file chooser and runs on_success on a separate thread
  134. upon completion of valid file choice.</p>
  135. <table class="docutils field-list" frame="void" rules="none">
  136. <col class="field-name" />
  137. <col class="field-body" />
  138. <tbody valign="top">
  139. <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
  140. selection. Takes 2 parameters: The app instance and the filename.
  141. Note that it is run on a separate thread, therefore it must take the
  142. appropriate precautions when accessing shared resources.</td>
  143. </tr>
  144. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  145. </tr>
  146. </tbody>
  147. </table>
  148. </dd></dl>
  149. <dl class="method">
  150. <dt id="FlatCAM.App.file_chooser_save_action">
  151. <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>
  152. <dd><p>Opens the file chooser and runs on_success upon completion of valid file choice.</p>
  153. <table class="docutils field-list" frame="void" rules="none">
  154. <col class="field-name" />
  155. <col class="field-body" />
  156. <tbody valign="top">
  157. <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
  158. parameters: The instance of the application (App) and the chosen filename. This
  159. gets run immediately in the same thread.</td>
  160. </tr>
  161. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  162. </tr>
  163. </tbody>
  164. </table>
  165. </dd></dl>
  166. <dl class="method">
  167. <dt id="FlatCAM.App.get_current">
  168. <tt class="descname">get_current</tt><big>(</big><big>)</big><a class="headerlink" href="#FlatCAM.App.get_current" title="Permalink to this definition">¶</a></dt>
  169. <dd><p>Returns the currently selected FlatCAMObj in the application.</p>
  170. <table class="docutils field-list" frame="void" rules="none">
  171. <col class="field-name" />
  172. <col class="field-body" />
  173. <tbody valign="top">
  174. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Currently selected FlatCAMObj in the application.</td>
  175. </tr>
  176. <tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">FlatCAMObj or None</td>
  177. </tr>
  178. </tbody>
  179. </table>
  180. </dd></dl>
  181. <dl class="method">
  182. <dt id="FlatCAM.App.get_eval">
  183. <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>
  184. <dd><p>Runs eval() on the on the text entry of name &#8216;widget_name&#8217;
  185. and returns the results.</p>
  186. <table class="docutils field-list" frame="void" rules="none">
  187. <col class="field-name" />
  188. <col class="field-body" />
  189. <tbody valign="top">
  190. <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>
  191. </tr>
  192. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Depends on contents of the entry text.</td>
  193. </tr>
  194. </tbody>
  195. </table>
  196. </dd></dl>
  197. <dl class="method">
  198. <dt id="FlatCAM.App.get_radio_value">
  199. <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>
  200. <dd><p>Returns the radio_set[key] of the radiobutton
  201. whose name is key is active.</p>
  202. <table class="docutils field-list" frame="void" rules="none">
  203. <col class="field-name" />
  204. <col class="field-body" />
  205. <tbody valign="top">
  206. <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>
  207. </tr>
  208. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">radio_set[key]</td>
  209. </tr>
  210. </tbody>
  211. </table>
  212. </dd></dl>
  213. <dl class="method">
  214. <dt id="FlatCAM.App.info">
  215. <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>
  216. <dd><p>Show text on the status bar.</p>
  217. <table class="docutils field-list" frame="void" rules="none">
  218. <col class="field-name" />
  219. <col class="field-body" />
  220. <tbody valign="top">
  221. <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>
  222. </tr>
  223. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  224. </tr>
  225. </tbody>
  226. </table>
  227. </dd></dl>
  228. <dl class="method">
  229. <dt id="FlatCAM.App.load_defaults">
  230. <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>
  231. <dd><p>Loads the aplication&#8217;s default settings from defaults.json into
  232. <tt class="docutils literal"><span class="pre">self.defaults</span></tt>.</p>
  233. <table class="docutils field-list" frame="void" rules="none">
  234. <col class="field-name" />
  235. <col class="field-body" />
  236. <tbody valign="top">
  237. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  238. </tr>
  239. </tbody>
  240. </table>
  241. </dd></dl>
  242. <dl class="method">
  243. <dt id="FlatCAM.App.new_object">
  244. <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>
  245. <dd><p>Creates a new specalized FlatCAMObj and attaches it to the application,
  246. this is, updates the GUI accordingly, any other records and plots it.</p>
  247. <table class="docutils field-list" frame="void" rules="none">
  248. <col class="field-name" />
  249. <col class="field-body" />
  250. <tbody valign="top">
  251. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  252. <li><strong>kind</strong> (<em>str</em>) &#8211; The kind of object to create. One of &#8216;gerber&#8217;,
  253. &#8216;excellon&#8217;, &#8216;cncjob&#8217; and &#8216;geometry&#8217;.</li>
  254. <li><strong>name</strong> (<em>str</em>) &#8211; Name for the object.</li>
  255. <li><strong>initialize</strong> (<em>function</em>) &#8211; Function to run after creation of the object
  256. but before it is attached to the application. The function is
  257. called with 2 parameters: the new object and the App instance.</li>
  258. </ul>
  259. </td>
  260. </tr>
  261. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">None</p>
  262. </td>
  263. </tr>
  264. <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">None</p>
  265. </td>
  266. </tr>
  267. </tbody>
  268. </table>
  269. </dd></dl>
  270. <dl class="method">
  271. <dt id="FlatCAM.App.on_about">
  272. <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>
  273. <dd><p>Opens the &#8216;About&#8217; dialog box.</p>
  274. <table class="docutils field-list" frame="void" rules="none">
  275. <col class="field-name" />
  276. <col class="field-body" />
  277. <tbody valign="top">
  278. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>widget</strong> &#8211; Ignored.</td>
  279. </tr>
  280. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  281. </tr>
  282. </tbody>
  283. </table>
  284. </dd></dl>
  285. <dl class="method">
  286. <dt id="FlatCAM.App.on_activate_name">
  287. <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>
  288. <dd><p>Hitting &#8216;Enter&#8217; after changing the name of an item
  289. updates the item dictionary and re-builds the item list.</p>
  290. <table class="docutils field-list" frame="void" rules="none">
  291. <col class="field-name" />
  292. <col class="field-body" />
  293. <tbody valign="top">
  294. <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>
  295. </tr>
  296. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  297. </tr>
  298. </tbody>
  299. </table>
  300. </dd></dl>
  301. <dl class="method">
  302. <dt id="FlatCAM.App.on_canvas_configure">
  303. <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>
  304. <dd><p>Called whenever the canvas changes size. The axes are updated such
  305. as to use the whole canvas.</p>
  306. <table class="docutils field-list" frame="void" rules="none">
  307. <col class="field-name" />
  308. <col class="field-body" />
  309. <tbody valign="top">
  310. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  311. <li><strong>widget</strong> &#8211; Ignored.</li>
  312. <li><strong>event</strong> &#8211; Ignored.</li>
  313. </ul>
  314. </td>
  315. </tr>
  316. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">None</p>
  317. </td>
  318. </tr>
  319. </tbody>
  320. </table>
  321. </dd></dl>
  322. <dl class="method">
  323. <dt id="FlatCAM.App.on_clear_plots">
  324. <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>
  325. <dd><p>Callback for toolbar button. Clears all plots.</p>
  326. <table class="docutils field-list" frame="void" rules="none">
  327. <col class="field-name" />
  328. <col class="field-body" />
  329. <tbody valign="top">
  330. <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>
  331. </tr>
  332. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  333. </tr>
  334. </tbody>
  335. </table>
  336. </dd></dl>
  337. <dl class="method">
  338. <dt id="FlatCAM.App.on_click_over_plot">
  339. <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>
  340. <dd><p>Callback for the mouse click event over the plot. This event is generated
  341. by the Matplotlib backend and has been registered in <tt class="docutils literal"><span class="pre">self.__init__()</span></tt>.
  342. For details, see: <a class="reference external" href="http://matplotlib.org/users/event_handling.html">http://matplotlib.org/users/event_handling.html</a></p>
  343. <p>Default actions are:</p>
  344. <ul class="simple">
  345. <li>Copy coordinates to clipboard. Ex.: (65.5473, -13.2679)</li>
  346. </ul>
  347. <table class="docutils field-list" frame="void" rules="none">
  348. <col class="field-name" />
  349. <col class="field-body" />
  350. <tbody valign="top">
  351. <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
  352. was clicked, the pixel coordinates and the axes coordinates.</td>
  353. </tr>
  354. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  355. </tr>
  356. </tbody>
  357. </table>
  358. </dd></dl>
  359. <dl class="method">
  360. <dt id="FlatCAM.App.on_closewindow">
  361. <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>
  362. <dd><p>Callback for closing the main window.</p>
  363. <table class="docutils field-list" frame="void" rules="none">
  364. <col class="field-name" />
  365. <col class="field-body" />
  366. <tbody valign="top">
  367. <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>
  368. </tr>
  369. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  370. </tr>
  371. </tbody>
  372. </table>
  373. </dd></dl>
  374. <dl class="method">
  375. <dt id="FlatCAM.App.on_cncjob_exportgcode">
  376. <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>
  377. <dd><p>Called from button on CNCjob form to save the G-Code from the object.</p>
  378. <table class="docutils field-list" frame="void" rules="none">
  379. <col class="field-name" />
  380. <col class="field-body" />
  381. <tbody valign="top">
  382. <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>
  383. </tr>
  384. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  385. </tr>
  386. </tbody>
  387. </table>
  388. </dd></dl>
  389. <dl class="method">
  390. <dt id="FlatCAM.App.on_create_aligndrill">
  391. <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>
  392. <dd><p>Creates alignment holes Excellon object. Creates mirror duplicates
  393. of the specified holes around the specified axis.</p>
  394. <table class="docutils field-list" frame="void" rules="none">
  395. <col class="field-name" />
  396. <col class="field-body" />
  397. <tbody valign="top">
  398. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>widget</strong> &#8211; Ignored.</td>
  399. </tr>
  400. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  401. </tr>
  402. </tbody>
  403. </table>
  404. </dd></dl>
  405. <dl class="method">
  406. <dt id="FlatCAM.App.on_create_mirror">
  407. <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>
  408. <dd><p>Creates a mirror image of a Gerber object to be used as a bottom
  409. copper layer.</p>
  410. <table class="docutils field-list" frame="void" rules="none">
  411. <col class="field-name" />
  412. <col class="field-body" />
  413. <tbody valign="top">
  414. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>widget</strong> &#8211; Ignored.</td>
  415. </tr>
  416. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  417. </tr>
  418. </tbody>
  419. </table>
  420. </dd></dl>
  421. <dl class="method">
  422. <dt id="FlatCAM.App.on_delete">
  423. <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>
  424. <dd><p>Delete the currently selected FlatCAMObj.</p>
  425. <table class="docutils field-list" frame="void" rules="none">
  426. <col class="field-name" />
  427. <col class="field-body" />
  428. <tbody valign="top">
  429. <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>
  430. </tr>
  431. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  432. </tr>
  433. </tbody>
  434. </table>
  435. </dd></dl>
  436. <dl class="method">
  437. <dt id="FlatCAM.App.on_entry_eval_activate">
  438. <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>
  439. <dd><p>Called when an entry is activated (eg. by hitting enter) if
  440. set to do so. Its text is eval()&#8217;d and set to the returned value.
  441. The current object is updated.</p>
  442. <table class="docutils field-list" frame="void" rules="none">
  443. <col class="field-name" />
  444. <col class="field-body" />
  445. <tbody valign="top">
  446. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>widget</strong> &#8211; </td>
  447. </tr>
  448. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"></td>
  449. </tr>
  450. </tbody>
  451. </table>
  452. </dd></dl>
  453. <dl class="method">
  454. <dt id="FlatCAM.App.on_eval_update">
  455. <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>
  456. <dd><p>Modifies the content of a Gtk.Entry by running
  457. eval() on its contents and puting it back as a
  458. string.</p>
  459. <table class="docutils field-list" frame="void" rules="none">
  460. <col class="field-name" />
  461. <col class="field-body" />
  462. <tbody valign="top">
  463. <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>
  464. </tr>
  465. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  466. </tr>
  467. </tbody>
  468. </table>
  469. </dd></dl>
  470. <dl class="method">
  471. <dt id="FlatCAM.App.on_excellon_tool_choose">
  472. <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>
  473. <dd><p>Callback for button on Excellon form to open up a window for
  474. selecting tools.</p>
  475. <table class="docutils field-list" frame="void" rules="none">
  476. <col class="field-name" />
  477. <col class="field-body" />
  478. <tbody valign="top">
  479. <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>
  480. </tr>
  481. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  482. </tr>
  483. </tbody>
  484. </table>
  485. </dd></dl>
  486. <dl class="method">
  487. <dt id="FlatCAM.App.on_file_new">
  488. <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>
  489. <dd><p>Callback for menu item File-&gt;New. Returns the application to its
  490. startup state.</p>
  491. <table class="docutils field-list" frame="void" rules="none">
  492. <col class="field-name" />
  493. <col class="field-body" />
  494. <tbody valign="top">
  495. <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>
  496. </tr>
  497. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  498. </tr>
  499. </tbody>
  500. </table>
  501. </dd></dl>
  502. <dl class="method">
  503. <dt id="FlatCAM.App.on_file_openproject">
  504. <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>
  505. <dd><p>Callback for menu item File-&gt;Open Project. Opens a file chooser and calls
  506. <tt class="docutils literal"><span class="pre">self.open_project()</span></tt> after successful selection of a filename.</p>
  507. <table class="docutils field-list" frame="void" rules="none">
  508. <col class="field-name" />
  509. <col class="field-body" />
  510. <tbody valign="top">
  511. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>param</strong> &#8211; Ignored.</td>
  512. </tr>
  513. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  514. </tr>
  515. </tbody>
  516. </table>
  517. </dd></dl>
  518. <dl class="method">
  519. <dt id="FlatCAM.App.on_file_savedefaults">
  520. <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>
  521. <dd><p>Callback for menu item File-&gt;Save Defaults. Saves application default options
  522. <tt class="docutils literal"><span class="pre">self.defaults</span></tt> to defaults.json.</p>
  523. <table class="docutils field-list" frame="void" rules="none">
  524. <col class="field-name" />
  525. <col class="field-body" />
  526. <tbody valign="top">
  527. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>param</strong> &#8211; Ignored.</td>
  528. </tr>
  529. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  530. </tr>
  531. </tbody>
  532. </table>
  533. </dd></dl>
  534. <dl class="method">
  535. <dt id="FlatCAM.App.on_file_saveproject">
  536. <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>
  537. <dd><p>Callback for menu item File-&gt;Save Project. Saves the project to
  538. <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>
  539. if set to None. The project is saved by calling <tt class="docutils literal"><span class="pre">self.save_project()</span></tt>.</p>
  540. <table class="docutils field-list" frame="void" rules="none">
  541. <col class="field-name" />
  542. <col class="field-body" />
  543. <tbody valign="top">
  544. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>param</strong> &#8211; Ignored.</td>
  545. </tr>
  546. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  547. </tr>
  548. </tbody>
  549. </table>
  550. </dd></dl>
  551. <dl class="method">
  552. <dt id="FlatCAM.App.on_file_saveprojectas">
  553. <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>
  554. <dd><p>Callback for menu item File-&gt;Save Project As... Opens a file
  555. chooser and saves the project to the given file via
  556. <tt class="docutils literal"><span class="pre">self.save_project()</span></tt>.</p>
  557. <table class="docutils field-list" frame="void" rules="none">
  558. <col class="field-name" />
  559. <col class="field-body" />
  560. <tbody valign="top">
  561. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>param</strong> &#8211; Ignored.</td>
  562. </tr>
  563. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  564. </tr>
  565. </tbody>
  566. </table>
  567. </dd></dl>
  568. <dl class="method">
  569. <dt id="FlatCAM.App.on_file_saveprojectcopy">
  570. <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>
  571. <dd><p>Callback for menu item File-&gt;Save Project Copy... Opens a file
  572. chooser and saves the project to the given file via
  573. <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
  574. subsequent save requests are done on the previous known filename.</p>
  575. <table class="docutils field-list" frame="void" rules="none">
  576. <col class="field-name" />
  577. <col class="field-body" />
  578. <tbody valign="top">
  579. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>param</strong> &#8211; Ignore.</td>
  580. </tr>
  581. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  582. </tr>
  583. </tbody>
  584. </table>
  585. </dd></dl>
  586. <dl class="method">
  587. <dt id="FlatCAM.App.on_fileopenexcellon">
  588. <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>
  589. <dd><p>Callback for menu item File-&gt;Open Excellon. Defines a function that is then passed
  590. to <tt class="docutils literal"><span class="pre">self.file_chooser_action()</span></tt>. It requests the creation of a FlatCAMExcellon object
  591. and updates the progress bar throughout the process.</p>
  592. <table class="docutils field-list" frame="void" rules="none">
  593. <col class="field-name" />
  594. <col class="field-body" />
  595. <tbody valign="top">
  596. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>param</strong> &#8211; Ignore</td>
  597. </tr>
  598. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  599. </tr>
  600. </tbody>
  601. </table>
  602. </dd></dl>
  603. <dl class="method">
  604. <dt id="FlatCAM.App.on_fileopengcode">
  605. <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>
  606. <dd><p>Callback for menu item File-&gt;Open G-Code. Defines a function that is then passed
  607. to <tt class="docutils literal"><span class="pre">self.file_chooser_action()</span></tt>. It requests the creation of a FlatCAMCNCjob object
  608. and updates the progress bar throughout the process.</p>
  609. <table class="docutils field-list" frame="void" rules="none">
  610. <col class="field-name" />
  611. <col class="field-body" />
  612. <tbody valign="top">
  613. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>param</strong> &#8211; Ignore</td>
  614. </tr>
  615. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  616. </tr>
  617. </tbody>
  618. </table>
  619. </dd></dl>
  620. <dl class="method">
  621. <dt id="FlatCAM.App.on_fileopengerber">
  622. <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>
  623. <dd><p>Callback for menu item File-&gt;Open Gerber. Defines a function that is then passed
  624. to <tt class="docutils literal"><span class="pre">self.file_chooser_action()</span></tt>. It requests the creation of a FlatCAMGerber object
  625. and updates the progress bar throughout the process.</p>
  626. <table class="docutils field-list" frame="void" rules="none">
  627. <col class="field-name" />
  628. <col class="field-body" />
  629. <tbody valign="top">
  630. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>param</strong> &#8211; Ignore</td>
  631. </tr>
  632. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  633. </tr>
  634. </tbody>
  635. </table>
  636. </dd></dl>
  637. <dl class="method">
  638. <dt id="FlatCAM.App.on_filequit">
  639. <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>
  640. <dd><p>Callback for menu item File-&gt;Quit. Closes the application.</p>
  641. <table class="docutils field-list" frame="void" rules="none">
  642. <col class="field-name" />
  643. <col class="field-body" />
  644. <tbody valign="top">
  645. <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>
  646. </tr>
  647. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  648. </tr>
  649. </tbody>
  650. </table>
  651. </dd></dl>
  652. <dl class="method">
  653. <dt id="FlatCAM.App.on_generate_cncjob">
  654. <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>
  655. <dd><p>Callback for button on geometry form to generate CNC job.</p>
  656. <table class="docutils field-list" frame="void" rules="none">
  657. <col class="field-name" />
  658. <col class="field-body" />
  659. <tbody valign="top">
  660. <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>
  661. </tr>
  662. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  663. </tr>
  664. </tbody>
  665. </table>
  666. </dd></dl>
  667. <dl class="method">
  668. <dt id="FlatCAM.App.on_generate_excellon_cncjob">
  669. <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>
  670. <dd><p>Callback for button active/click on Excellon form to
  671. create a CNC Job for the Excellon file.</p>
  672. <table class="docutils field-list" frame="void" rules="none">
  673. <col class="field-name" />
  674. <col class="field-body" />
  675. <tbody valign="top">
  676. <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>
  677. </tr>
  678. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  679. </tr>
  680. </tbody>
  681. </table>
  682. </dd></dl>
  683. <dl class="method">
  684. <dt id="FlatCAM.App.on_generate_gerber_bounding_box">
  685. <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>
  686. <dd><p>Callback for request from the Gerber form to generate a bounding box for the
  687. geometry in the object. Creates a FlatCAMGeometry with the bounding box.</p>
  688. <table class="docutils field-list" frame="void" rules="none">
  689. <col class="field-name" />
  690. <col class="field-body" />
  691. <tbody valign="top">
  692. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>widget</strong> &#8211; Ignored.</td>
  693. </tr>
  694. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  695. </tr>
  696. </tbody>
  697. </table>
  698. </dd></dl>
  699. <dl class="method">
  700. <dt id="FlatCAM.App.on_generate_isolation">
  701. <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>
  702. <dd><p>Callback for button on Gerber form to create isolation routing geometry.</p>
  703. <table class="docutils field-list" frame="void" rules="none">
  704. <col class="field-name" />
  705. <col class="field-body" />
  706. <tbody valign="top">
  707. <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>
  708. </tr>
  709. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  710. </tr>
  711. </tbody>
  712. </table>
  713. </dd></dl>
  714. <dl class="method">
  715. <dt id="FlatCAM.App.on_generate_paintarea">
  716. <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>
  717. <dd><p>Callback for button on geometry form.
  718. Subscribes to the &#8220;Click on plot&#8221; event and continues
  719. after the click. Finds the polygon containing
  720. the clicked point and runs clear_poly() on it, resulting
  721. in a new FlatCAMGeometry object.</p>
  722. <table class="docutils field-list" frame="void" rules="none">
  723. <col class="field-name" />
  724. <col class="field-body" />
  725. <tbody valign="top">
  726. <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>
  727. </tr>
  728. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  729. </tr>
  730. </tbody>
  731. </table>
  732. </dd></dl>
  733. <dl class="method">
  734. <dt id="FlatCAM.App.on_gerber_generate_cutout">
  735. <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>
  736. <dd><p>Callback for button on Gerber form to create geometry with lines
  737. for cutting off the board.</p>
  738. <table class="docutils field-list" frame="void" rules="none">
  739. <col class="field-name" />
  740. <col class="field-body" />
  741. <tbody valign="top">
  742. <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>
  743. </tr>
  744. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  745. </tr>
  746. </tbody>
  747. </table>
  748. </dd></dl>
  749. <dl class="method">
  750. <dt id="FlatCAM.App.on_gerber_generate_noncopper">
  751. <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>
  752. <dd><p>Callback for button on Gerber form to create a geometry object
  753. with polygons covering the area without copper or negative of the
  754. Gerber.</p>
  755. <table class="docutils field-list" frame="void" rules="none">
  756. <col class="field-name" />
  757. <col class="field-body" />
  758. <tbody valign="top">
  759. <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>
  760. </tr>
  761. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  762. </tr>
  763. </tbody>
  764. </table>
  765. </dd></dl>
  766. <dl class="method">
  767. <dt id="FlatCAM.App.on_key_over_plot">
  768. <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>
  769. <dd><p>Callback for the key pressed event when the canvas is focused. Keyboard
  770. shortcuts are handled here. So far, these are the shortcuts:</p>
  771. <table border="1" class="docutils">
  772. <colgroup>
  773. <col width="19%" />
  774. <col width="81%" />
  775. </colgroup>
  776. <thead valign="bottom">
  777. <tr class="row-odd"><th class="head">Key</th>
  778. <th class="head">Action</th>
  779. </tr>
  780. </thead>
  781. <tbody valign="top">
  782. <tr class="row-even"><td>&#8216;1&#8217;</td>
  783. <td>Zoom-fit. Fits the axes limits to the data.</td>
  784. </tr>
  785. <tr class="row-odd"><td>&#8216;2&#8217;</td>
  786. <td>Zoom-out.</td>
  787. </tr>
  788. <tr class="row-even"><td>&#8216;3&#8217;</td>
  789. <td>Zoom-in.</td>
  790. </tr>
  791. </tbody>
  792. </table>
  793. <table class="docutils field-list" frame="void" rules="none">
  794. <col class="field-name" />
  795. <col class="field-body" />
  796. <tbody valign="top">
  797. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>event</strong> &#8211; Ignored.</td>
  798. </tr>
  799. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  800. </tr>
  801. </tbody>
  802. </table>
  803. </dd></dl>
  804. <dl class="method">
  805. <dt id="FlatCAM.App.on_mouse_move_over_plot">
  806. <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>
  807. <dd><p>Callback for the mouse motion event over the plot. This event is generated
  808. by the Matplotlib backend and has been registered in <tt class="docutils literal"><span class="pre">self.__init__()</span></tt>.
  809. For details, see: <a class="reference external" href="http://matplotlib.org/users/event_handling.html">http://matplotlib.org/users/event_handling.html</a></p>
  810. <table class="docutils field-list" frame="void" rules="none">
  811. <col class="field-name" />
  812. <col class="field-body" />
  813. <tbody valign="top">
  814. <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>
  815. </tr>
  816. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  817. </tr>
  818. </tbody>
  819. </table>
  820. </dd></dl>
  821. <dl class="method">
  822. <dt id="FlatCAM.App.on_options_app2object">
  823. <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>
  824. <dd><p>Callback for Options-&gt;Transfer Options-&gt;App=&gt;Object. Copies options
  825. from application defaults to the currently selected object.</p>
  826. <table class="docutils field-list" frame="void" rules="none">
  827. <col class="field-name" />
  828. <col class="field-body" />
  829. <tbody valign="top">
  830. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>param</strong> &#8211; Ignored.</td>
  831. </tr>
  832. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  833. </tr>
  834. </tbody>
  835. </table>
  836. </dd></dl>
  837. <dl class="method">
  838. <dt id="FlatCAM.App.on_options_app2project">
  839. <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>
  840. <dd><p>Callback for Options-&gt;Transfer Options-&gt;App=&gt;Project. Copies options
  841. from application defaults to project defaults.</p>
  842. <table class="docutils field-list" frame="void" rules="none">
  843. <col class="field-name" />
  844. <col class="field-body" />
  845. <tbody valign="top">
  846. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>param</strong> &#8211; Ignored.</td>
  847. </tr>
  848. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  849. </tr>
  850. </tbody>
  851. </table>
  852. </dd></dl>
  853. <dl class="method">
  854. <dt id="FlatCAM.App.on_options_combo_change">
  855. <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>
  856. <dd><p>Called when the combo box to choose between application defaults and
  857. project option changes value. The corresponding variables are
  858. copied to the UI.</p>
  859. <table class="docutils field-list" frame="void" rules="none">
  860. <col class="field-name" />
  861. <col class="field-body" />
  862. <tbody valign="top">
  863. <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>
  864. </tr>
  865. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  866. </tr>
  867. </tbody>
  868. </table>
  869. </dd></dl>
  870. <dl class="method">
  871. <dt id="FlatCAM.App.on_options_object2app">
  872. <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>
  873. <dd><p>Callback for Options-&gt;Transfer Options-&gt;Object=&gt;App. Copies options
  874. from the currently selected object to application defaults.</p>
  875. <table class="docutils field-list" frame="void" rules="none">
  876. <col class="field-name" />
  877. <col class="field-body" />
  878. <tbody valign="top">
  879. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>param</strong> &#8211; Ignored.</td>
  880. </tr>
  881. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  882. </tr>
  883. </tbody>
  884. </table>
  885. </dd></dl>
  886. <dl class="method">
  887. <dt id="FlatCAM.App.on_options_object2project">
  888. <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>
  889. <dd><p>Callback for Options-&gt;Transfer Options-&gt;Object=&gt;Project. Copies options
  890. from the currently selected object to project defaults.</p>
  891. <table class="docutils field-list" frame="void" rules="none">
  892. <col class="field-name" />
  893. <col class="field-body" />
  894. <tbody valign="top">
  895. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>param</strong> &#8211; Ignored.</td>
  896. </tr>
  897. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  898. </tr>
  899. </tbody>
  900. </table>
  901. </dd></dl>
  902. <dl class="method">
  903. <dt id="FlatCAM.App.on_options_project2app">
  904. <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>
  905. <dd><p>Callback for Options-&gt;Transfer Options-&gt;Project=&gt;App. Copies options
  906. from project defaults to application defaults.</p>
  907. <table class="docutils field-list" frame="void" rules="none">
  908. <col class="field-name" />
  909. <col class="field-body" />
  910. <tbody valign="top">
  911. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>param</strong> &#8211; Ignored.</td>
  912. </tr>
  913. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  914. </tr>
  915. </tbody>
  916. </table>
  917. </dd></dl>
  918. <dl class="method">
  919. <dt id="FlatCAM.App.on_options_project2object">
  920. <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>
  921. <dd><p>Callback for Options-&gt;Transfer Options-&gt;Project=&gt;Object. Copies options
  922. from project defaults to the currently selected object.</p>
  923. <table class="docutils field-list" frame="void" rules="none">
  924. <col class="field-name" />
  925. <col class="field-body" />
  926. <tbody valign="top">
  927. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>param</strong> &#8211; Ignored.</td>
  928. </tr>
  929. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  930. </tr>
  931. </tbody>
  932. </table>
  933. </dd></dl>
  934. <dl class="method">
  935. <dt id="FlatCAM.App.on_options_update">
  936. <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>
  937. <dd><p>Called whenever a value in the options/defaults form changes.
  938. 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>,
  939. which may be necessary when updating the UI from code and not by the user.</p>
  940. <table class="docutils field-list" frame="void" rules="none">
  941. <col class="field-name" />
  942. <col class="field-body" />
  943. <tbody valign="top">
  944. <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>
  945. </tr>
  946. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  947. </tr>
  948. </tbody>
  949. </table>
  950. </dd></dl>
  951. <dl class="method">
  952. <dt id="FlatCAM.App.on_row_activated">
  953. <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>
  954. <dd><p>Callback for selection activation (Enter or double-click) on the Project list.
  955. Switches the notebook page to the object properties form. Calls
  956. <tt class="docutils literal"><span class="pre">self.notebook.set_current_page(1)</span></tt>.</p>
  957. <table class="docutils field-list" frame="void" rules="none">
  958. <col class="field-name" />
  959. <col class="field-body" />
  960. <tbody valign="top">
  961. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  962. <li><strong>widget</strong> &#8211; Ignored.</li>
  963. <li><strong>path</strong> &#8211; Ignored.</li>
  964. <li><strong>col</strong> &#8211; Ignored.</li>
  965. </ul>
  966. </td>
  967. </tr>
  968. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">None</p>
  969. </td>
  970. </tr>
  971. </tbody>
  972. </table>
  973. </dd></dl>
  974. <dl class="method">
  975. <dt id="FlatCAM.App.on_scale_object">
  976. <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>
  977. <dd><p>Callback for request to change an objects geometry scale. The object
  978. is re-scaled and replotted.</p>
  979. <table class="docutils field-list" frame="void" rules="none">
  980. <col class="field-name" />
  981. <col class="field-body" />
  982. <tbody valign="top">
  983. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>widget</strong> &#8211; Ignored.</td>
  984. </tr>
  985. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  986. </tr>
  987. </tbody>
  988. </table>
  989. </dd></dl>
  990. <dl class="method">
  991. <dt id="FlatCAM.App.on_toggle_pointbox">
  992. <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>
  993. <dd><p>Callback for radio selection change between point and box in the
  994. Double-sided PCB tool. Updates the UI accordingly.</p>
  995. <table class="docutils field-list" frame="void" rules="none">
  996. <col class="field-name" />
  997. <col class="field-body" />
  998. <tbody valign="top">
  999. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>widget</strong> &#8211; Ignored.</td>
  1000. </tr>
  1001. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  1002. </tr>
  1003. </tbody>
  1004. </table>
  1005. </dd></dl>
  1006. <dl class="method">
  1007. <dt id="FlatCAM.App.on_toggle_units">
  1008. <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>
  1009. <dd><p>Callback for the Units radio-button change in the Options tab.
  1010. Changes the application&#8217;s default units or the current project&#8217;s units.
  1011. If changing the project&#8217;s units, the change propagates to all of
  1012. the objects in the project.</p>
  1013. <table class="docutils field-list" frame="void" rules="none">
  1014. <col class="field-name" />
  1015. <col class="field-body" />
  1016. <tbody valign="top">
  1017. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>widget</strong> &#8211; Ignored.</td>
  1018. </tr>
  1019. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  1020. </tr>
  1021. </tbody>
  1022. </table>
  1023. </dd></dl>
  1024. <dl class="method">
  1025. <dt id="FlatCAM.App.on_toolbar_replot">
  1026. <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>
  1027. <dd><p>Callback for toolbar button. Re-plots all objects.</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; The widget from which this was called.</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_tools_doublesided">
  1041. <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>
  1042. <dd><p>Callback for menu item Tools-&gt;Double Sided PCB Tool. Launches the
  1043. tool placing its UI in the &#8220;Tool&#8221; tab in the notebook.</p>
  1044. <table class="docutils field-list" frame="void" rules="none">
  1045. <col class="field-name" />
  1046. <col class="field-body" />
  1047. <tbody valign="top">
  1048. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>param</strong> &#8211; Ignored.</td>
  1049. </tr>
  1050. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  1051. </tr>
  1052. </tbody>
  1053. </table>
  1054. </dd></dl>
  1055. <dl class="method">
  1056. <dt id="FlatCAM.App.on_tree_selection_changed">
  1057. <tt class="descname">on_tree_selection_changed</tt><big>(</big><em>selection</em><big>)</big><a class="headerlink" href="#FlatCAM.App.on_tree_selection_changed" title="Permalink to this definition">¶</a></dt>
  1058. <dd><p>Callback for selection change in the project list. This changes
  1059. the currently selected FlatCAMObj.</p>
  1060. <table class="docutils field-list" frame="void" rules="none">
  1061. <col class="field-name" />
  1062. <col class="field-body" />
  1063. <tbody valign="top">
  1064. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>selection</strong> (<em>Gtk.TreeSelection</em>) &#8211; Selection associated to the project tree or list</td>
  1065. </tr>
  1066. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  1067. </tr>
  1068. </tbody>
  1069. </table>
  1070. </dd></dl>
  1071. <dl class="method">
  1072. <dt id="FlatCAM.App.on_update_plot">
  1073. <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>
  1074. <dd><p>Callback for button on form for all kinds of objects.
  1075. Re-plots the current object only.</p>
  1076. <table class="docutils field-list" frame="void" rules="none">
  1077. <col class="field-name" />
  1078. <col class="field-body" />
  1079. <tbody valign="top">
  1080. <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>
  1081. </tr>
  1082. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  1083. </tr>
  1084. </tbody>
  1085. </table>
  1086. </dd></dl>
  1087. <dl class="method">
  1088. <dt id="FlatCAM.App.on_zoom_fit">
  1089. <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>
  1090. <dd><p>Callback for zoom-out request. This can be either from the corresponding
  1091. 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>
  1092. with axes limits from the geometry bounds of all objects.</p>
  1093. <table class="docutils field-list" frame="void" rules="none">
  1094. <col class="field-name" />
  1095. <col class="field-body" />
  1096. <tbody valign="top">
  1097. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>event</strong> &#8211; Ignored.</td>
  1098. </tr>
  1099. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  1100. </tr>
  1101. </tbody>
  1102. </table>
  1103. </dd></dl>
  1104. <dl class="method">
  1105. <dt id="FlatCAM.App.on_zoom_in">
  1106. <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>
  1107. <dd><p>Callback for zoom-in request. This can be either from the corresponding
  1108. 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>
  1109. <table class="docutils field-list" frame="void" rules="none">
  1110. <col class="field-name" />
  1111. <col class="field-body" />
  1112. <tbody valign="top">
  1113. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>event</strong> &#8211; Ignored.</td>
  1114. </tr>
  1115. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  1116. </tr>
  1117. </tbody>
  1118. </table>
  1119. </dd></dl>
  1120. <dl class="method">
  1121. <dt id="FlatCAM.App.on_zoom_out">
  1122. <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>
  1123. <dd><p>Callback for zoom-out request. This can be either from the corresponding
  1124. 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>
  1125. <table class="docutils field-list" frame="void" rules="none">
  1126. <col class="field-name" />
  1127. <col class="field-body" />
  1128. <tbody valign="top">
  1129. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>event</strong> &#8211; Ignored.</td>
  1130. </tr>
  1131. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  1132. </tr>
  1133. </tbody>
  1134. </table>
  1135. </dd></dl>
  1136. <dl class="method">
  1137. <dt id="FlatCAM.App.open_project">
  1138. <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>
  1139. <dd><p>Loads a project from the specified file.</p>
  1140. <table class="docutils field-list" frame="void" rules="none">
  1141. <col class="field-name" />
  1142. <col class="field-body" />
  1143. <tbody valign="top">
  1144. <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>
  1145. </tr>
  1146. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  1147. </tr>
  1148. </tbody>
  1149. </table>
  1150. </dd></dl>
  1151. <dl class="method">
  1152. <dt id="FlatCAM.App.options2form">
  1153. <tt class="descname">options2form</tt><big>(</big><big>)</big><a class="headerlink" href="#FlatCAM.App.options2form" title="Permalink to this definition">¶</a></dt>
  1154. <dd><p>Sets the &#8216;Project Options&#8217; or &#8216;Application Defaults&#8217; form with values from
  1155. <tt class="docutils literal"><span class="pre">self.options</span></tt> or <tt class="docutils literal"><span class="pre">self.defaults</span></tt>.</p>
  1156. <table class="docutils field-list" frame="void" rules="none">
  1157. <col class="field-name" />
  1158. <col class="field-body" />
  1159. <tbody valign="top">
  1160. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  1161. </tr>
  1162. <tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">None</td>
  1163. </tr>
  1164. </tbody>
  1165. </table>
  1166. </dd></dl>
  1167. <dl class="method">
  1168. <dt id="FlatCAM.App.plot_all">
  1169. <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>
  1170. <dd><p>Re-generates all plots from all objects.</p>
  1171. <table class="docutils field-list" frame="void" rules="none">
  1172. <col class="field-name" />
  1173. <col class="field-body" />
  1174. <tbody valign="top">
  1175. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  1176. </tr>
  1177. </tbody>
  1178. </table>
  1179. </dd></dl>
  1180. <dl class="method">
  1181. <dt id="FlatCAM.App.populate_objects_combo">
  1182. <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>
  1183. <dd><p>Populates a Gtk.Comboboxtext with the list of the object in the project.</p>
  1184. <table class="docutils field-list" frame="void" rules="none">
  1185. <col class="field-name" />
  1186. <col class="field-body" />
  1187. <tbody valign="top">
  1188. <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>
  1189. </tr>
  1190. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  1191. </tr>
  1192. </tbody>
  1193. </table>
  1194. </dd></dl>
  1195. <dl class="method">
  1196. <dt id="FlatCAM.App.read_form">
  1197. <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>
  1198. <dd><p>Reads the options form into self.defaults/self.options.</p>
  1199. <table class="docutils field-list" frame="void" rules="none">
  1200. <col class="field-name" />
  1201. <col class="field-body" />
  1202. <tbody valign="top">
  1203. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  1204. </tr>
  1205. <tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">None</td>
  1206. </tr>
  1207. </tbody>
  1208. </table>
  1209. </dd></dl>
  1210. <dl class="method">
  1211. <dt id="FlatCAM.App.read_form_item">
  1212. <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>
  1213. <dd><p>Reads the value of a form item in the defaults/options form and
  1214. saves it to the corresponding dictionary.</p>
  1215. <table class="docutils field-list" frame="void" rules="none">
  1216. <col class="field-name" />
  1217. <col class="field-body" />
  1218. <tbody valign="top">
  1219. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  1220. <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
  1221. <tt class="docutils literal"><span class="pre">self.options</span></tt>.</li>
  1222. <li><strong>dest</strong> (<em>dict</em>) &#8211; Dictionary to which to save the value.</li>
  1223. </ul>
  1224. </td>
  1225. </tr>
  1226. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">None</p>
  1227. </td>
  1228. </tr>
  1229. </tbody>
  1230. </table>
  1231. </dd></dl>
  1232. <dl class="method">
  1233. <dt id="FlatCAM.App.save_project">
  1234. <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>
  1235. <dd><p>Saves the current project to the specified file.</p>
  1236. <table class="docutils field-list" frame="void" rules="none">
  1237. <col class="field-name" />
  1238. <col class="field-body" />
  1239. <tbody valign="top">
  1240. <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>
  1241. </tr>
  1242. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  1243. </tr>
  1244. </tbody>
  1245. </table>
  1246. </dd></dl>
  1247. <dl class="method">
  1248. <dt id="FlatCAM.App.set_form_item">
  1249. <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>
  1250. <dd><p>Sets a form item &#8216;name&#8217; in the GUI with the given &#8216;value&#8217;. The syntax of
  1251. form names in the GUI is &lt;kind&gt;_app_&lt;name&gt;, where kind is one of: rb (radio button),
  1252. cb (check button), entry_eval or entry_text (entry), combo (combo box). name is
  1253. whatever name it&#8217;s been given. For self.defaults, name is a key in the dictionary.</p>
  1254. <table class="docutils field-list" frame="void" rules="none">
  1255. <col class="field-name" />
  1256. <col class="field-body" />
  1257. <tbody valign="top">
  1258. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  1259. <li><strong>name</strong> (<em>str</em>) &#8211; Name of the form field.</li>
  1260. <li><strong>value</strong> (<em>Depends on field kind.</em>) &#8211; The value to set the form field to.</li>
  1261. </ul>
  1262. </td>
  1263. </tr>
  1264. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">None</p>
  1265. </td>
  1266. </tr>
  1267. </tbody>
  1268. </table>
  1269. </dd></dl>
  1270. <dl class="method">
  1271. <dt id="FlatCAM.App.set_list_selection">
  1272. <tt class="descname">set_list_selection</tt><big>(</big><em>name</em><big>)</big><a class="headerlink" href="#FlatCAM.App.set_list_selection" title="Permalink to this definition">¶</a></dt>
  1273. <dd><p>Marks a given object as selected in the list ob objects
  1274. in the GUI. This selection will in turn trigger
  1275. <tt class="docutils literal"><span class="pre">self.on_tree_selection_changed()</span></tt>.</p>
  1276. <table class="docutils field-list" frame="void" rules="none">
  1277. <col class="field-name" />
  1278. <col class="field-body" />
  1279. <tbody valign="top">
  1280. <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>
  1281. </tr>
  1282. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  1283. </tr>
  1284. </tbody>
  1285. </table>
  1286. </dd></dl>
  1287. <dl class="method">
  1288. <dt id="FlatCAM.App.set_progress_bar">
  1289. <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>
  1290. <dd><p>Sets the application&#8217;s progress bar to a given frac_digits and text.</p>
  1291. <table class="docutils field-list" frame="void" rules="none">
  1292. <col class="field-name" />
  1293. <col class="field-body" />
  1294. <tbody valign="top">
  1295. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  1296. <li><strong>percentage</strong> (<em>float</em>) &#8211; The frac_digits (0.0-1.0) of the progress.</li>
  1297. <li><strong>text</strong> (<em>str</em>) &#8211; Text to display on the progress bar.</li>
  1298. </ul>
  1299. </td>
  1300. </tr>
  1301. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"></p>
  1302. </td>
  1303. </tr>
  1304. </tbody>
  1305. </table>
  1306. </dd></dl>
  1307. <dl class="method">
  1308. <dt id="FlatCAM.App.setup_component_editor">
  1309. <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>
  1310. <dd><p>Initial configuration of the component editor. Creates
  1311. a page titled &#8220;Selection&#8221; on the notebook on the left
  1312. side of the main window.</p>
  1313. <table class="docutils field-list" frame="void" rules="none">
  1314. <col class="field-name" />
  1315. <col class="field-body" />
  1316. <tbody valign="top">
  1317. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  1318. </tr>
  1319. </tbody>
  1320. </table>
  1321. </dd></dl>
  1322. <dl class="method">
  1323. <dt id="FlatCAM.App.setup_obj_classes">
  1324. <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>
  1325. <dd><p>Sets up application specifics on the FlatCAMObj class.</p>
  1326. <table class="docutils field-list" frame="void" rules="none">
  1327. <col class="field-name" />
  1328. <col class="field-body" />
  1329. <tbody valign="top">
  1330. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  1331. </tr>
  1332. </tbody>
  1333. </table>
  1334. </dd></dl>
  1335. <dl class="method">
  1336. <dt id="FlatCAM.App.setup_plot">
  1337. <tt class="descname">setup_plot</tt><big>(</big><big>)</big><a class="headerlink" href="#FlatCAM.App.setup_plot" title="Permalink to this definition">¶</a></dt>
  1338. <dd><p>Sets up the main plotting area by creating a Matplotlib
  1339. figure in self.canvas, adding axes and configuring them.
  1340. These axes should not be ploted on and are just there to
  1341. display the axes ticks and grid.</p>
  1342. <table class="docutils field-list" frame="void" rules="none">
  1343. <col class="field-name" />
  1344. <col class="field-body" />
  1345. <tbody valign="top">
  1346. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  1347. </tr>
  1348. <tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">None</td>
  1349. </tr>
  1350. </tbody>
  1351. </table>
  1352. </dd></dl>
  1353. <dl class="method">
  1354. <dt id="FlatCAM.App.setup_project_list">
  1355. <tt class="descname">setup_project_list</tt><big>(</big><big>)</big><a class="headerlink" href="#FlatCAM.App.setup_project_list" title="Permalink to this definition">¶</a></dt>
  1356. <dd><p>Sets up list or Tree where whatever has been loaded or created is
  1357. displayed.</p>
  1358. <table class="docutils field-list" frame="void" rules="none">
  1359. <col class="field-name" />
  1360. <col class="field-body" />
  1361. <tbody valign="top">
  1362. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  1363. </tr>
  1364. </tbody>
  1365. </table>
  1366. </dd></dl>
  1367. <dl class="method">
  1368. <dt id="FlatCAM.App.zoom">
  1369. <tt class="descname">zoom</tt><big>(</big><em>factor</em>, <em>center=None</em><big>)</big><a class="headerlink" href="#FlatCAM.App.zoom" title="Permalink to this definition">¶</a></dt>
  1370. <dd><p>Zooms the plot by factor around a given
  1371. center point. Takes care of re-drawing.</p>
  1372. <table class="docutils field-list" frame="void" rules="none">
  1373. <col class="field-name" />
  1374. <col class="field-body" />
  1375. <tbody valign="top">
  1376. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  1377. <li><strong>factor</strong> (<em>float</em>) &#8211; Number by which to scale the plot.</li>
  1378. <li><strong>center</strong> (<em>list</em>) &#8211; Coordinates [x, y] of the point around which to scale the plot.</li>
  1379. </ul>
  1380. </td>
  1381. </tr>
  1382. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">None</p>
  1383. </td>
  1384. </tr>
  1385. </tbody>
  1386. </table>
  1387. </dd></dl>
  1388. </dd></dl>
  1389. <dl class="class">
  1390. <dt id="FlatCAM.Geometry">
  1391. <em class="property">class </em><tt class="descclassname">FlatCAM.</tt><tt class="descname">Geometry</tt><a class="headerlink" href="#FlatCAM.Geometry" title="Permalink to this definition">¶</a></dt>
  1392. <dd><dl class="method">
  1393. <dt id="FlatCAM.Geometry.bounds">
  1394. <tt class="descname">bounds</tt><big>(</big><big>)</big><a class="headerlink" href="#FlatCAM.Geometry.bounds" title="Permalink to this definition">¶</a></dt>
  1395. <dd><p>Returns coordinates of rectangular bounds
  1396. of geometry: (xmin, ymin, xmax, ymax).</p>
  1397. </dd></dl>
  1398. <dl class="method">
  1399. <dt id="FlatCAM.Geometry.clear_polygon">
  1400. <tt class="descname">clear_polygon</tt><big>(</big><em>polygon</em>, <em>tooldia</em>, <em>overlap=0.15</em><big>)</big><a class="headerlink" href="#FlatCAM.Geometry.clear_polygon" title="Permalink to this definition">¶</a></dt>
  1401. <dd><p>Creates geometry inside a polygon for a tool to cover
  1402. the whole area.</p>
  1403. </dd></dl>
  1404. <dl class="method">
  1405. <dt id="FlatCAM.Geometry.convert_units">
  1406. <tt class="descname">convert_units</tt><big>(</big><em>units</em><big>)</big><a class="headerlink" href="#FlatCAM.Geometry.convert_units" title="Permalink to this definition">¶</a></dt>
  1407. <dd><p>Converts the units of the object to <tt class="docutils literal"><span class="pre">units</span></tt> by scaling all
  1408. the geometry appropriately. This call <tt class="docutils literal"><span class="pre">scale()</span></tt>. Don&#8217;t call
  1409. it again in descendents.</p>
  1410. <table class="docutils field-list" frame="void" rules="none">
  1411. <col class="field-name" />
  1412. <col class="field-body" />
  1413. <tbody valign="top">
  1414. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>units</strong> (<em>str</em>) &#8211; &#8220;IN&#8221; or &#8220;MM&#8221;</td>
  1415. </tr>
  1416. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Scaling factor resulting from unit change.</td>
  1417. </tr>
  1418. <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">float</td>
  1419. </tr>
  1420. </tbody>
  1421. </table>
  1422. </dd></dl>
  1423. <dl class="method">
  1424. <dt id="FlatCAM.Geometry.from_dict">
  1425. <tt class="descname">from_dict</tt><big>(</big><em>d</em><big>)</big><a class="headerlink" href="#FlatCAM.Geometry.from_dict" title="Permalink to this definition">¶</a></dt>
  1426. <dd><p>Sets object&#8217;s attributes from a dictionary.
  1427. Attributes to include are listed in <tt class="docutils literal"><span class="pre">self.ser_attrs</span></tt>.</p>
  1428. </dd></dl>
  1429. <dl class="method">
  1430. <dt id="FlatCAM.Geometry.get_empty_area">
  1431. <tt class="descname">get_empty_area</tt><big>(</big><em>boundary=None</em><big>)</big><a class="headerlink" href="#FlatCAM.Geometry.get_empty_area" title="Permalink to this definition">¶</a></dt>
  1432. <dd><p>Returns the complement of self.solid_geometry within
  1433. the given boundary polygon. If not specified, it defaults to
  1434. the rectangular bounding box of self.solid_geometry.</p>
  1435. </dd></dl>
  1436. <dl class="method">
  1437. <dt id="FlatCAM.Geometry.isolation_geometry">
  1438. <tt class="descname">isolation_geometry</tt><big>(</big><em>offset</em><big>)</big><a class="headerlink" href="#FlatCAM.Geometry.isolation_geometry" title="Permalink to this definition">¶</a></dt>
  1439. <dd><p>Creates contours around geometry at a given
  1440. offset distance.</p>
  1441. <table class="docutils field-list" frame="void" rules="none">
  1442. <col class="field-name" />
  1443. <col class="field-body" />
  1444. <tbody valign="top">
  1445. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>offset</strong> (<em>float</em>) &#8211; Offset distance.</td>
  1446. </tr>
  1447. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">The buffered geometry.</td>
  1448. </tr>
  1449. <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">Shapely.MultiPolygon or Shapely.Polygon</td>
  1450. </tr>
  1451. </tbody>
  1452. </table>
  1453. </dd></dl>
  1454. <dl class="method">
  1455. <dt id="FlatCAM.Geometry.offset">
  1456. <tt class="descname">offset</tt><big>(</big><em>vect</em><big>)</big><a class="headerlink" href="#FlatCAM.Geometry.offset" title="Permalink to this definition">¶</a></dt>
  1457. <dd><p>Offset the geometry by the given vector. Override this method.</p>
  1458. <table class="docutils field-list" frame="void" rules="none">
  1459. <col class="field-name" />
  1460. <col class="field-body" />
  1461. <tbody valign="top">
  1462. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>vect</strong> (<em>tuple</em>) &#8211; (x, y) vector by which to offset the object.</td>
  1463. </tr>
  1464. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  1465. </tr>
  1466. </tbody>
  1467. </table>
  1468. </dd></dl>
  1469. <dl class="method">
  1470. <dt id="FlatCAM.Geometry.scale">
  1471. <tt class="descname">scale</tt><big>(</big><em>factor</em><big>)</big><a class="headerlink" href="#FlatCAM.Geometry.scale" title="Permalink to this definition">¶</a></dt>
  1472. <dd><p>Scales all of the object&#8217;s geometry by a given factor. Override
  1473. this method.
  1474. :param factor: Number by which to scale.
  1475. :type factor: float
  1476. :return: None
  1477. :rtype: None</p>
  1478. </dd></dl>
  1479. <dl class="method">
  1480. <dt id="FlatCAM.Geometry.size">
  1481. <tt class="descname">size</tt><big>(</big><big>)</big><a class="headerlink" href="#FlatCAM.Geometry.size" title="Permalink to this definition">¶</a></dt>
  1482. <dd><p>Returns (width, height) of rectangular
  1483. bounds of geometry.</p>
  1484. </dd></dl>
  1485. <dl class="method">
  1486. <dt id="FlatCAM.Geometry.to_dict">
  1487. <tt class="descname">to_dict</tt><big>(</big><big>)</big><a class="headerlink" href="#FlatCAM.Geometry.to_dict" title="Permalink to this definition">¶</a></dt>
  1488. <dd><p>Returns a respresentation of the object as a dictionary.
  1489. Attributes to include are listed in <tt class="docutils literal"><span class="pre">self.ser_attrs</span></tt>.</p>
  1490. <table class="docutils field-list" frame="void" rules="none">
  1491. <col class="field-name" />
  1492. <col class="field-body" />
  1493. <tbody valign="top">
  1494. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">A dictionary-encoded copy of the object.</td>
  1495. </tr>
  1496. <tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">dict</td>
  1497. </tr>
  1498. </tbody>
  1499. </table>
  1500. </dd></dl>
  1501. </dd></dl>
  1502. <dl class="class">
  1503. <dt id="FlatCAM.Gerber">
  1504. <em class="property">class </em><tt class="descclassname">FlatCAM.</tt><tt class="descname">Gerber</tt><big>(</big><em>Geometry</em><big>)</big><a class="headerlink" href="#FlatCAM.Gerber" title="Permalink to this definition">¶</a></dt>
  1505. <dd><p><strong>ATTRIBUTES</strong></p>
  1506. <ul class="simple">
  1507. <li><tt class="docutils literal"><span class="pre">apertures</span></tt> (dict): The keys are names/identifiers of each aperture.
  1508. The values are dictionaries key/value pairs which describe the aperture. The
  1509. type key is always present and the rest depend on the key:</li>
  1510. </ul>
  1511. <table border="1" class="docutils">
  1512. <colgroup>
  1513. <col width="24%" />
  1514. <col width="76%" />
  1515. </colgroup>
  1516. <thead valign="bottom">
  1517. <tr class="row-odd"><th class="head">Key</th>
  1518. <th class="head">Value</th>
  1519. </tr>
  1520. </thead>
  1521. <tbody valign="top">
  1522. <tr class="row-even"><td>type</td>
  1523. <td>(str) &#8220;C&#8221;, &#8220;R&#8221;, or &#8220;O&#8221;</td>
  1524. </tr>
  1525. <tr class="row-odd"><td>others</td>
  1526. <td>Depend on <tt class="docutils literal"><span class="pre">type</span></tt></td>
  1527. </tr>
  1528. </tbody>
  1529. </table>
  1530. <ul class="simple">
  1531. <li><tt class="docutils literal"><span class="pre">paths</span></tt> (list): A path is described by a line an aperture that follows that
  1532. line. Each paths[i] is a dictionary:</li>
  1533. </ul>
  1534. <table border="1" class="docutils">
  1535. <colgroup>
  1536. <col width="20%" />
  1537. <col width="80%" />
  1538. </colgroup>
  1539. <thead valign="bottom">
  1540. <tr class="row-odd"><th class="head">Key</th>
  1541. <th class="head">Value</th>
  1542. </tr>
  1543. </thead>
  1544. <tbody valign="top">
  1545. <tr class="row-even"><td>linestring</td>
  1546. <td>(Shapely.LineString) The actual path.</td>
  1547. </tr>
  1548. <tr class="row-odd"><td>aperture</td>
  1549. <td>(str) The key for an aperture in apertures.</td>
  1550. </tr>
  1551. </tbody>
  1552. </table>
  1553. <ul class="simple">
  1554. <li><tt class="docutils literal"><span class="pre">flashes</span></tt> (list): Flashes are single-point strokes of an aperture. Each
  1555. is a dictionary:</li>
  1556. </ul>
  1557. <table border="1" class="docutils">
  1558. <colgroup>
  1559. <col width="20%" />
  1560. <col width="80%" />
  1561. </colgroup>
  1562. <thead valign="bottom">
  1563. <tr class="row-odd"><th class="head">Key</th>
  1564. <th class="head">Value</th>
  1565. </tr>
  1566. </thead>
  1567. <tbody valign="top">
  1568. <tr class="row-even"><td>loc</td>
  1569. <td>(list) [x (float), y (float)] coordinates.</td>
  1570. </tr>
  1571. <tr class="row-odd"><td>aperture</td>
  1572. <td>(str) The key for an aperture in apertures.</td>
  1573. </tr>
  1574. </tbody>
  1575. </table>
  1576. <ul class="simple">
  1577. <li><tt class="docutils literal"><span class="pre">regions</span></tt> (list): Are surfaces defined by a polygon (Shapely.Polygon),
  1578. which have an exterior and zero or more interiors. An aperture is also
  1579. associated with a region. Each is a dictionary:</li>
  1580. </ul>
  1581. <table border="1" class="docutils">
  1582. <colgroup>
  1583. <col width="18%" />
  1584. <col width="82%" />
  1585. </colgroup>
  1586. <thead valign="bottom">
  1587. <tr class="row-odd"><th class="head">Key</th>
  1588. <th class="head">Value</th>
  1589. </tr>
  1590. </thead>
  1591. <tbody valign="top">
  1592. <tr class="row-even"><td>polygon</td>
  1593. <td>(Shapely.Polygon) The polygon defining the region.</td>
  1594. </tr>
  1595. <tr class="row-odd"><td>aperture</td>
  1596. <td>(str) The key for an aperture in apertures.</td>
  1597. </tr>
  1598. </tbody>
  1599. </table>
  1600. <ul class="simple">
  1601. <li><tt class="docutils literal"><span class="pre">flash_geometry</span></tt> (list): List of (Shapely) geometric object resulting
  1602. from <tt class="docutils literal"><span class="pre">flashes</span></tt>. These are generated from <tt class="docutils literal"><span class="pre">flashes</span></tt> in <tt class="docutils literal"><span class="pre">do_flashes()</span></tt>.</li>
  1603. <li><tt class="docutils literal"><span class="pre">buffered_paths</span></tt> (list): List of (Shapely) polygons resulting from
  1604. <em>buffering</em> (or thickening) the <tt class="docutils literal"><span class="pre">paths</span></tt> with the aperture. These are
  1605. generated from <tt class="docutils literal"><span class="pre">paths</span></tt> in <tt class="docutils literal"><span class="pre">buffer_paths()</span></tt>.</li>
  1606. </ul>
  1607. <p><strong>USAGE</strong>:</p>
  1608. <div class="highlight-python"><div class="highlight"><pre><span class="n">g</span> <span class="o">=</span> <span class="n">Gerber</span><span class="p">()</span>
  1609. <span class="n">g</span><span class="o">.</span><span class="n">parse_file</span><span class="p">(</span><span class="n">filename</span><span class="p">)</span>
  1610. <span class="n">g</span><span class="o">.</span><span class="n">create_geometry</span><span class="p">()</span>
  1611. <span class="n">do_something</span><span class="p">(</span><span class="n">s</span><span class="o">.</span><span class="n">solid_geometry</span><span class="p">)</span>
  1612. </pre></div>
  1613. </div>
  1614. <dl class="method">
  1615. <dt id="FlatCAM.Gerber.aperture_parse">
  1616. <tt class="descname">aperture_parse</tt><big>(</big><em>gline</em><big>)</big><a class="headerlink" href="#FlatCAM.Gerber.aperture_parse" title="Permalink to this definition">¶</a></dt>
  1617. <dd><p>Parse gerber aperture definition into dictionary of apertures.
  1618. The following kinds and their attributes are supported:</p>
  1619. <ul class="simple">
  1620. <li><em>Circular (C)</em>: size (float)</li>
  1621. <li><em>Rectangle (R)</em>: width (float), height (float)</li>
  1622. <li><em>Obround (O)</em>: width (float), height (float).</li>
  1623. </ul>
  1624. <table class="docutils field-list" frame="void" rules="none">
  1625. <col class="field-name" />
  1626. <col class="field-body" />
  1627. <tbody valign="top">
  1628. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>gline</strong> (<em>str</em>) &#8211; Line of Gerber code known to have an aperture definition.</td>
  1629. </tr>
  1630. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Identifier of the aperture.</td>
  1631. </tr>
  1632. <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">str</td>
  1633. </tr>
  1634. </tbody>
  1635. </table>
  1636. </dd></dl>
  1637. <dl class="method">
  1638. <dt id="FlatCAM.Gerber.buffer_paths">
  1639. <tt class="descname">buffer_paths</tt><big>(</big><big>)</big><a class="headerlink" href="#FlatCAM.Gerber.buffer_paths" title="Permalink to this definition">¶</a></dt>
  1640. <dd><p>This is part of the parsing process. &#8220;Thickens&#8221; the paths
  1641. by their appertures. This will only work for circular appertures.
  1642. :return: None</p>
  1643. </dd></dl>
  1644. <dl class="method">
  1645. <dt id="FlatCAM.Gerber.create_geometry">
  1646. <tt class="descname">create_geometry</tt><big>(</big><big>)</big><a class="headerlink" href="#FlatCAM.Gerber.create_geometry" title="Permalink to this definition">¶</a></dt>
  1647. <dd><p>Geometry from a Gerber file is made up entirely of polygons.
  1648. Every stroke (linear or circular) has an aperture which gives
  1649. it thickness. Additionally, aperture strokes have non-zero area,
  1650. and regions naturally do as well.</p>
  1651. <p>:rtype : None
  1652. :return: None</p>
  1653. </dd></dl>
  1654. <dl class="method">
  1655. <dt id="FlatCAM.Gerber.do_flashes">
  1656. <tt class="descname">do_flashes</tt><big>(</big><big>)</big><a class="headerlink" href="#FlatCAM.Gerber.do_flashes" title="Permalink to this definition">¶</a></dt>
  1657. <dd><p>Creates geometry for Gerber flashes (aperture on a single point).</p>
  1658. </dd></dl>
  1659. <dl class="method">
  1660. <dt id="FlatCAM.Gerber.fix_regions">
  1661. <tt class="descname">fix_regions</tt><big>(</big><big>)</big><a class="headerlink" href="#FlatCAM.Gerber.fix_regions" title="Permalink to this definition">¶</a></dt>
  1662. <dd><p>Overwrites the region polygons with fixed
  1663. versions if found to be invalid (according to Shapely).</p>
  1664. </dd></dl>
  1665. <dl class="attribute">
  1666. <dt id="FlatCAM.Gerber.frac_digits">
  1667. <tt class="descname">frac_digits</tt><em class="property"> = None</em><a class="headerlink" href="#FlatCAM.Gerber.frac_digits" title="Permalink to this definition">¶</a></dt>
  1668. <dd><p>Number of fraction digits in Gerber numbers. Used during parsing.</p>
  1669. </dd></dl>
  1670. <dl class="method">
  1671. <dt id="FlatCAM.Gerber.get_bounding_box">
  1672. <tt class="descname">get_bounding_box</tt><big>(</big><em>margin=0.0</em>, <em>rounded=False</em><big>)</big><a class="headerlink" href="#FlatCAM.Gerber.get_bounding_box" title="Permalink to this definition">¶</a></dt>
  1673. <dd><p>Creates and returns a rectangular polygon bounding at a distance of
  1674. margin from the object&#8217;s <tt class="docutils literal"><span class="pre">solid_geometry</span></tt>. If margin &gt; 0, the polygon
  1675. can optionally have rounded corners of radius equal to margin.</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"><ul class="first simple">
  1681. <li><strong>margin</strong> (<em>float</em>) &#8211; Distance to enlarge the rectangular bounding
  1682. box in both positive and negative, x and y axes.</li>
  1683. <li><strong>rounded</strong> (<em>bool</em>) &#8211; Wether or not to have rounded corners.</li>
  1684. </ul>
  1685. </td>
  1686. </tr>
  1687. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The bounding box.</p>
  1688. </td>
  1689. </tr>
  1690. <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">Shapely.Polygon</p>
  1691. </td>
  1692. </tr>
  1693. </tbody>
  1694. </table>
  1695. </dd></dl>
  1696. <dl class="attribute">
  1697. <dt id="FlatCAM.Gerber.int_digits">
  1698. <tt class="descname">int_digits</tt><em class="property"> = None</em><a class="headerlink" href="#FlatCAM.Gerber.int_digits" title="Permalink to this definition">¶</a></dt>
  1699. <dd><p>Number of integer digits in Gerber numbers. Used during parsing.</p>
  1700. </dd></dl>
  1701. <dl class="method">
  1702. <dt id="FlatCAM.Gerber.offset">
  1703. <tt class="descname">offset</tt><big>(</big><em>vect</em><big>)</big><a class="headerlink" href="#FlatCAM.Gerber.offset" title="Permalink to this definition">¶</a></dt>
  1704. <dd><p>Offsets the objects&#8217; geometry on the XY plane by a given vector.
  1705. These are:</p>
  1706. <ul class="simple">
  1707. <li><tt class="docutils literal"><span class="pre">paths</span></tt></li>
  1708. <li><tt class="docutils literal"><span class="pre">regions</span></tt></li>
  1709. <li><tt class="docutils literal"><span class="pre">flashes</span></tt></li>
  1710. </ul>
  1711. <p>Then <tt class="docutils literal"><span class="pre">buffered_paths</span></tt>, <tt class="docutils literal"><span class="pre">flash_geometry</span></tt> and <tt class="docutils literal"><span class="pre">solid_geometry</span></tt>
  1712. are re-created with <tt class="docutils literal"><span class="pre">self.create_geometry()</span></tt>.
  1713. :param vect: (x, y) offset vector.
  1714. :type vect: tuple
  1715. :return: None</p>
  1716. </dd></dl>
  1717. <dl class="method">
  1718. <dt id="FlatCAM.Gerber.parse_file">
  1719. <tt class="descname">parse_file</tt><big>(</big><em>filename</em><big>)</big><a class="headerlink" href="#FlatCAM.Gerber.parse_file" title="Permalink to this definition">¶</a></dt>
  1720. <dd><p>Calls Gerber.parse_lines() with array of lines
  1721. read from the given file.</p>
  1722. </dd></dl>
  1723. <dl class="method">
  1724. <dt id="FlatCAM.Gerber.parse_lines">
  1725. <tt class="descname">parse_lines</tt><big>(</big><em>glines</em><big>)</big><a class="headerlink" href="#FlatCAM.Gerber.parse_lines" title="Permalink to this definition">¶</a></dt>
  1726. <dd><p>Main Gerber parser. Reads Gerber and populates <tt class="docutils literal"><span class="pre">self.paths</span></tt>, <tt class="docutils literal"><span class="pre">self.apertures</span></tt>,
  1727. <tt class="docutils literal"><span class="pre">self.flashes</span></tt>, <tt class="docutils literal"><span class="pre">self.regions</span></tt> and <tt class="docutils literal"><span class="pre">self.units</span></tt>.</p>
  1728. <table class="docutils field-list" frame="void" rules="none">
  1729. <col class="field-name" />
  1730. <col class="field-body" />
  1731. <tbody valign="top">
  1732. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>glines</strong> &#8211; Gerber code as list of strings, each</td>
  1733. </tr>
  1734. </tbody>
  1735. </table>
  1736. <p>element being one line of the source file.
  1737. :type glines: list
  1738. :return: None
  1739. :rtype: None</p>
  1740. </dd></dl>
  1741. <dl class="method">
  1742. <dt id="FlatCAM.Gerber.scale">
  1743. <tt class="descname">scale</tt><big>(</big><em>factor</em><big>)</big><a class="headerlink" href="#FlatCAM.Gerber.scale" title="Permalink to this definition">¶</a></dt>
  1744. <dd><p>Scales the objects&#8217; geometry on the XY plane by a given factor.
  1745. These are:</p>
  1746. <ul class="simple">
  1747. <li><tt class="docutils literal"><span class="pre">apertures</span></tt></li>
  1748. <li><tt class="docutils literal"><span class="pre">paths</span></tt></li>
  1749. <li><tt class="docutils literal"><span class="pre">regions</span></tt></li>
  1750. <li><tt class="docutils literal"><span class="pre">flashes</span></tt></li>
  1751. </ul>
  1752. <p>Then <tt class="docutils literal"><span class="pre">buffered_paths</span></tt>, <tt class="docutils literal"><span class="pre">flash_geometry</span></tt> and <tt class="docutils literal"><span class="pre">solid_geometry</span></tt>
  1753. are re-created with <tt class="docutils literal"><span class="pre">self.create_geometry()</span></tt>.
  1754. :param factor: Number by which to scale.
  1755. :type factor: float
  1756. :rtype : None</p>
  1757. </dd></dl>
  1758. </dd></dl>
  1759. <dl class="class">
  1760. <dt id="FlatCAM.Excellon">
  1761. <em class="property">class </em><tt class="descclassname">FlatCAM.</tt><tt class="descname">Excellon</tt><a class="headerlink" href="#FlatCAM.Excellon" title="Permalink to this definition">¶</a></dt>
  1762. <dd><p><em>ATTRIBUTES</em></p>
  1763. <ul class="simple">
  1764. <li><tt class="docutils literal"><span class="pre">tools</span></tt> (dict): The key is the tool name and the value is
  1765. the size (diameter).</li>
  1766. <li><tt class="docutils literal"><span class="pre">drills</span></tt> (list): Each is a dictionary:</li>
  1767. </ul>
  1768. <table border="1" class="docutils">
  1769. <colgroup>
  1770. <col width="31%" />
  1771. <col width="69%" />
  1772. </colgroup>
  1773. <thead valign="bottom">
  1774. <tr class="row-odd"><th class="head">Key</th>
  1775. <th class="head">Value</th>
  1776. </tr>
  1777. </thead>
  1778. <tbody valign="top">
  1779. <tr class="row-even"><td>point</td>
  1780. <td>(Shapely.Point) Where to drill</td>
  1781. </tr>
  1782. <tr class="row-odd"><td>tool</td>
  1783. <td>(str) A key in <tt class="docutils literal"><span class="pre">tools</span></tt></td>
  1784. </tr>
  1785. </tbody>
  1786. </table>
  1787. <dl class="method">
  1788. <dt id="FlatCAM.Excellon.offset">
  1789. <tt class="descname">offset</tt><big>(</big><em>vect</em><big>)</big><a class="headerlink" href="#FlatCAM.Excellon.offset" title="Permalink to this definition">¶</a></dt>
  1790. <dd><p>Offsets geometry on the XY plane in the object by a given vector.</p>
  1791. <table class="docutils field-list" frame="void" rules="none">
  1792. <col class="field-name" />
  1793. <col class="field-body" />
  1794. <tbody valign="top">
  1795. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>vect</strong> (<em>tuple</em>) &#8211; (x, y) offset vector.</td>
  1796. </tr>
  1797. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  1798. </tr>
  1799. </tbody>
  1800. </table>
  1801. </dd></dl>
  1802. <dl class="method">
  1803. <dt id="FlatCAM.Excellon.parse_lines">
  1804. <tt class="descname">parse_lines</tt><big>(</big><em>elines</em><big>)</big><a class="headerlink" href="#FlatCAM.Excellon.parse_lines" title="Permalink to this definition">¶</a></dt>
  1805. <dd><p>Main Excellon parser.</p>
  1806. </dd></dl>
  1807. <dl class="method">
  1808. <dt id="FlatCAM.Excellon.scale">
  1809. <tt class="descname">scale</tt><big>(</big><em>factor</em><big>)</big><a class="headerlink" href="#FlatCAM.Excellon.scale" title="Permalink to this definition">¶</a></dt>
  1810. <dd><p>Scales geometry on the XY plane in the object by a given factor.
  1811. Tool sizes, feedrates an Z-plane dimensions are untouched.</p>
  1812. <table class="docutils field-list" frame="void" rules="none">
  1813. <col class="field-name" />
  1814. <col class="field-body" />
  1815. <tbody valign="top">
  1816. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>factor</strong> (<em>float</em>) &#8211; Number by which to scale the object.</td>
  1817. </tr>
  1818. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  1819. </tr>
  1820. <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">NOne</td>
  1821. </tr>
  1822. </tbody>
  1823. </table>
  1824. </dd></dl>
  1825. </dd></dl>
  1826. <dl class="class">
  1827. <dt id="FlatCAM.CNCjob">
  1828. <em class="property">class </em><tt class="descclassname">FlatCAM.</tt><tt class="descname">CNCjob</tt><big>(</big><em>units='in'</em>, <em>kind='generic'</em>, <em>z_move=0.1</em>, <em>feedrate=3.0</em>, <em>z_cut=-0.002</em>, <em>tooldia=0.0</em><big>)</big><a class="headerlink" href="#FlatCAM.CNCjob" title="Permalink to this definition">¶</a></dt>
  1829. <dd><p>Represents work to be done by a CNC machine.</p>
  1830. <p><em>ATTRIBUTES</em></p>
  1831. <ul class="simple">
  1832. <li><tt class="docutils literal"><span class="pre">gcode_parsed</span></tt> (list): Each is a dictionary:</li>
  1833. </ul>
  1834. <table border="1" class="docutils">
  1835. <colgroup>
  1836. <col width="34%" />
  1837. <col width="66%" />
  1838. </colgroup>
  1839. <thead valign="bottom">
  1840. <tr class="row-odd"><th class="head">Key</th>
  1841. <th class="head">Value</th>
  1842. </tr>
  1843. </thead>
  1844. <tbody valign="top">
  1845. <tr class="row-even"><td>geom</td>
  1846. <td>(Shapely.LineString) Tool path (XY plane)</td>
  1847. </tr>
  1848. <tr class="row-odd"><td>kind</td>
  1849. <td>(string) &#8220;AB&#8221;, A is &#8220;T&#8221; (travel) or
  1850. &#8220;C&#8221; (cut). B is &#8220;F&#8221; (fast) or &#8220;S&#8221; (slow).</td>
  1851. </tr>
  1852. </tbody>
  1853. </table>
  1854. <dl class="method">
  1855. <dt id="FlatCAM.CNCjob.gcode_parse">
  1856. <tt class="descname">gcode_parse</tt><big>(</big><big>)</big><a class="headerlink" href="#FlatCAM.CNCjob.gcode_parse" title="Permalink to this definition">¶</a></dt>
  1857. <dd><p>G-Code parser (from self.gcode). Generates dictionary with
  1858. single-segment LineString&#8217;s and &#8220;kind&#8221; indicating cut or travel,
  1859. fast or feedrate speed.</p>
  1860. </dd></dl>
  1861. <dl class="method">
  1862. <dt id="FlatCAM.CNCjob.generate_from_excellon">
  1863. <tt class="descname">generate_from_excellon</tt><big>(</big><em>exobj</em><big>)</big><a class="headerlink" href="#FlatCAM.CNCjob.generate_from_excellon" title="Permalink to this definition">¶</a></dt>
  1864. <dd><p>Generates G-code for drilling from Excellon object.
  1865. self.gcode becomes a list, each element is a
  1866. different job for each tool in the excellon code.</p>
  1867. </dd></dl>
  1868. <dl class="method">
  1869. <dt id="FlatCAM.CNCjob.generate_from_excellon_by_tool">
  1870. <tt class="descname">generate_from_excellon_by_tool</tt><big>(</big><em>exobj</em>, <em>tools='all'</em><big>)</big><a class="headerlink" href="#FlatCAM.CNCjob.generate_from_excellon_by_tool" title="Permalink to this definition">¶</a></dt>
  1871. <dd><p>Creates gcode for this object from an Excellon object
  1872. for the specified tools.</p>
  1873. <table class="docutils field-list" frame="void" rules="none">
  1874. <col class="field-name" />
  1875. <col class="field-body" />
  1876. <tbody valign="top">
  1877. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  1878. <li><strong>exobj</strong> (<em>Excellon</em>) &#8211; Excellon object to process</li>
  1879. <li><strong>tools</strong> &#8211; Comma separated tool names</li>
  1880. </ul>
  1881. </td>
  1882. </tr>
  1883. <tr class="field-even field"><th class="field-name">Type:</th><td class="field-body"><p class="first">tools: str</p>
  1884. </td>
  1885. </tr>
  1886. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">None</p>
  1887. </td>
  1888. </tr>
  1889. <tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">None</p>
  1890. </td>
  1891. </tr>
  1892. </tbody>
  1893. </table>
  1894. </dd></dl>
  1895. <dl class="method">
  1896. <dt id="FlatCAM.CNCjob.generate_from_geometry">
  1897. <tt class="descname">generate_from_geometry</tt><big>(</big><em>geometry</em>, <em>append=True</em>, <em>tooldia=None</em>, <em>tolerance=0</em><big>)</big><a class="headerlink" href="#FlatCAM.CNCjob.generate_from_geometry" title="Permalink to this definition">¶</a></dt>
  1898. <dd><p>Generates G-Code from a Geometry object. Stores in <tt class="docutils literal"><span class="pre">self.gcode</span></tt>.</p>
  1899. <table class="docutils field-list" frame="void" rules="none">
  1900. <col class="field-name" />
  1901. <col class="field-body" />
  1902. <tbody valign="top">
  1903. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
  1904. <li><strong>geometry</strong> (<em>Geometry</em>) &#8211; Geometry defining the toolpath</li>
  1905. <li><strong>append</strong> (<em>bool</em>) &#8211; Wether to append to self.gcode or re-write it.</li>
  1906. <li><strong>tooldia</strong> &#8211; If given, sets the tooldia property but does</li>
  1907. </ul>
  1908. </td>
  1909. </tr>
  1910. </tbody>
  1911. </table>
  1912. <p>not affect the process in any other way.
  1913. :type tooldia: bool
  1914. :param tolerance: All points in the simplified object will be within the
  1915. tolerance distance of the original geometry.
  1916. :return: None
  1917. :rtype: None</p>
  1918. </dd></dl>
  1919. <dl class="method">
  1920. <dt id="FlatCAM.CNCjob.linear2gcode">
  1921. <tt class="descname">linear2gcode</tt><big>(</big><em>linear</em>, <em>tolerance=0</em><big>)</big><a class="headerlink" href="#FlatCAM.CNCjob.linear2gcode" title="Permalink to this definition">¶</a></dt>
  1922. <dd><p>Generates G-code to cut along the linear feature.</p>
  1923. <table class="docutils field-list" frame="void" rules="none">
  1924. <col class="field-name" />
  1925. <col class="field-body" />
  1926. <tbody valign="top">
  1927. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  1928. <li><strong>linear</strong> &#8211; The path to cut along.</li>
  1929. <li><strong>tolerance</strong> &#8211; All points in the simplified object will be within the</li>
  1930. </ul>
  1931. </td>
  1932. </tr>
  1933. <tr class="field-even field"><th class="field-name">Type:</th><td class="field-body"><p class="first last">Shapely.LinearRing or Shapely.Linear String</p>
  1934. </td>
  1935. </tr>
  1936. </tbody>
  1937. </table>
  1938. <p>tolerance distance of the original geometry.
  1939. :type tolerance: float
  1940. :return: G-code to cut alon the linear feature.
  1941. :rtype: str</p>
  1942. </dd></dl>
  1943. <dl class="method">
  1944. <dt id="FlatCAM.CNCjob.plot2">
  1945. <tt class="descname">plot2</tt><big>(</big><em>axes, tooldia=None, dpi=75, margin=0.1, color={'C': ['#5E6CFF', '#4650BD'], 'T': ['#F0E24D', '#B5AB3A']}, alpha={'C': 1.0, 'T': 0.3}, tool_tolerance=0.001</em><big>)</big><a class="headerlink" href="#FlatCAM.CNCjob.plot2" title="Permalink to this definition">¶</a></dt>
  1946. <dd><p>Plots the G-code job onto the given axes.</p>
  1947. <table class="docutils field-list" frame="void" rules="none">
  1948. <col class="field-name" />
  1949. <col class="field-body" />
  1950. <tbody valign="top">
  1951. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  1952. <li><strong>axes</strong> &#8211; Matplotlib axes on which to plot.</li>
  1953. <li><strong>tooldia</strong> &#8211; Tool diameter.</li>
  1954. <li><strong>dpi</strong> &#8211; Not used!</li>
  1955. <li><strong>margin</strong> &#8211; Not used!</li>
  1956. <li><strong>color</strong> &#8211; Color specification.</li>
  1957. <li><strong>alpha</strong> &#8211; Transparency specification.</li>
  1958. <li><strong>tool_tolerance</strong> &#8211; Tolerance when drawing the toolshape.</li>
  1959. </ul>
  1960. </td>
  1961. </tr>
  1962. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">None</p>
  1963. </td>
  1964. </tr>
  1965. </tbody>
  1966. </table>
  1967. </dd></dl>
  1968. <dl class="method">
  1969. <dt id="FlatCAM.CNCjob.polygon2gcode">
  1970. <tt class="descname">polygon2gcode</tt><big>(</big><em>polygon</em>, <em>tolerance=0</em><big>)</big><a class="headerlink" href="#FlatCAM.CNCjob.polygon2gcode" title="Permalink to this definition">¶</a></dt>
  1971. <dd><p>Creates G-Code for the exterior and all interior paths
  1972. of a polygon.</p>
  1973. <table class="docutils field-list" frame="void" rules="none">
  1974. <col class="field-name" />
  1975. <col class="field-body" />
  1976. <tbody valign="top">
  1977. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
  1978. <li><strong>polygon</strong> (<em>Shapely.Polygon</em>) &#8211; A Shapely.Polygon</li>
  1979. <li><strong>tolerance</strong> &#8211; All points in the simplified object will be within the</li>
  1980. </ul>
  1981. </td>
  1982. </tr>
  1983. </tbody>
  1984. </table>
  1985. <p>tolerance distance of the original geometry.
  1986. :type tolerance: float
  1987. :return: G-code to cut along polygon.
  1988. :rtype: str</p>
  1989. </dd></dl>
  1990. <dl class="method">
  1991. <dt id="FlatCAM.CNCjob.pre_parse">
  1992. <tt class="descname">pre_parse</tt><big>(</big><em>gtext</em><big>)</big><a class="headerlink" href="#FlatCAM.CNCjob.pre_parse" title="Permalink to this definition">¶</a></dt>
  1993. <dd><p>Separates parts of the G-Code text into a list of dictionaries.
  1994. Used by <tt class="docutils literal"><span class="pre">self.gcode_parse()</span></tt>.</p>
  1995. <table class="docutils field-list" frame="void" rules="none">
  1996. <col class="field-name" />
  1997. <col class="field-body" />
  1998. <tbody valign="top">
  1999. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>gtext</strong> &#8211; A single string with g-code</td>
  2000. </tr>
  2001. </tbody>
  2002. </table>
  2003. </dd></dl>
  2004. <dl class="method">
  2005. <dt id="FlatCAM.CNCjob.scale">
  2006. <tt class="descname">scale</tt><big>(</big><em>factor</em><big>)</big><a class="headerlink" href="#FlatCAM.CNCjob.scale" title="Permalink to this definition">¶</a></dt>
  2007. <dd><p>Scales all the geometry on the XY plane in the object by the
  2008. given factor. Tool sizes, feedrates, or Z-axis dimensions are
  2009. not altered.</p>
  2010. <table class="docutils field-list" frame="void" rules="none">
  2011. <col class="field-name" />
  2012. <col class="field-body" />
  2013. <tbody valign="top">
  2014. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>factor</strong> (<em>float</em>) &#8211; Number by which to scale the object.</td>
  2015. </tr>
  2016. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  2017. </tr>
  2018. <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">None</td>
  2019. </tr>
  2020. </tbody>
  2021. </table>
  2022. </dd></dl>
  2023. </dd></dl>
  2024. <dl class="class">
  2025. <dt id="FlatCAM.FlatCAMObj">
  2026. <em class="property">class </em><tt class="descclassname">FlatCAM.</tt><tt class="descname">FlatCAMObj</tt><big>(</big><em>name</em><big>)</big><a class="headerlink" href="#FlatCAM.FlatCAMObj" title="Permalink to this definition">¶</a></dt>
  2027. <dd><p>Base type of objects handled in FlatCAM. These become interactive
  2028. in the GUI, can be plotted, and their options can be modified
  2029. by the user in their respective forms.</p>
  2030. <dl class="method">
  2031. <dt id="FlatCAM.FlatCAMObj.build_ui">
  2032. <tt class="descname">build_ui</tt><big>(</big><big>)</big><a class="headerlink" href="#FlatCAM.FlatCAMObj.build_ui" title="Permalink to this definition">¶</a></dt>
  2033. <dd><p>Sets up the UI/form for this object.</p>
  2034. <table class="docutils field-list" frame="void" rules="none">
  2035. <col class="field-name" />
  2036. <col class="field-body" />
  2037. <tbody valign="top">
  2038. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  2039. </tr>
  2040. <tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">None</td>
  2041. </tr>
  2042. </tbody>
  2043. </table>
  2044. </dd></dl>
  2045. <dl class="method">
  2046. <dt id="FlatCAM.FlatCAMObj.deserialize">
  2047. <tt class="descname">deserialize</tt><big>(</big><em>obj_dict</em><big>)</big><a class="headerlink" href="#FlatCAM.FlatCAMObj.deserialize" title="Permalink to this definition">¶</a></dt>
  2048. <dd><p>Re-builds an object from its serialized version.
  2049. &#64;param obj_dict: Dictionary representing a FlatCAMObj
  2050. &#64;type obj_dict: dict
  2051. &#64;return None</p>
  2052. </dd></dl>
  2053. <dl class="method">
  2054. <dt id="FlatCAM.FlatCAMObj.plot">
  2055. <tt class="descname">plot</tt><big>(</big><em>figure</em><big>)</big><a class="headerlink" href="#FlatCAM.FlatCAMObj.plot" title="Permalink to this definition">¶</a></dt>
  2056. <dd><p>Extend this method! Sets up axes if needed and
  2057. clears them. Descendants must do the actual plotting.</p>
  2058. </dd></dl>
  2059. <dl class="method">
  2060. <dt id="FlatCAM.FlatCAMObj.read_form">
  2061. <tt class="descname">read_form</tt><big>(</big><big>)</big><a class="headerlink" href="#FlatCAM.FlatCAMObj.read_form" title="Permalink to this definition">¶</a></dt>
  2062. <dd><p>Reads form into <tt class="docutils literal"><span class="pre">self.options</span></tt>.</p>
  2063. <table class="docutils field-list" frame="void" rules="none">
  2064. <col class="field-name" />
  2065. <col class="field-body" />
  2066. <tbody valign="top">
  2067. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  2068. </tr>
  2069. <tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">None</td>
  2070. </tr>
  2071. </tbody>
  2072. </table>
  2073. </dd></dl>
  2074. <dl class="method">
  2075. <dt id="FlatCAM.FlatCAMObj.serialize">
  2076. <tt class="descname">serialize</tt><big>(</big><big>)</big><a class="headerlink" href="#FlatCAM.FlatCAMObj.serialize" title="Permalink to this definition">¶</a></dt>
  2077. <dd><p>Returns a representation of the object as a dictionary so
  2078. it can be later exported as JSON. Override this method.
  2079. &#64;return: Dictionary representing the object
  2080. &#64;rtype: dict</p>
  2081. </dd></dl>
  2082. <dl class="method">
  2083. <dt id="FlatCAM.FlatCAMObj.set_form_item">
  2084. <tt class="descname">set_form_item</tt><big>(</big><em>option</em><big>)</big><a class="headerlink" href="#FlatCAM.FlatCAMObj.set_form_item" title="Permalink to this definition">¶</a></dt>
  2085. <dd><p>Copies the specified options to the UI form.</p>
  2086. <table class="docutils field-list" frame="void" rules="none">
  2087. <col class="field-name" />
  2088. <col class="field-body" />
  2089. <tbody valign="top">
  2090. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>option</strong> (<em>str</em>) &#8211; Name of the option (Key in <tt class="docutils literal"><span class="pre">self.options</span></tt>).</td>
  2091. </tr>
  2092. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  2093. </tr>
  2094. </tbody>
  2095. </table>
  2096. </dd></dl>
  2097. <dl class="method">
  2098. <dt id="FlatCAM.FlatCAMObj.setup_axes">
  2099. <tt class="descname">setup_axes</tt><big>(</big><em>figure</em><big>)</big><a class="headerlink" href="#FlatCAM.FlatCAMObj.setup_axes" title="Permalink to this definition">¶</a></dt>
  2100. <dd><p>1) Creates axes if they don&#8217;t exist. 2) Clears axes. 3) Attaches
  2101. them to figure if not part of the figure. 4) Sets transparent
  2102. background. 5) Sets 1:1 scale aspect ratio.</p>
  2103. <table class="docutils field-list" frame="void" rules="none">
  2104. <col class="field-name" />
  2105. <col class="field-body" />
  2106. <tbody valign="top">
  2107. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>figure</strong> (<em>matplotlib.figure.Figure</em>) &#8211; A Matplotlib.Figure on which to add/configure axes.</td>
  2108. </tr>
  2109. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  2110. </tr>
  2111. <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">None</td>
  2112. </tr>
  2113. </tbody>
  2114. </table>
  2115. </dd></dl>
  2116. <dl class="method">
  2117. <dt id="FlatCAM.FlatCAMObj.to_form">
  2118. <tt class="descname">to_form</tt><big>(</big><big>)</big><a class="headerlink" href="#FlatCAM.FlatCAMObj.to_form" title="Permalink to this definition">¶</a></dt>
  2119. <dd><p>Copies options to the UI form.</p>
  2120. <table class="docutils field-list" frame="void" rules="none">
  2121. <col class="field-name" />
  2122. <col class="field-body" />
  2123. <tbody valign="top">
  2124. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  2125. </tr>
  2126. </tbody>
  2127. </table>
  2128. </dd></dl>
  2129. </dd></dl>
  2130. <dl class="class">
  2131. <dt id="FlatCAM.FlatCAMGerber">
  2132. <em class="property">class </em><tt class="descclassname">FlatCAM.</tt><tt class="descname">FlatCAMGerber</tt><big>(</big><em>name</em><big>)</big><a class="headerlink" href="#FlatCAM.FlatCAMGerber" title="Permalink to this definition">¶</a></dt>
  2133. <dd><p>Represents Gerber code.</p>
  2134. <dl class="method">
  2135. <dt id="FlatCAM.FlatCAMGerber.convert_units">
  2136. <tt class="descname">convert_units</tt><big>(</big><em>units</em><big>)</big><a class="headerlink" href="#FlatCAM.FlatCAMGerber.convert_units" title="Permalink to this definition">¶</a></dt>
  2137. <dd><p>Converts the units of the object by scaling dimensions in all geometry
  2138. and options.</p>
  2139. <table class="docutils field-list" frame="void" rules="none">
  2140. <col class="field-name" />
  2141. <col class="field-body" />
  2142. <tbody valign="top">
  2143. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>units</strong> (<em>str</em>) &#8211; Units to which to convert the object: &#8220;IN&#8221; or &#8220;MM&#8221;.</td>
  2144. </tr>
  2145. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
  2146. </tr>
  2147. <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">None</td>
  2148. </tr>
  2149. </tbody>
  2150. </table>
  2151. </dd></dl>
  2152. <dl class="method">
  2153. <dt id="FlatCAM.FlatCAMGerber.plot">
  2154. <tt class="descname">plot</tt><big>(</big><em>figure</em><big>)</big><a class="headerlink" href="#FlatCAM.FlatCAMGerber.plot" title="Permalink to this definition">¶</a></dt>
  2155. <dd><p>Plots the object on to the specified figure.</p>
  2156. <table class="docutils field-list" frame="void" rules="none">
  2157. <col class="field-name" />
  2158. <col class="field-body" />
  2159. <tbody valign="top">
  2160. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>figure</strong> &#8211; Matplotlib figure on which to plot.</td>
  2161. </tr>
  2162. </tbody>
  2163. </table>
  2164. </dd></dl>
  2165. </dd></dl>
  2166. <dl class="class">
  2167. <dt id="FlatCAM.FlatCAMExcellon">
  2168. <em class="property">class </em><tt class="descclassname">FlatCAM.</tt><tt class="descname">FlatCAMExcellon</tt><big>(</big><em>name</em><big>)</big><a class="headerlink" href="#FlatCAM.FlatCAMExcellon" title="Permalink to this definition">¶</a></dt>
  2169. <dd><p>Represents Excellon code.</p>
  2170. </dd></dl>
  2171. <dl class="class">
  2172. <dt id="FlatCAM.FlatCAMCNCjob">
  2173. <em class="property">class </em><tt class="descclassname">FlatCAM.</tt><tt class="descname">FlatCAMCNCjob</tt><big>(</big><em>name</em>, <em>units='in'</em>, <em>kind='generic'</em>, <em>z_move=0.1</em>, <em>feedrate=3.0</em>, <em>z_cut=-0.002</em>, <em>tooldia=0.0</em><big>)</big><a class="headerlink" href="#FlatCAM.FlatCAMCNCjob" title="Permalink to this definition">¶</a></dt>
  2174. <dd><p>Represents G-Code.</p>
  2175. </dd></dl>
  2176. <dl class="class">
  2177. <dt id="FlatCAM.FlatCAMGeometry">
  2178. <em class="property">class </em><tt class="descclassname">FlatCAM.</tt><tt class="descname">FlatCAMGeometry</tt><big>(</big><em>name</em><big>)</big><a class="headerlink" href="#FlatCAM.FlatCAMGeometry" title="Permalink to this definition">¶</a></dt>
  2179. <dd><p>Geometric object not associated with a specific
  2180. format.</p>
  2181. </dd></dl>
  2182. </div>
  2183. <div class="section" id="indices-and-tables">
  2184. <h1>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Permalink to this headline">¶</a></h1>
  2185. <ul class="simple">
  2186. <li><a class="reference internal" href="genindex.html"><em>Index</em></a></li>
  2187. <li><a class="reference internal" href="py-modindex.html"><em>Module Index</em></a></li>
  2188. <li><a class="reference internal" href="search.html"><em>Search Page</em></a></li>
  2189. </ul>
  2190. </div>
  2191. </div>
  2192. <footer>
  2193. <hr/>
  2194. <div role="contentinfo">
  2195. <p>
  2196. &copy; Copyright 2014, Juan Pablo Caram.
  2197. </p>
  2198. </div>
  2199. <a href="https://github.com/snide/sphinx_rtd_theme">Sphinx theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>
  2200. </footer>
  2201. </div>
  2202. </div>
  2203. </section>
  2204. </div>
  2205. </body>
  2206. </html>