jenncad 1.0.0.pre.alpha7 → 1.0.0.pre.alpha10

Sign up to get free protection for your applications and to get access to all the features.
@@ -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")