cmdreference.rst 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284
  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. add_circle
  8. ~~~~~~~~~~
  9. Creates a circle in the given Geometry object.
  10. > add_circle <name> <center_x> <center_y> <radius>
  11. name: Name of the geometry object to which to append the circle.
  12. center_x, center_y: Coordinates of the center of the circle.
  13. radius: Radius of the circle.
  14. .. _add_poly:
  15. add_poly
  16. ~~~~~~~~
  17. Creates a polygon in the given Geometry object.
  18. > create_poly <name> <x0> <y0> <x1> <y1> <x2> <y2> [x3 y3 [...]]
  19. name: Name of the geometry object to which to append the polygon.
  20. xi, yi: Coordinates of points in the polygon.
  21. .. _add_rect:
  22. add_rect
  23. ~~~~~~~~
  24. Creates a rectange in the given Geometry object.
  25. > add_rect <name> <botleft_x> <botleft_y> <topright_x> <topright_y>
  26. name: Name of the geometry object to which to append the rectangle.
  27. botleft_x, botleft_y: Coordinates of the bottom left corner.
  28. topright_x, topright_y Coordinates of the top right corner.
  29. cncjob
  30. ~~~~~~
  31. Generates a CNC Job from a Geometry Object.
  32. > cncjob <name> [-z_cut <c>] [-z_move <m>] [-feedrate <f>] [-tooldia <t>] [-outname <n>]
  33. name: Name of the source object
  34. z_cut: Z-axis cutting position
  35. z_move: Z-axis moving position
  36. feedrate: Moving speed when cutting
  37. tooldia: Tool diameter to show on screen
  38. outname: Name of the output object
  39. cutout
  40. ~~~~~~
  41. Creates cutout board.
  42. > cutout <name> [-dia <3.0 (float)>] [-margin <0.0 (float)>] [-gapsize <0.5 (float)>] [-gaps <lr (4|tb|lr)>]
  43. name: Name of the object
  44. dia: Tool diameter
  45. margin: # margin over bounds
  46. gapsize: size of gap
  47. gaps: type of gaps
  48. delete
  49. ~~~~~~
  50. Deletes the give object.
  51. > delete <name>
  52. name: Name of the object to delete.
  53. drillcncjob
  54. ~~~~~~~~~~~
  55. Drill CNC job.
  56. > drillcncjob <name> -tools <str> -drillz <float> -travelz <float> -feedrate <float> -outname <str>
  57. name: Name of the object
  58. tools: Comma separated indexes of tools (example: 1,3 or 2)
  59. drillz: Drill depth into material (example: -2.0)
  60. travelz: Travel distance above material (example: 2.0)
  61. feedrate: Drilling feed rate
  62. outname: Name of object to create
  63. follow
  64. ~~~~~~
  65. Creates a geometry object following gerber paths.
  66. > follow <name> [-outname <oname>]
  67. name: Name of the gerber object.
  68. outname: Name of the output geometry object.
  69. .. _geo_union:
  70. geo_union
  71. ~~~~~~~~~
  72. 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.
  73. > geo_union <name>
  74. name: Name of the geometry object.
  75. get_names
  76. ~~~~~~~~~
  77. Lists the names of objects in the project.
  78. > get_names
  79. No parameters.
  80. help
  81. ~~~~
  82. Shows list of commands.
  83. isolate
  84. ~~~~~~~
  85. Creates isolation routing geometry for the given Gerber.
  86. > isolate <name> [-dia <d>] [-passes <p>] [-overlap <o>]
  87. name: Name of the object
  88. dia: Tool diameter
  89. passes: # of tool width
  90. overlap: Fraction of tool diameter to overlap passes
  91. make_docs
  92. ~~~~~~~~~
  93. Prints command rererence in reStructuredText format.
  94. mirror
  95. ~~~~~~
  96. Mirror board.
  97. > mirror <nameMirroredObject> -box <nameOfBox> [-axis <X|Y>]
  98. name: Name of the object (Gerber or Excellon) to mirror
  99. box: Name of object which acts as box (cutout for example)
  100. axis: Axis mirror over X or Y
  101. new
  102. ~~~
  103. Starts a new project. Clears objects from memory.
  104. > new
  105. No parameters.
  106. .. _new_geometry:
  107. new_geometry
  108. ~~~~~~~~~~~~
  109. Creates a new empty geometry object.
  110. > new_geometry <name>
  111. name: New object name
  112. .. _offset:
  113. offset
  114. ~~~~~~
  115. Changes the position of the object.
  116. > offset <name> <x> <y>
  117. name: Name of the object
  118. x: X-axis distance
  119. y: Y-axis distance
  120. open_excellon
  121. ~~~~~~~~~~~~~
  122. Opens an Excellon file.
  123. > open_excellon <filename> [-outname <o>]
  124. filename: Path to file to open.
  125. outname: Name of the created excellon object.
  126. open_gcode
  127. ~~~~~~~~~~
  128. Opens an G-Code file.
  129. > open_gcode <filename> [-outname <o>]
  130. filename: Path to file to open.
  131. outname: Name of the created CNC Job object.
  132. open_gerber
  133. ~~~~~~~~~~~
  134. Opens a Gerber file.
  135. > open_gerber <filename> [-follow <0|1>] [-outname <o>]
  136. filename: Path to file to open.
  137. follow: If 1, does not create polygons, just follows the gerber path.
  138. outname: Name of the created gerber object.
  139. open_project
  140. ~~~~~~~~~~~~
  141. Opens a FlatCAM project.
  142. > open_project <filename>
  143. filename: Path to file to open.
  144. options
  145. ~~~~~~~
  146. Shows the settings for an object.
  147. > options <name>
  148. name: Object name.
  149. paint_poly
  150. ~~~~~~~~~~
  151. Creates a geometry object with toolpath to cover the inside of a polygon.
  152. > paint_poly <name> <inside_pt_x> <inside_pt_y> <tooldia> <overlap>
  153. name: Name of the sourge geometry object.
  154. inside_pt_x, inside_pt_y: Coordinates of a point inside the polygon.
  155. tooldia: Diameter of the tool to be used.
  156. overlap: Fraction of the tool diameter to overlap cuts.
  157. plot
  158. ~~~~
  159. Updates the plot on the user interface
  160. save_project
  161. ~~~~~~~~~~~~
  162. Saves the FlatCAM project to file.
  163. > save_project <filename>
  164. filename: Path to file to save.
  165. .. _scale:
  166. scale
  167. ~~~~~
  168. Resizes the object by a factor.
  169. > scale <name> <factor>
  170. name: Name of the object
  171. factor: Fraction by which to scale
  172. set_active
  173. ~~~~~~~~~~
  174. Sets a FlatCAM object as active.
  175. > set_active <name>
  176. name: Name of the object.
  177. write_gcode
  178. ~~~~~~~~~~~
  179. Saves G-code of a CNC Job object to file.
  180. > write_gcode <name> <filename>
  181. name: Source CNC Job object
  182. filename: Output filename