chiark / gitweb /
fairphone-case: add TestLidWidthPrint
[reprap-play.git] / utils.scad
1 // -*- C -*-
2
3 // suitable for masking things within radius sqrt(2) only
4 module FArcSegment_mask(beta) {
5   for (i=[0 : 0.75 : 3]) {
6     rotate(i*beta/4)
7       polygon([[0, 0],
8                [1, 0],
9                [cos(beta/4), sin(beta/4)]]);
10   }
11 }
12
13 module FArcSegment(xc,yc,inrad,outrad,alpha,delta) {
14   translate([xc,yc]) {
15     intersection() {
16       difference() {
17         circle(r=outrad, $fn=70);
18         circle(r=inrad, $fn=70);
19       }
20       rotate(alpha) scale(outrad*2) {
21         FArcSegment_mask(delta);
22       }
23     }
24   }
25 }
26