dxf_dummy_generator 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/lib/dxf-dummy-generator/Dxf.rb +4 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NGE0MTk5NGQwODlhZTBlOWIxMjc2M2U3Yjg4MTY3NmQ1MDJkOTg1Nw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
M2FhN2YwMDY4NTg2OWQ1NzE5MGFhYjgxZGMxOTcyNjA1M2VkYWIwOA==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YjRiMTViYTUyNWEyMThjYjBjZjM2YjI5Y2Y5N2NiZTcyMGZhYzBiYTY0YTIx
|
10
|
+
MDQ2ZDI4ODc4MGYyZDY4N2RjYjlhMTJmZmFlZDk1YjBmZDA5ZjI5YTNlNGRk
|
11
|
+
ZjgzYmU1NWFiY2YxZjQ0YTg2ZDQ4MWZiMzgzODQ2MTVmY2VkMWU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NjNlYTlmZWI2MTJkMWQ4MzAyOWZmNDM1NmU4MTQzMGUwNjZkZDc1YmE1ZDRk
|
14
|
+
MThjMmY4OTczYmQ2ZTk1MTI3MGYyZWNlOGVhNzJhNjg3ZGE4YjE4MTZmOGIw
|
15
|
+
NWZhYTViZmY3N2ZhMDkwZTEzN2FhZThkZjcxYmYwMWMwOTY5ZGY=
|
@@ -7,15 +7,15 @@ class DXF
|
|
7
7
|
@settings = settings
|
8
8
|
@contours = Array.new
|
9
9
|
count = settings.contours.count
|
10
|
-
|
10
|
+
lines = (settings.lines.count / count).floor
|
11
|
+
r = lines #dynamicly scale circles to avoid precision problems
|
11
12
|
order = Array(0..count)
|
12
13
|
order = order.shuffle(random: settings.contours.seed) if settings.contours.random
|
13
14
|
raster = Math::sqrt(count).ceil
|
14
15
|
settings.contours.count.times do |i|
|
15
|
-
lines = (settings.lines.count / count).floor
|
16
16
|
lines = lines + (settings.lines.count % lines) if i == (settings.contours.count - 1)
|
17
|
-
x =
|
18
|
-
y =
|
17
|
+
x = 2 * r * 1.1 * (order[i] % raster)
|
18
|
+
y = 2 * r * 1.1 * (order[i] / raster)
|
19
19
|
center = Point.new(x, y)
|
20
20
|
@contours << getLines(lines, center, r)
|
21
21
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dxf_dummy_generator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sille Van Landschoot
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-06-
|
11
|
+
date: 2013-06-20 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Creates dummy dxf files
|
14
14
|
email: info@sillevl.be
|