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 +4 -4
- data/.gitignore +2 -0
- data/Gemfile.lock +3 -3
- data/README.md +12 -0
- data/lib/svgcode/gcode/command.rb +4 -3
- data/lib/svgcode/gcode/converter.rb +2 -1
- data/lib/svgcode/gcode/program.rb +1 -1
- data/lib/svgcode/version.rb +1 -1
- metadata +2 -3
- data/pkg/svgcode-0.1.0.gem +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b7f93d40b63e37521632d2047a22945a4c7a5aeb
|
4
|
+
data.tar.gz: 56b511a4d1b06e3b36d192773f6e89f2f5d6dee9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 577679631f6b9e366fc1b342db5e94fc6ee6e9d4d93404f16a4d4583f4d49ac94a11027156a1428f85e974bf3b282ead0c843ddf2dc821728bbc19f63ebe047b
|
7
|
+
data.tar.gz: 187f4a0af181d12a22d54f69224830a3a8332d5b40d09f487f616c9fb6bf1673665e6423ce9ad3e335f388deb72cca867f8dd074aababcdf349a20d79ca480eb
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
svgcode (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.
|
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.
|
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
|
-
|
64
|
+
str.gsub!(/[()]/, '')
|
65
|
+
"\n(#{str})"
|
65
66
|
end
|
66
67
|
|
67
68
|
def self.absolute
|
data/lib/svgcode/version.rb
CHANGED
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.
|
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-
|
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:
|
data/pkg/svgcode-0.1.0.gem
DELETED
Binary file
|