File: offset-expected.csg

package info (click to toggle)
openscad 2015.03-2%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 30,804 kB
  • ctags: 5,692
  • sloc: cpp: 39,386; sh: 3,856; ansic: 3,674; python: 1,393; yacc: 496; lex: 272; lisp: 159; makefile: 67; xml: 60
file content (30 lines) | stat: -rw-r--r-- 938 bytes parent folder | download
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
27
28
29
30
group() {
	group();
	linear_extrude(height = 20, center = false, convexity = 1, scale = [0.5, 0.5], $fn = 40, $fa = 12, $fs = 2) {
		offset(r = 10, $fn = 40, $fa = 12, $fs = 2) {
			square(size = [50, 50], center = true);
		}
	}
	multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 20], [0, 0, 0, 1]]) {
		linear_extrude(height = 20, center = false, convexity = 1, scale = [1, 1], $fn = 40, $fa = 12, $fs = 2) {
			group() {
				difference() {
					offset(r = 1, $fn = 40, $fa = 12, $fs = 2) {
						group() {
							circle($fn = 40, $fa = 12, $fs = 2, r = 15);
						}
					}
					offset(r = -1, $fn = 40, $fa = 12, $fs = 2) {
						group() {
							circle($fn = 40, $fa = 12, $fs = 2, r = 15);
						}
					}
				}
			}
		}
	}
%	cylinder($fn = 40, $fa = 12, $fs = 2, h = 100, r1 = 14, r2 = 14, center = false);
%	multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 100], [0, 0, 0, 1]]) {
		sphere($fn = 40, $fa = 12, $fs = 2, r = 30);
	}
}