triangular 0.0.2 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.github/workflows/build.yml +30 -0
- data/.gitignore +3 -0
- data/.rspec +2 -0
- data/.rubocop.yml +31 -0
- data/Gemfile +3 -1
- data/Gemfile.lock +51 -12
- data/MIT-LICENSE +1 -1
- data/README.md +98 -0
- data/examples/slice_example.rb +6 -4
- data/lib/triangular/facet.rb +32 -42
- data/lib/triangular/line.rb +42 -16
- data/lib/triangular/point.rb +15 -15
- data/lib/triangular/polyline.rb +13 -12
- data/lib/triangular/ray.rb +41 -0
- data/lib/triangular/solid.rb +34 -36
- data/lib/triangular/units.rb +18 -14
- data/lib/triangular/vector.rb +8 -1
- data/lib/triangular/version.rb +3 -1
- data/lib/triangular/vertex.rb +17 -16
- data/lib/triangular.rb +4 -1
- data/spec/benchmark/benchmark_spec.rb +23 -0
- data/spec/profile/profile_spec.rb +20 -0
- data/spec/spec_helper.rb +17 -3
- data/spec/triangular/facet_spec.rb +235 -0
- data/spec/triangular/line_spec.rb +285 -0
- data/spec/triangular/point_spec.rb +108 -0
- data/spec/triangular/polyline_spec.rb +22 -0
- data/spec/triangular/ray_spec.rb +63 -0
- data/spec/{solid_spec.rb → triangular/solid_spec.rb} +71 -70
- data/spec/triangular/triangular_spec.rb +24 -0
- data/spec/triangular/units_spec.rb +77 -0
- data/spec/triangular/vector_spec.rb +23 -0
- data/spec/triangular/vertex_spec.rb +46 -0
- data/triangular.gemspec +22 -18
- metadata +114 -65
- data/README.rdoc +0 -64
- data/Rakefile +0 -11
- data/spec/facet_spec.rb +0 -233
- data/spec/line_spec.rb +0 -108
- data/spec/point_spec.rb +0 -88
- data/spec/polyline_spec.rb +0 -20
- data/spec/triangular_spec.rb +0 -22
- data/spec/units_spec.rb +0 -75
- data/spec/vertex_spec.rb +0 -44
@@ -1,10 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'spec_helper'
|
2
4
|
|
3
|
-
describe Solid do
|
4
|
-
describe
|
5
|
-
context
|
5
|
+
describe Triangular::Solid do
|
6
|
+
describe '.parse' do
|
7
|
+
context 'with a correctly formatted solid' do
|
6
8
|
before do
|
7
|
-
@result = Solid.parse(
|
9
|
+
@result = Triangular::Solid.parse(<<~SOLID)
|
8
10
|
solid y-axis-spacer
|
9
11
|
facet normal 0.0 0.0 -1.0
|
10
12
|
outer loop
|
@@ -21,32 +23,31 @@ describe Solid do
|
|
21
23
|
endloop
|
22
24
|
endfacet
|
23
25
|
endsolid y-axis-spacer
|
24
|
-
|
25
|
-
EOD
|
26
|
+
SOLID
|
26
27
|
end
|
27
|
-
|
28
|
-
it
|
29
|
-
@result.
|
28
|
+
|
29
|
+
it 'should return a Solid' do
|
30
|
+
expect(@result).to be_a Triangular::Solid
|
30
31
|
end
|
31
|
-
|
32
|
-
it
|
33
|
-
@result.name.
|
32
|
+
|
33
|
+
it 'should correctly set the name parameter' do
|
34
|
+
expect(@result.name).to eq('y-axis-spacer')
|
34
35
|
end
|
35
|
-
|
36
|
-
it
|
37
|
-
@result.facets.length.
|
36
|
+
|
37
|
+
it 'should retun a Solid that has two Facets' do
|
38
|
+
expect(@result.facets.length).to eq(2)
|
38
39
|
end
|
39
|
-
|
40
|
-
it
|
40
|
+
|
41
|
+
it 'should return a Solid that has facets of type Facet' do
|
41
42
|
@result.facets.each do |facet|
|
42
|
-
facet.
|
43
|
+
expect(facet).to be_a Triangular::Facet
|
43
44
|
end
|
44
45
|
end
|
45
46
|
end
|
46
47
|
end
|
47
|
-
|
48
|
-
describe
|
49
|
-
it
|
48
|
+
|
49
|
+
describe '#to_s' do
|
50
|
+
it 'should output a string representation exactly the same as the input' do
|
50
51
|
input = "solid y-axis-spacer\n"
|
51
52
|
input += "facet normal 0.0 0.0 -1.0\n"
|
52
53
|
input += "outer loop\n"
|
@@ -63,27 +64,27 @@ describe Solid do
|
|
63
64
|
input += "endloop\n"
|
64
65
|
input += "endfacet\n"
|
65
66
|
input += "endsolid y-axis-spacer\n"
|
66
|
-
|
67
|
-
solid = Solid.parse(input)
|
67
|
+
|
68
|
+
solid = Triangular::Solid.parse(input)
|
68
69
|
output = solid.to_s
|
69
|
-
|
70
|
-
output.
|
70
|
+
|
71
|
+
expect(output).to eq(input)
|
71
72
|
end
|
72
73
|
end
|
73
|
-
|
74
|
-
describe
|
74
|
+
|
75
|
+
describe '#slice_at_z' do
|
75
76
|
before do
|
76
|
-
@solid = Solid.parse(File.open("#{File.dirname(__FILE__)}
|
77
|
+
@solid = Triangular::Solid.parse(File.open("#{File.dirname(__FILE__)}/../fixtures/test_cube.stl").read)
|
77
78
|
end
|
78
79
|
|
79
|
-
it
|
80
|
-
@solid.slice_at_z(0).
|
80
|
+
it 'should return a Polyline' do
|
81
|
+
expect(@solid.slice_at_z(0)).to be_a Triangular::Polyline
|
81
82
|
end
|
82
83
|
end
|
83
|
-
|
84
|
-
describe
|
84
|
+
|
85
|
+
describe '#bounds' do
|
85
86
|
before do
|
86
|
-
@solid = Solid.parse(<<-
|
87
|
+
@solid = Triangular::Solid.parse(<<-SOLID)
|
87
88
|
solid y-axis-spacer
|
88
89
|
facet normal 0.0 0.0 -1.0
|
89
90
|
outer loop
|
@@ -100,29 +101,29 @@ describe Solid do
|
|
100
101
|
endloop
|
101
102
|
endfacet
|
102
103
|
endsolid y-axis-spacer
|
103
|
-
|
104
|
+
SOLID
|
104
105
|
end
|
105
|
-
|
106
|
-
it
|
107
|
-
@solid.
|
106
|
+
|
107
|
+
it 'should return an array' do
|
108
|
+
expect(@solid.bounds).to be_a Array
|
108
109
|
end
|
109
|
-
|
110
|
-
it
|
111
|
-
@solid.
|
112
|
-
@solid.
|
113
|
-
@solid.
|
110
|
+
|
111
|
+
it 'should return a point with the smallest bounds' do
|
112
|
+
expect(@solid.bounds[0].x).to eq(-16.5)
|
113
|
+
expect(@solid.bounds[0].y).to eq(-9.5)
|
114
|
+
expect(@solid.bounds[0].z).to eq(-0.75)
|
114
115
|
end
|
115
|
-
|
116
|
-
it
|
117
|
-
@solid.
|
118
|
-
@solid.
|
119
|
-
@solid.
|
116
|
+
|
117
|
+
it 'should return a point with the largest bounds' do
|
118
|
+
expect(@solid.bounds[1].x).to eq(16.5)
|
119
|
+
expect(@solid.bounds[1].y).to eq(1.87)
|
120
|
+
expect(@solid.bounds[1].z).to eq(0.0)
|
120
121
|
end
|
121
122
|
end
|
122
|
-
|
123
|
-
describe
|
123
|
+
|
124
|
+
describe '#translate!' do
|
124
125
|
before do
|
125
|
-
@solid = Solid.parse(<<-
|
126
|
+
@solid = Triangular::Solid.parse(<<-SOLID)
|
126
127
|
solid y-axis-spacer
|
127
128
|
facet normal 0.0 0.0 -1.0
|
128
129
|
outer loop
|
@@ -139,20 +140,20 @@ describe Solid do
|
|
139
140
|
endloop
|
140
141
|
endfacet
|
141
142
|
endsolid y-axis-spacer
|
142
|
-
|
143
|
+
SOLID
|
143
144
|
end
|
144
|
-
|
145
|
+
|
145
146
|
it "should call translate on each of it's Facets" do
|
146
|
-
@solid.facets[0].
|
147
|
-
@solid.facets[1].
|
148
|
-
|
147
|
+
expect(@solid.facets[0]).to receive(:translate!).with(16.5, 9.5, 0.75)
|
148
|
+
expect(@solid.facets[1]).to receive(:translate!).with(16.5, 9.5, 0.75)
|
149
|
+
|
149
150
|
@solid.translate!(16.5, 9.5, 0.75)
|
150
151
|
end
|
151
152
|
end
|
152
|
-
|
153
|
-
describe
|
153
|
+
|
154
|
+
describe '#align_to_origin!' do
|
154
155
|
before do
|
155
|
-
@solid = Solid.parse(<<-
|
156
|
+
@solid = Triangular::Solid.parse(<<-SOLID)
|
156
157
|
solid y-axis-spacer
|
157
158
|
facet normal 0.0 0.0 -1.0
|
158
159
|
outer loop
|
@@ -169,18 +170,18 @@ describe Solid do
|
|
169
170
|
endloop
|
170
171
|
endfacet
|
171
172
|
endsolid y-axis-spacer
|
172
|
-
|
173
|
+
SOLID
|
173
174
|
end
|
174
|
-
|
175
|
-
it
|
176
|
-
@solid.
|
175
|
+
|
176
|
+
it 'should translate solid so the lowermost XYZ edges are all 0.0' do
|
177
|
+
expect(@solid).to receive(:translate!).with(16.5, 9.5, -5.0)
|
177
178
|
@solid.align_to_origin!
|
178
179
|
end
|
179
180
|
end
|
180
|
-
|
181
|
-
describe
|
181
|
+
|
182
|
+
describe '#center!' do
|
182
183
|
before do
|
183
|
-
@solid = Solid.parse(<<-
|
184
|
+
@solid = Triangular::Solid.parse(<<-SOLID)
|
184
185
|
solid y-axis-spacer
|
185
186
|
facet normal 0.0 0.0 -1.0
|
186
187
|
outer loop
|
@@ -197,12 +198,12 @@ describe Solid do
|
|
197
198
|
endloop
|
198
199
|
endfacet
|
199
200
|
endsolid y-axis-spacer
|
200
|
-
|
201
|
+
SOLID
|
201
202
|
end
|
202
|
-
|
203
|
-
it
|
204
|
-
@solid.
|
203
|
+
|
204
|
+
it 'should translate solid so the lowermost XYZ edges are all 0.0' do
|
205
|
+
expect(@solid).to receive(:translate!).with(-0.5, 4.0, -8.0)
|
205
206
|
@solid.center!
|
206
207
|
end
|
207
208
|
end
|
208
|
-
end
|
209
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
describe Triangular do
|
6
|
+
describe '.parse' do
|
7
|
+
it 'should return a Solid' do
|
8
|
+
stl_string = File.open("#{File.dirname(__FILE__)}/../fixtures/y-axis-spacer.stl").read
|
9
|
+
result = Triangular.parse(stl_string)
|
10
|
+
|
11
|
+
expect(result).to be_a Triangular::Solid
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
describe '.parse_file' do
|
16
|
+
it 'should return a Solid' do
|
17
|
+
input = File.open(File.expand_path("#{File.dirname(__FILE__)}/../fixtures/y-axis-spacer.stl")).read
|
18
|
+
result = Triangular.parse_file(File.expand_path("#{File.dirname(__FILE__)}/../fixtures/y-axis-spacer.stl"))
|
19
|
+
expect(result).to be_a Triangular::Solid
|
20
|
+
|
21
|
+
expect(result.to_s).to eq(input)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,77 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
describe Triangular::Units do
|
6
|
+
describe '.name' do
|
7
|
+
it "should return 'inches' for :inches" do
|
8
|
+
expect(Triangular::Units.name(:inches)).to eq('inches')
|
9
|
+
end
|
10
|
+
|
11
|
+
it "should return 'centimeters' for :centimeters" do
|
12
|
+
expect(Triangular::Units.name(:centimeters)).to eq('centimeters')
|
13
|
+
end
|
14
|
+
|
15
|
+
it "should return 'millimeters' for :millimeters" do
|
16
|
+
expect(Triangular::Units.name(:millimeters)).to eq('millimeters')
|
17
|
+
end
|
18
|
+
|
19
|
+
it "should return 'none' for :none" do
|
20
|
+
expect(Triangular::Units.name(:none)).to eq('none')
|
21
|
+
end
|
22
|
+
|
23
|
+
it 'should raise an exception if called with an unknown unit' do
|
24
|
+
expect do
|
25
|
+
Triangular::Units.name(:error)
|
26
|
+
end.to raise_error(Triangular::UnknownUnitError)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
describe '.svg_name' do
|
31
|
+
it "should return 'in' for :inches" do
|
32
|
+
expect(Triangular::Units.svg_name(:inches)).to eq('in')
|
33
|
+
end
|
34
|
+
|
35
|
+
it "should return 'cm' for :centimeters" do
|
36
|
+
expect(Triangular::Units.svg_name(:centimeters)).to eq('cm')
|
37
|
+
end
|
38
|
+
|
39
|
+
it "should return 'mm' for :millimeters" do
|
40
|
+
expect(Triangular::Units.svg_name(:millimeters)).to eq('mm')
|
41
|
+
end
|
42
|
+
|
43
|
+
it "should return '' for :none" do
|
44
|
+
expect(Triangular::Units.svg_name(:none)).to eq('')
|
45
|
+
end
|
46
|
+
|
47
|
+
it 'should raise an exception if called with an unknown unit' do
|
48
|
+
expect do
|
49
|
+
Triangular::Units.svg_name(:error)
|
50
|
+
end.to raise_error(Triangular::UnknownUnitError)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
describe '.stroke_width' do
|
55
|
+
it "should return 'in' for :inches" do
|
56
|
+
expect(Triangular::Units.stroke_width(:inches)).to eq(0.005)
|
57
|
+
end
|
58
|
+
|
59
|
+
it "should return 'cm' for :centimeters" do
|
60
|
+
expect(Triangular::Units.stroke_width(:centimeters)).to eq(0.01)
|
61
|
+
end
|
62
|
+
|
63
|
+
it "should return 'mm' for :millimeters" do
|
64
|
+
expect(Triangular::Units.stroke_width(:millimeters)).to eq(0.1)
|
65
|
+
end
|
66
|
+
|
67
|
+
it "should return '' for :none" do
|
68
|
+
expect(Triangular::Units.stroke_width(:none)).to eq(0.1)
|
69
|
+
end
|
70
|
+
|
71
|
+
it 'should raise an exception if called with an unknown unit' do
|
72
|
+
expect do
|
73
|
+
Triangular::Units.stroke_width(:error)
|
74
|
+
end.to raise_error(Triangular::UnknownUnitError)
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
describe Triangular::Vector do
|
6
|
+
describe '#angle_to' do
|
7
|
+
before do
|
8
|
+
@vector = Triangular::Vector.new(0.0, 0.0, -1.0)
|
9
|
+
end
|
10
|
+
|
11
|
+
it 'should return 180 for opposite vector' do
|
12
|
+
@vector.angle_to(Triangular::Vector.new(0.0, 0.0, 1.0))
|
13
|
+
end
|
14
|
+
|
15
|
+
it 'should retun 90 for perpendicular vector' do
|
16
|
+
@vector.angle_to(Triangular::Vector.new(1.0, 0.0, 0.0))
|
17
|
+
end
|
18
|
+
|
19
|
+
it 'should return 0 for same vector' do
|
20
|
+
@vector.angle_to(Triangular::Vector.new(0.0, 0.0, -1.0))
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
describe Triangular::Vertex do
|
6
|
+
describe '.parse' do
|
7
|
+
context 'with a correctly formatted vertex' do
|
8
|
+
before do
|
9
|
+
@result = Triangular::Vertex.parse(" vertex 16.5 0.0 -0.75\n")
|
10
|
+
end
|
11
|
+
|
12
|
+
it 'should return a vertex object' do
|
13
|
+
expect(@result).to be_a Triangular::Vertex
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'should correctly set the X value' do
|
17
|
+
expect(@result.x).to eq(16.5)
|
18
|
+
end
|
19
|
+
|
20
|
+
it 'should correctly set the Y value' do
|
21
|
+
expect(@result.y).to eq(0)
|
22
|
+
end
|
23
|
+
|
24
|
+
it 'should correctly set the Z value' do
|
25
|
+
expect(@result.z).to eq(-0.75)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
describe '#to_s' do
|
31
|
+
it "should return the keyword 'vertex' followed by the XYZ coordinates" do
|
32
|
+
vertex = Triangular::Vertex.new(1.0, 2.0, -3.0)
|
33
|
+
expect(vertex.to_s).to eq('vertex 1.0 2.0 -3.0')
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
describe '#==' do
|
38
|
+
it 'should return true when the vertices have identical values' do
|
39
|
+
expect(Triangular::Vertex.new(1.0, 2.0, -3.1) == Triangular::Vertex.new(1.0, 2.0, -3.1)).to be true
|
40
|
+
end
|
41
|
+
|
42
|
+
it 'should return false when the vertices do not have identical values' do
|
43
|
+
expect(Triangular::Vertex.new(1.0, 2.0, -3.1) == Triangular::Vertex.new(1.0, 2.0, -3.2)).to be false
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
data/triangular.gemspec
CHANGED
@@ -1,23 +1,27 @@
|
|
1
|
-
#
|
2
|
-
require File.expand_path("../lib/triangular/version", __FILE__)
|
1
|
+
# frozen_string_literal: true
|
3
2
|
|
4
|
-
|
5
|
-
s.name = "triangular"
|
6
|
-
s.version = Triangular::VERSION
|
7
|
-
s.platform = Gem::Platform::RUBY
|
8
|
-
s.authors = ["Aaron Gough"]
|
9
|
-
s.email = ["aaron@aarongough.com"]
|
10
|
-
s.homepage = "http://rubygems.org/gems/triangular"
|
11
|
-
s.summary = "[ALPHA] A simple Ruby library for reading, writing, and manipulating Stereolithography (STL) files."
|
12
|
-
s.description = "Triangular is an easy-to-use Ruby library for reading, writing and manipulating Stereolithography (STL) files.\n\n The main purpose of Triangular is to enable its users to quickly create new software for Rapid Prototyping and Personal Manufacturing applications. "
|
3
|
+
require File.expand_path('lib/triangular/version', __dir__)
|
13
4
|
|
14
|
-
|
15
|
-
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = 'triangular'
|
7
|
+
spec.version = Triangular::VERSION
|
8
|
+
spec.platform = Gem::Platform::RUBY
|
9
|
+
spec.authors = ['Aaron Gough']
|
10
|
+
spec.email = ['aaron@aarongough.com']
|
11
|
+
spec.license = "MIT"
|
12
|
+
spec.homepage = 'http://rubygems.org/gems/triangular'
|
13
|
+
spec.summary = 'A simple Ruby library for reading, writing, and manipulating Stereolithography (STL) files.'
|
14
|
+
spec.description = "Triangular is an easy-to-use Ruby library for reading, writing and manipulating Stereolithography (STL) files.\n\n The main purpose of Triangular is to enable its users to quickly create new software for Rapid Prototyping and Personal Manufacturing applications. "
|
16
15
|
|
17
|
-
|
18
|
-
|
16
|
+
spec.add_development_dependency 'bundler', '~> 1.0'
|
17
|
+
spec.add_development_dependency 'rspec', '~> 3'
|
18
|
+
spec.add_development_dependency 'rubocop', '~> 1.12'
|
19
|
+
spec.add_development_dependency 'ruby-prof', '~> 1.4'
|
20
|
+
spec.add_development_dependency 'simplecov', '0.17.1'
|
19
21
|
|
20
|
-
|
21
|
-
|
22
|
-
|
22
|
+
spec.required_ruby_version = '>= 1.9.0'
|
23
|
+
|
24
|
+
spec.files = `git ls-files`.split("\n")
|
25
|
+
spec.executables = `git ls-files`.split("\n").map { |f| f =~ %r{^bin/(.*)} ? Regexp.last_match(1) : nil }.compact
|
26
|
+
spec.require_path = 'lib'
|
23
27
|
end
|
metadata
CHANGED
@@ -1,55 +1,103 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: triangular
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
version: 0.0.2
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.1
|
6
5
|
platform: ruby
|
7
|
-
authors:
|
6
|
+
authors:
|
8
7
|
- Aaron Gough
|
9
|
-
autorequire:
|
8
|
+
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
- !ruby/object:Gem::Dependency
|
11
|
+
date: 2022-08-22 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
16
14
|
name: bundler
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version: 1.0.0
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.0'
|
24
20
|
type: :development
|
25
|
-
|
26
|
-
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
27
28
|
name: rspec
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '3'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '3'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rubocop
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.12'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.12'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: ruby-prof
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.4'
|
62
|
+
type: :development
|
28
63
|
prerelease: false
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.4'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: simplecov
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 0.17.1
|
35
76
|
type: :development
|
36
|
-
|
37
|
-
|
38
|
-
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 0.17.1
|
83
|
+
description: "Triangular is an easy-to-use Ruby library for reading, writing and manipulating
|
84
|
+
Stereolithography (STL) files.\n\n The main purpose of Triangular is to enable its
|
85
|
+
users to quickly create new software for Rapid Prototyping and Personal Manufacturing
|
86
|
+
applications. "
|
87
|
+
email:
|
39
88
|
- aaron@aarongough.com
|
40
89
|
executables: []
|
41
|
-
|
42
90
|
extensions: []
|
43
|
-
|
44
91
|
extra_rdoc_files: []
|
45
|
-
|
46
|
-
|
47
|
-
- .gitignore
|
92
|
+
files:
|
93
|
+
- ".github/workflows/build.yml"
|
94
|
+
- ".gitignore"
|
95
|
+
- ".rspec"
|
96
|
+
- ".rubocop.yml"
|
48
97
|
- Gemfile
|
49
98
|
- Gemfile.lock
|
50
99
|
- MIT-LICENSE
|
51
|
-
- README.
|
52
|
-
- Rakefile
|
100
|
+
- README.md
|
53
101
|
- examples/example_files/test_cube.stl
|
54
102
|
- examples/example_files/y-axis-spacer.stl
|
55
103
|
- examples/slice_example.rb
|
@@ -58,49 +106,50 @@ files:
|
|
58
106
|
- lib/triangular/line.rb
|
59
107
|
- lib/triangular/point.rb
|
60
108
|
- lib/triangular/polyline.rb
|
109
|
+
- lib/triangular/ray.rb
|
61
110
|
- lib/triangular/solid.rb
|
62
111
|
- lib/triangular/units.rb
|
63
112
|
- lib/triangular/vector.rb
|
64
113
|
- lib/triangular/version.rb
|
65
114
|
- lib/triangular/vertex.rb
|
66
|
-
- spec/
|
115
|
+
- spec/benchmark/benchmark_spec.rb
|
67
116
|
- spec/fixtures/test_cube.stl
|
68
117
|
- spec/fixtures/y-axis-spacer.stl
|
69
|
-
- spec/
|
70
|
-
- spec/point_spec.rb
|
71
|
-
- spec/polyline_spec.rb
|
72
|
-
- spec/solid_spec.rb
|
118
|
+
- spec/profile/profile_spec.rb
|
73
119
|
- spec/spec_helper.rb
|
74
|
-
- spec/
|
75
|
-
- spec/
|
76
|
-
- spec/
|
120
|
+
- spec/triangular/facet_spec.rb
|
121
|
+
- spec/triangular/line_spec.rb
|
122
|
+
- spec/triangular/point_spec.rb
|
123
|
+
- spec/triangular/polyline_spec.rb
|
124
|
+
- spec/triangular/ray_spec.rb
|
125
|
+
- spec/triangular/solid_spec.rb
|
126
|
+
- spec/triangular/triangular_spec.rb
|
127
|
+
- spec/triangular/units_spec.rb
|
128
|
+
- spec/triangular/vector_spec.rb
|
129
|
+
- spec/triangular/vertex_spec.rb
|
77
130
|
- triangular.gemspec
|
78
131
|
homepage: http://rubygems.org/gems/triangular
|
79
|
-
licenses:
|
80
|
-
|
81
|
-
|
132
|
+
licenses:
|
133
|
+
- MIT
|
134
|
+
metadata: {}
|
135
|
+
post_install_message:
|
82
136
|
rdoc_options: []
|
83
|
-
|
84
|
-
require_paths:
|
137
|
+
require_paths:
|
85
138
|
- lib
|
86
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
87
|
-
|
88
|
-
requirements:
|
139
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
140
|
+
requirements:
|
89
141
|
- - ">="
|
90
|
-
- !ruby/object:Gem::Version
|
91
|
-
version:
|
92
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
93
|
-
|
94
|
-
requirements:
|
142
|
+
- !ruby/object:Gem::Version
|
143
|
+
version: 1.9.0
|
144
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
145
|
+
requirements:
|
95
146
|
- - ">="
|
96
|
-
- !ruby/object:Gem::Version
|
97
|
-
version:
|
147
|
+
- !ruby/object:Gem::Version
|
148
|
+
version: '0'
|
98
149
|
requirements: []
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
summary: "[ALPHA] A simple Ruby library for reading, writing, and manipulating Stereolithography (STL) files."
|
150
|
+
rubygems_version: 3.2.3
|
151
|
+
signing_key:
|
152
|
+
specification_version: 4
|
153
|
+
summary: A simple Ruby library for reading, writing, and manipulating Stereolithography
|
154
|
+
(STL) files.
|
105
155
|
test_files: []
|
106
|
-
|