crystalscad 0.6.1 → 0.6.2
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.
- data/lib/crystalscad/CrystalScad.rb +24 -0
- data/lib/crystalscad/version.rb +1 -1
- metadata +3 -3
@@ -64,6 +64,30 @@ module CrystalScad
|
|
64
64
|
end
|
65
65
|
|
66
66
|
def cylinder(args)
|
67
|
+
# inner diameter handling
|
68
|
+
if args[:id]
|
69
|
+
id = args.delete(:id)
|
70
|
+
args2 = args.dup
|
71
|
+
args2[:d] = id
|
72
|
+
|
73
|
+
if args[:ih]
|
74
|
+
# if it has an inner height, add a tiny bit to the bottom
|
75
|
+
ih = args.delete(:ih)
|
76
|
+
args2[:h] = ih + 0.01
|
77
|
+
else
|
78
|
+
# otherwise add to both bottom and top to make a clear cut in OpenSCAD
|
79
|
+
args2[:h] += 0.02
|
80
|
+
end
|
81
|
+
|
82
|
+
# if we have a ifn value, change the fn value of the inner cut
|
83
|
+
if args[:ifn]
|
84
|
+
ifn = args.delete(:ifn)
|
85
|
+
args2[:fn] = ifn
|
86
|
+
end
|
87
|
+
|
88
|
+
return cylinder(args) - cylinder(args2).translate(z:-0.01)
|
89
|
+
end
|
90
|
+
|
67
91
|
Cylinder.new(args)
|
68
92
|
end
|
69
93
|
|
data/lib/crystalscad/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: crystalscad
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 3
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 6
|
9
|
-
-
|
10
|
-
version: 0.6.
|
9
|
+
- 2
|
10
|
+
version: 0.6.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Joachim Glauche
|