cmdreference.rst 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  1. .. _cmdreference:
  2. Shell Command Reference
  3. =======================
  4. .. warning::
  5. The FlatCAM Shell is under development and its behavior might change in the future. This includes available commands and their syntax.
  6. add_circle
  7. ~~~~~~~~~~
  8. Creates a circle in the given Geometry object.
  9. > add_circle <name> <center_x> <center_y> <radius>
  10. name: Name of the geometry object to which to append the circle.
  11. center_x, center_y: Coordinates of the center of the circle.
  12. radius: Radius of the circle.
  13. add_poly
  14. ~~~~~~~~
  15. Creates a polygon in the given Geometry object.
  16. > create_poly <name> <x0> <y0> <x1> <y1> <x2> <y2> [x3 y3 [...]]
  17. name: Name of the geometry object to which to append the polygon.
  18. xi, yi: Coordinates of points in the polygon.
  19. add_rect
  20. ~~~~~~~~
  21. Creates a rectange in the given Geometry object.
  22. > add_rect <name> <botleft_x> <botleft_y> <topright_x> <topright_y>
  23. name: Name of the geometry object to which to append the rectangle.
  24. botleft_x, botleft_y: Coordinates of the bottom left corner.
  25. topright_x, topright_y Coordinates of the top right corner.
  26. cncjob
  27. ~~~~~~
  28. Generates a CNC Job from a Geometry Object.
  29. > cncjob <name> [-z_cut <c>] [-z_move <m>] [-feedrate <f>] [-tooldia <t>] [-outname <n>]
  30. name: Name of the source object
  31. z_cut: Z-axis cutting position
  32. z_move: Z-axis moving position
  33. feedrate: Moving speed when cutting
  34. tooldia: Tool diameter to show on screen
  35. outname: Name of the output object
  36. delete
  37. ~~~~~~
  38. Deletes the give object.
  39. > delete <name>
  40. name: Name of the object to delete.
  41. follow
  42. ~~~~~~
  43. Creates a geometry object following gerber paths.
  44. > follow <name> [-outname <oname>]
  45. name: Name of the gerber object.
  46. outname: Name of the output geometry object.
  47. geo_union
  48. ~~~~~~~~~
  49. Runs a union operation (addition) on the components of the geometry object. For example, if it contains 2 intersecting polygons, this opperation adds them intoa single larger polygon.
  50. > geo_union <name>
  51. name: Name of the geometry object.
  52. get_names
  53. ~~~~~~~~~
  54. Lists the names of objects in the project.
  55. > get_names
  56. No parameters.
  57. help
  58. ~~~~
  59. Shows list of commands.
  60. isolate
  61. ~~~~~~~
  62. Creates isolation routing geometry for the given Gerber.
  63. > isolate <name> [-dia <d>] [-passes <p>] [-overlap <o>]
  64. name: Name of the object
  65. dia: Tool diameter
  66. passes: # of tool width
  67. overlap: Fraction of tool diameter to overlap passes
  68. make_docs
  69. ~~~~~~~~~
  70. Prints command rererence in reStructuredText format.
  71. new
  72. ~~~
  73. Starts a new project. Clears objects from memory.
  74. > new
  75. No parameters.
  76. new_geometry
  77. ~~~~~~~~~~~~
  78. Creates a new empty geometry object.
  79. > new_geometry <name>
  80. name: New object name
  81. offset
  82. ~~~~~~
  83. Changes the position of the object.
  84. > offset <name> <x> <y>
  85. name: Name of the object
  86. x: X-axis distance
  87. y: Y-axis distance
  88. open_excellon
  89. ~~~~~~~~~~~~~
  90. Opens an Excellon file.
  91. > open_excellon <filename> [-outname <o>]
  92. filename: Path to file to open.
  93. outname: Name of the created excellon object.
  94. open_gcode
  95. ~~~~~~~~~~
  96. Opens an G-Code file.
  97. > open_gcode <filename> [-outname <o>]
  98. filename: Path to file to open.
  99. outname: Name of the created CNC Job object.
  100. open_gerber
  101. ~~~~~~~~~~~
  102. Opens a Gerber file.
  103. > open_gerber <filename> [-follow <0|1>] [-outname <o>]
  104. filename: Path to file to open.
  105. follow: If 1, does not create polygons, just follows the gerber path.
  106. outname: Name of the created gerber object.
  107. open_project
  108. ~~~~~~~~~~~~
  109. Opens a FlatCAM project.
  110. > open_project <filename>
  111. filename: Path to file to open.
  112. options
  113. ~~~~~~~
  114. Shows the settings for an object.
  115. > options <name>
  116. name: Object name.
  117. paint_poly
  118. ~~~~~~~~~~
  119. Creates a geometry object with toolpath to cover the inside of a polygon.
  120. > paint_poly <name> <inside_pt_x> <inside_pt_y> <tooldia> <overlap>
  121. name: Name of the sourge geometry object.
  122. inside_pt_x, inside_pt_y: Coordinates of a point inside the polygon.
  123. tooldia: Diameter of the tool to be used.
  124. overlap: Fraction of the tool diameter to overlap cuts.
  125. plot
  126. ~~~~
  127. Updates the plot on the user interface
  128. save_project
  129. ~~~~~~~~~~~~
  130. Saves the FlatCAM project to file.
  131. > save_project <filename>
  132. filename: Path to file to save.
  133. scale
  134. ~~~~~
  135. Resizes the object by a factor.
  136. > scale <name> <factor>
  137. name: Name of the object
  138. factor: Fraction by which to scale
  139. set_active
  140. ~~~~~~~~~~
  141. Sets a FlatCAM object as active.
  142. > set_active <name>
  143. name: Name of the object.
  144. write_gcode
  145. ~~~~~~~~~~~
  146. Saves G-code of a CNC Job object to file.
  147. > write_gcode <name> <filename>
  148. name: Source CNC Job object
  149. filename: Output filename