crystalscad 0.6.1 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
 
@@ -1,4 +1,4 @@
1
1
  module CrystalScad
2
- VERSION = "0.6.1"
2
+ VERSION = "0.6.2"
3
3
  end
4
4
 
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: 5
4
+ hash: 3
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 6
9
- - 1
10
- version: 0.6.1
9
+ - 2
10
+ version: 0.6.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Joachim Glauche