rubyscad 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +21 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/Rakefile +1 -0
- data/examples/BasicCube.rb +50 -0
- data/examples/ChamferCube.rb +96 -0
- data/examples/FilletCube.rb +317 -0
- data/examples/example001.rb +33 -0
- data/examples/example001.scad +11 -0
- data/examples/example002.rb +23 -0
- data/examples/example002.scad +18 -0
- data/examples/example003.rb +19 -0
- data/examples/example003.scad +15 -0
- data/examples/example004.rb +11 -0
- data/examples/example004.scad +6 -0
- data/examples/example005.rb +22 -0
- data/examples/example005.scad +31 -0
- data/examples/example006.rb +46 -0
- data/examples/example006.scad +221 -0
- data/examples/example007.dxf +2410 -0
- data/examples/example007.rb +53 -0
- data/examples/example007.scad +30 -0
- data/examples/example008.dxf +3238 -0
- data/examples/example008.rb +34 -0
- data/examples/example008.scad +26 -0
- data/examples/example009.dxf +3894 -0
- data/examples/example009.rb +33 -0
- data/examples/example009.scad +15 -0
- data/examples/example010.dat +51 -0
- data/examples/example010.rb +12 -0
- data/examples/example010.scad +7 -0
- data/examples/example011.rb +22 -0
- data/examples/example011.scad +3 -0
- data/examples/example012.rb +16 -0
- data/examples/example012.scad +8 -0
- data/examples/example012.stl +450 -0
- data/examples/example013.dxf +2276 -0
- data/examples/example013.rb +16 -0
- data/examples/example013.scad +12 -0
- data/examples/example014.rb +14 -0
- data/examples/example014.scad +12 -0
- data/examples/example015.rb +33 -0
- data/examples/example015.scad +22 -0
- data/examples/example016.rb +43 -0
- data/examples/example016.scad +49 -0
- data/examples/example016.stl +0 -0
- data/examples/example017.rb +170 -0
- data/examples/example017.scad +124 -0
- data/examples/example018.rb +29 -0
- data/examples/example018.scad +74 -0
- data/examples/example019.rb +22 -0
- data/examples/example019.scad +84 -0
- data/examples/example020.rb +92 -0
- data/examples/example020.scad +62 -0
- data/examples/example021.rb +42 -0
- data/examples/example021.scad +159 -0
- data/examples/example022.rb +44 -0
- data/examples/example022.scad +103 -0
- data/lib/{RubyScad.rb → rubyscad/RubyScad.rb} +0 -0
- data/lib/rubyscad/version.rb +1 -1
- data/lib/rubyscad.rb +1 -1
- data/rubyscad.gemspec +20 -0
- metadata +66 -7
@@ -0,0 +1,53 @@
|
|
1
|
+
require "rubyscad"
|
2
|
+
|
3
|
+
module Example007
|
4
|
+
extend RubyScad
|
5
|
+
|
6
|
+
def self.cutout()
|
7
|
+
intersection() {
|
8
|
+
rotate(a: 90, v: [1, 0, 0])
|
9
|
+
translate(z: -50)
|
10
|
+
linear_extrude(height: 100, convexity: 1)
|
11
|
+
import(file:"example007.dxf", layer:"cutout1")
|
12
|
+
rotate(a: 90, v: [0, 0, 1])
|
13
|
+
rotate(a: 90, v: [1, 0, 0])
|
14
|
+
translate(z: -50)
|
15
|
+
linear_extrude(height: 100, convexity: 2)
|
16
|
+
import(file: "example007.dxf", layer: "cutout2")
|
17
|
+
}
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.clip()
|
21
|
+
difference() {
|
22
|
+
rotate_extrude(convexity: 3, file: "example007.dxf", layer: "dorn")
|
23
|
+
[0, 90].each { |r| rotate(z: r); cutout() }
|
24
|
+
}
|
25
|
+
end
|
26
|
+
|
27
|
+
def self.cutview()
|
28
|
+
difference() {
|
29
|
+
difference() {
|
30
|
+
translate(z: -10); clip()
|
31
|
+
rotate(z: 20)
|
32
|
+
rotate(y: -20)
|
33
|
+
translate(x: 18)
|
34
|
+
cube(size: 30, center: true)
|
35
|
+
}
|
36
|
+
|
37
|
+
render(convexity: 5)
|
38
|
+
intersection() {
|
39
|
+
translate(z: -10)
|
40
|
+
clip
|
41
|
+
rotate(z: 20)
|
42
|
+
rotate(y: -20)
|
43
|
+
translate(x: 18)
|
44
|
+
cube(size: 30, center: true)
|
45
|
+
}
|
46
|
+
}
|
47
|
+
end
|
48
|
+
|
49
|
+
translate(z: -10); clip()
|
50
|
+
#cutview()
|
51
|
+
end
|
52
|
+
|
53
|
+
|
@@ -0,0 +1,30 @@
|
|
1
|
+
//created with rubyscad 1.0
|
2
|
+
|
3
|
+
translate(v = [0, 0, -10])
|
4
|
+
difference() {
|
5
|
+
rotate_extrude(convexity = 3, file = "example007.dxf", layer = "dorn");
|
6
|
+
rotate(a = [0, 0, 0])
|
7
|
+
intersection() {
|
8
|
+
rotate(a = 90, v = [1, 0, 0])
|
9
|
+
translate(v = [0, 0, -50])
|
10
|
+
linear_extrude(height = 100, convexity = 1)
|
11
|
+
import(file = "example007.dxf", layer = "cutout1");
|
12
|
+
rotate(a = 90, v = [0, 0, 1])
|
13
|
+
rotate(a = 90, v = [1, 0, 0])
|
14
|
+
translate(v = [0, 0, -50])
|
15
|
+
linear_extrude(height = 100, convexity = 2)
|
16
|
+
import(file = "example007.dxf", layer = "cutout2");
|
17
|
+
}
|
18
|
+
rotate(a = [0, 0, 90])
|
19
|
+
intersection() {
|
20
|
+
rotate(a = 90, v = [1, 0, 0])
|
21
|
+
translate(v = [0, 0, -50])
|
22
|
+
linear_extrude(height = 100, convexity = 1)
|
23
|
+
import(file = "example007.dxf", layer = "cutout1");
|
24
|
+
rotate(a = 90, v = [0, 0, 1])
|
25
|
+
rotate(a = 90, v = [1, 0, 0])
|
26
|
+
translate(v = [0, 0, -50])
|
27
|
+
linear_extrude(height = 100, convexity = 2)
|
28
|
+
import(file = "example007.dxf", layer = "cutout2");
|
29
|
+
}
|
30
|
+
}
|