jenncad 1.0.0.pre.alpha8 → 1.0.0.pre.alpha11

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/examples/old/test.rb DELETED
@@ -1,18 +0,0 @@
1
- require 'jenncad'
2
- include JennCad
3
- include JennCad::Extras
4
- Nut = Din934
5
-
6
- res = cylinder(d:40,h:20)
7
-
8
- n = Nut.new(4)
9
- res -= n.cut
10
-
11
- n = Nut.new(4)
12
- res -= n.cut.translate(x:20)
13
- res += n.show.translate(x:20)
14
-
15
-
16
-
17
- a = OpenScad.new(res)
18
- a.save("examples/test1.scad")
@@ -1,21 +0,0 @@
1
- require 'rubygems'
2
- require 'jenncad'
3
- include JennCad
4
- include JennCad::Extras
5
- Nut = Din934
6
-
7
- h1 = 10
8
- h2 = 20
9
- res = cube([10,20,h1])
10
- res += cylinder(d:40,h:h2).move(z:h1)
11
-
12
-
13
- n = Nut.new(4)
14
- res -= n.cut
15
-
16
- n = Nut.new(4)
17
- res -= n.cut.move(z:h1+h2-n.height)
18
-
19
-
20
-
21
- res.openscad("examples/test1.scad")
@@ -1,9 +0,0 @@
1
- require 'jenncad'
2
- include JennCad
3
-
4
- res = import("involute_gears","bevel_gear",number_of_teeth:13, bore_diameter:10)
5
- res += import("involute_gears","bevel_gear",number_of_teeth:6, bore_diameter:5).rotate(x:90).translate(y:50,z:30)
6
-
7
-
8
- a = OpenScad.new(res)
9
- a.save("examples/test2.scad")
@@ -1,15 +0,0 @@
1
- require 'rubygems'
2
- require 'jenncad'
3
- include JennCad
4
- include JennCad::Extras
5
- Nut = Din934
6
-
7
- res = cylinder(d:40,h:20)
8
- res &= cylinder(d:40,h:20).translate(x:20)
9
- res &= cube([20,20,20]).translate(y:20)
10
-
11
- res.skew(y:-0.3)
12
-
13
-
14
- a = OpenScad.new(res)
15
- a.save("examples/test3.scad")
@@ -1,17 +0,0 @@
1
- require 'rubygems'
2
- require 'jenncad'
3
- include JennCad
4
- include JennCad::Extras
5
- Nut = Din934
6
-
7
- res = cube([30,30,10]).center_xy
8
- res -= cylinder(d:20,h:2)
9
-
10
- cyl = cylinder(d:10,h:5).translate(z:5)
11
- res -= cyl
12
-
13
- puts cyl.calc_z+cyl.calc_h
14
-
15
-
16
- a = OpenScad.new(res)
17
- a.save("examples/test4.scad")
@@ -1,31 +0,0 @@
1
- require 'rubygems'
2
- require 'jenncad'
3
- include JennCad
4
- include JennCad::Extras
5
- Nut = Din934
6
-
7
- res = cube([30,30,10]).center_xy
8
- # at this moment, res is a cube
9
- res.color = "Blue"
10
-
11
- res += cylinder(d:10,h:20)
12
- # with the += operator, res is now a union boolean object
13
- res.color [120,20,13,200]
14
-
15
- # everything added to the union will remain this color
16
- res += cylinder(d:6,h:25)
17
-
18
- # unless specified otherwise
19
- res += cylinder(d:5, h:30).color("red")
20
-
21
-
22
-
23
- # subtracting will change res to a subtraction object
24
- res -= cylinder(d:4, h:30)
25
- res += cylinder(d:2, h:40)
26
- res.color("green")
27
-
28
-
29
-
30
- a = OpenScad.new(res)
31
- a.save("examples/test5.scad")