lib/svgcode/gcode/program.rb in svgcode-0.4.0 vs lib/svgcode/gcode/program.rb in svgcode-0.6.0

- old
+ new

@@ -59,11 +59,11 @@ @is_absolute.nil? ? nil : !@is_absolute end def <<(command) if !command.is_a?(String) && - (@x.nil? || @y.nil?) && + (@x.nil? || @y.nil?) && command.letter == 'G' && command.number < 6 && command != Command.relative && command != Command.absolute then @@ -152,9 +152,13 @@ def cubic_spline!(i, j, _p, q, x, y) perform_cut(x, y) do self << Command.cubic_spline(i, j, _p, q, x, y) end + end + + def arc!(x, y, i) + self << Command.arc(x, y, i) end def pos Svgcode::SVG::Point.new(@x, @y) end