cylindertransport.scad

Mon, 03 Apr 2017 04:19:45 +0200

author
mdd
date
Mon, 03 Apr 2017 04:19:45 +0200
changeset 4
f62562506053
parent 2
9ec8fa3d0348
permissions
-rw-r--r--

pylint

1
14a420653a5f output openscad script
mdd
parents:
diff changeset
1 /*
14a420653a5f output openscad script
mdd
parents:
diff changeset
2 OpenSCAD Template for visualizing cylindertransport.py
14a420653a5f output openscad script
mdd
parents:
diff changeset
3 */
14a420653a5f output openscad script
mdd
parents:
diff changeset
4 module tank(x, r, h) {
14a420653a5f output openscad script
mdd
parents:
diff changeset
5 cap = r;
2
9ec8fa3d0348 cleanup
mdd
parents: 1
diff changeset
6 color("SteelBlue") render() rotate([90,0,0]) {
1
14a420653a5f output openscad script
mdd
parents:
diff changeset
7 translate([x, r, cap]) {
14a420653a5f output openscad script
mdd
parents:
diff changeset
8 sphere(r = r); // bottom
14a420653a5f output openscad script
mdd
parents:
diff changeset
9 cylinder(h = h-2*cap, r = r);
14a420653a5f output openscad script
mdd
parents:
diff changeset
10 }
14a420653a5f output openscad script
mdd
parents:
diff changeset
11 translate([x, r, h-cap]) {
14a420653a5f output openscad script
mdd
parents:
diff changeset
12 sphere(r = r); // top
14a420653a5f output openscad script
mdd
parents:
diff changeset
13 cylinder(h = 30+cap, r = 25);
14a420653a5f output openscad script
mdd
parents:
diff changeset
14 }
2
9ec8fa3d0348 cleanup
mdd
parents: 1
diff changeset
15 }
1
14a420653a5f output openscad script
mdd
parents:
diff changeset
16 }
14a420653a5f output openscad script
mdd
parents:
diff changeset
17
14a420653a5f output openscad script
mdd
parents:
diff changeset
18 module spacer(x, r, rcylinder, h) {
14a420653a5f output openscad script
mdd
parents:
diff changeset
19 cap = rcylinder;
14a420653a5f output openscad script
mdd
parents:
diff changeset
20
2
9ec8fa3d0348 cleanup
mdd
parents: 1
diff changeset
21 color("DarkGrey") render() rotate([90,0,0])
1
14a420653a5f output openscad script
mdd
parents:
diff changeset
22 translate([x, r, cap]) {
14a420653a5f output openscad script
mdd
parents:
diff changeset
23 difference() {
14a420653a5f output openscad script
mdd
parents:
diff changeset
24 cylinder(h = h-2*cap, r = r);
14a420653a5f output openscad script
mdd
parents:
diff changeset
25 cylinder(h = h-2*cap, r = r-5);
14a420653a5f output openscad script
mdd
parents:
diff changeset
26 }
14a420653a5f output openscad script
mdd
parents:
diff changeset
27 }
14a420653a5f output openscad script
mdd
parents:
diff changeset
28 }
14a420653a5f output openscad script
mdd
parents:
diff changeset
29 $fn = 20;

mercurial