Class: Gcodify::Ops::HoleOp
- Inherits:
-
Gcodify::Op
- Object
- Gcodify::Op
- Gcodify::Ops::HoleOp
- Defined in:
- lib/gcodify/ops/holeop.rb
Overview
A hole to be drilled. In @options, no :radius or :diameter is specified or necessary, since that’s determined by the drill-bit that you put in the machine.
Instance Attribute Summary
Attributes inherited from Gcodify::Op
Instance Method Summary collapse
-
#initialize(options) ⇒ HoleOp
constructor
Special notice: @options is what the drilling cycle will rapid down to, if not specified it’s 0.2in.
-
#to_gcode ⇒ String
Creates the gcode.
Constructor Details
Instance Method Details
#to_gcode ⇒ String
Creates the gcode. Gcodify::Ops::HoleOp uses canned drill cycles.
20 21 22 23 24 25 |
# File 'lib/gcodify/ops/holeop.rb', line 20 def to_gcode gcode = "Z1.0\n" gcode << "X#{@options[:at][0]} Y#{@options[:at][1]}" gcode << "G99 G81 R#{@options[:r_position]} Z#{@options[:depth] + @options[:r_position]}\n" gcode << "G80\n" end |