File: example001.scad

package info (click to toggle)
openscad 2011.12-3
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 9,080 kB
  • sloc: cpp: 19,710; python: 990; yacc: 558; sh: 537; ansic: 522; lex: 221; lisp: 147; xml: 36; makefile: 35
file content (26 lines) | stat: -rw-r--r-- 397 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26

module example001()
{
	function r_from_dia(d) = d / 2;

	module rotcy(rot, r, h) {
		rotate(90, rot)
			cylinder(r = r, h = h, center = true);
	}

	difference() {
		sphere(r = r_from_dia(size));
		rotcy([0, 0, 0], cy_r, cy_h);
		rotcy([1, 0, 0], cy_r, cy_h);
		rotcy([0, 1, 0], cy_r, cy_h);
	}

	size = 50;
	hole = 25;

	cy_r = r_from_dia(hole);
	cy_h = r_from_dia(size * 2.5);
}

example001();