cmdreference.rst 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  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. delete
  40. ~~~~~~
  41. Deletes the give object.
  42. > delete <name>
  43. name: Name of the object to delete.
  44. follow
  45. ~~~~~~
  46. Creates a geometry object following gerber paths.
  47. > follow <name> [-outname <oname>]
  48. name: Name of the gerber object.
  49. outname: Name of the output geometry object.
  50. .. _geo_union:
  51. geo_union
  52. ~~~~~~~~~
  53. 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.
  54. > geo_union <name>
  55. name: Name of the geometry object.
  56. get_names
  57. ~~~~~~~~~
  58. Lists the names of objects in the project.
  59. > get_names
  60. No parameters.
  61. help
  62. ~~~~
  63. Shows list of commands.
  64. isolate
  65. ~~~~~~~
  66. Creates isolation routing geometry for the given Gerber.
  67. > isolate <name> [-dia <d>] [-passes <p>] [-overlap <o>]
  68. name: Name of the object
  69. dia: Tool diameter
  70. passes: # of tool width
  71. overlap: Fraction of tool diameter to overlap passes
  72. make_docs
  73. ~~~~~~~~~
  74. Prints command rererence in reStructuredText format.
  75. new
  76. ~~~
  77. Starts a new project. Clears objects from memory.
  78. > new
  79. No parameters.
  80. .. _new_geometry:
  81. new_geometry
  82. ~~~~~~~~~~~~
  83. Creates a new empty geometry object.
  84. > new_geometry <name>
  85. name: New object name
  86. .. _offset:
  87. offset
  88. ~~~~~~
  89. Changes the position of the object.
  90. > offset <name> <x> <y>
  91. name: Name of the object
  92. x: X-axis distance
  93. y: Y-axis distance
  94. open_excellon
  95. ~~~~~~~~~~~~~
  96. Opens an Excellon file.
  97. > open_excellon <filename> [-outname <o>]
  98. filename: Path to file to open.
  99. outname: Name of the created excellon object.
  100. open_gcode
  101. ~~~~~~~~~~
  102. Opens an G-Code file.
  103. > open_gcode <filename> [-outname <o>]
  104. filename: Path to file to open.
  105. outname: Name of the created CNC Job object.
  106. open_gerber
  107. ~~~~~~~~~~~
  108. Opens a Gerber file.
  109. > open_gerber <filename> [-follow <0|1>] [-outname <o>]
  110. filename: Path to file to open.
  111. follow: If 1, does not create polygons, just follows the gerber path.
  112. outname: Name of the created gerber object.
  113. open_project
  114. ~~~~~~~~~~~~
  115. Opens a FlatCAM project.
  116. > open_project <filename>
  117. filename: Path to file to open.
  118. options
  119. ~~~~~~~
  120. Shows the settings for an object.
  121. > options <name>
  122. name: Object name.
  123. paint_poly
  124. ~~~~~~~~~~
  125. Creates a geometry object with toolpath to cover the inside of a polygon.
  126. > paint_poly <name> <inside_pt_x> <inside_pt_y> <tooldia> <overlap>
  127. name: Name of the sourge geometry object.
  128. inside_pt_x, inside_pt_y: Coordinates of a point inside the polygon.
  129. tooldia: Diameter of the tool to be used.
  130. overlap: Fraction of the tool diameter to overlap cuts.
  131. plot
  132. ~~~~
  133. Updates the plot on the user interface
  134. save_project
  135. ~~~~~~~~~~~~
  136. Saves the FlatCAM project to file.
  137. > save_project <filename>
  138. filename: Path to file to save.
  139. .. _scale:
  140. scale
  141. ~~~~~
  142. Resizes the object by a factor.
  143. > scale <name> <factor>
  144. name: Name of the object
  145. factor: Fraction by which to scale
  146. set_active
  147. ~~~~~~~~~~
  148. Sets a FlatCAM object as active.
  149. > set_active <name>
  150. name: Name of the object.
  151. write_gcode
  152. ~~~~~~~~~~~
  153. Saves G-code of a CNC Job object to file.
  154. > write_gcode <name> <filename>
  155. name: Source CNC Job object
  156. filename: Output filename