svgcode 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5c3aa03749e87541d62aad7f3d5b1aa330fc4d6a
4
- data.tar.gz: c0eb741715b363bfdf203c84de1de367b1ae8455
3
+ metadata.gz: b7f93d40b63e37521632d2047a22945a4c7a5aeb
4
+ data.tar.gz: 56b511a4d1b06e3b36d192773f6e89f2f5d6dee9
5
5
  SHA512:
6
- metadata.gz: d58d8af57cc5c6f86bf5bbf718b161171d11c7b57d70ee381c10964645acc971ca2da7e925500c1c61b4748597dbd2f3bb80428ccbfde3fc03e957b998dfef5b
7
- data.tar.gz: 49e785b34f7aab7999421b5a2f93744b6093d4e7fc6c38846c1093b743c485f2f4c03a0ba520e070a9597e2b551771daae9f60d8930ded1f40a7a8d2c0e14e7c
6
+ metadata.gz: 577679631f6b9e366fc1b342db5e94fc6ee6e9d4d93404f16a4d4583f4d49ac94a11027156a1428f85e974bf3b282ead0c843ddf2dc821728bbc19f63ebe047b
7
+ data.tar.gz: 187f4a0af181d12a22d54f69224830a3a8332d5b40d09f487f616c9fb6bf1673665e6423ce9ad3e335f388deb72cca867f8dd074aababcdf349a20d79ca480eb
data/.gitignore CHANGED
@@ -2,3 +2,5 @@
2
2
  doc
3
3
  .byebug_history
4
4
  .rspec_status
5
+ pkg
6
+
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- svgcode (0.2.0)
4
+ svgcode (0.3.0)
5
5
  nokogiri (~> 1.8)
6
6
  thor (~> 0.20)
7
7
 
@@ -11,7 +11,7 @@ GEM
11
11
  byebug (9.1.0)
12
12
  diff-lcs (1.3)
13
13
  mini_portile2 (2.3.0)
14
- nokogiri (1.8.1)
14
+ nokogiri (1.8.2)
15
15
  mini_portile2 (~> 2.3.0)
16
16
  rake (10.5.0)
17
17
  rspec (3.7.0)
@@ -42,4 +42,4 @@ DEPENDENCIES
42
42
  yard
43
43
 
44
44
  BUNDLED WITH
45
- 1.16.0
45
+ 1.16.1
data/README.md CHANGED
@@ -6,6 +6,18 @@ curves and LinuxCNC's
6
6
  [G5](http://linuxcnc.org/docs/2.6/html/gcode/gcode.html#sec:G5-Cubic-Spline)
7
7
  command.
8
8
 
9
+ It has been fairly thorougly tested with SVGs exported from Affinity Designer,
10
+ though you will need to check the "Export text as curves for font independence"
11
+ option as the SVG text element is currently not handled.
12
+
13
+ Other SVG features which are yet to be handled:
14
+ - horizontal and vertical lines
15
+ - quadratic bezier curves
16
+ - arcto
17
+ - non-matrix transforms
18
+
19
+ For more temporary shortcomings, please see TODO.md.
20
+
9
21
  ## Installation
10
22
  `gem install svgcode`
11
23
 
@@ -13,7 +13,7 @@ module Svgcode
13
13
  cmd = Command.parse_single(parts.shift)
14
14
  @letter = cmd.letter
15
15
  @number = cmd.number
16
- @args = parts.collect { |arg| Command.parse_single(arg) }
16
+ @args = parts.collect { |arg| Command.parse_single(arg) }
17
17
  else
18
18
  @letter = letter_or_str
19
19
  @number = number
@@ -32,7 +32,7 @@ module Svgcode
32
32
  end
33
33
 
34
34
  def ==(other)
35
- other.is_a?(self.class) &&
35
+ other.is_a?(self.class) &&
36
36
  other.letter == @letter &&
37
37
  other.number.eql?(@number) &&
38
38
  other.args == @args
@@ -61,7 +61,8 @@ module Svgcode
61
61
  end
62
62
 
63
63
  def self.comment(str)
64
- "\n(#{str}!!!)"
64
+ str.gsub!(/[()]/, '')
65
+ "\n(#{str})"
65
66
  end
66
67
 
67
68
  def self.absolute
@@ -67,7 +67,8 @@ module Svgcode
67
67
 
68
68
  def finish
69
69
  unless @finished
70
- @program.home!
70
+ @program.clear!
71
+ @program.go!(0, 0)
71
72
  @program.stop!
72
73
  @finished = true
73
74
  end
@@ -6,7 +6,7 @@ module Svgcode
6
6
  class Program
7
7
  DEFAULT_FEEDRATE = 120
8
8
  DEFAULT_CLEARANCE = 5
9
- DEFAULT_DEPTH = -0.5
9
+ DEFAULT_DEPTH = -0.075
10
10
 
11
11
  attr_accessor :opts, :commands
12
12
 
@@ -1,3 +1,3 @@
1
1
  module Svgcode
2
- VERSION = '0.2.0'
2
+ VERSION = '0.3.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: svgcode
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-07 00:00:00.000000000 Z
11
+ date: 2018-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -139,7 +139,6 @@ files:
139
139
  - lib/svgcode/svg/point.rb
140
140
  - lib/svgcode/svg/transform.rb
141
141
  - lib/svgcode/version.rb
142
- - pkg/svgcode-0.1.0.gem
143
142
  - svgcode.gemspec
144
143
  homepage: https://github.com/benjineering/svgcode
145
144
  licenses:
Binary file