X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=utils.scad;h=e440b5f03d6cf1966889522bbc497946d851fb57;hb=e39d790116ffb7a984c219927cf33c7258d98627;hp=6af49c493de8235e752d7de5f24c600d5c2ca08c;hpb=1203669b3a354dc244289e17656a9fcb396d53d3;p=reprap-play.git diff --git a/utils.scad b/utils.scad index 6af49c4..e440b5f 100644 --- a/utils.scad +++ b/utils.scad @@ -30,8 +30,22 @@ module rectfromto(a,b) { square([abs(ab[0]), abs(ab[1])]); } module circleat(c,r) { translate(c) circle(r); } -module linextr(z0,z1) { +module linextr(z0,z1, convexity=20) { translate([0,0,z0]) - linear_extrude(height=z1-z0) + linear_extrude(height=z1-z0, convexity=convexity) + children(); +} + +module linextr_x_yz(x0,x1, convexity=20) { // XY turn into YZ + rotate([90,0,0]) + rotate([0,90,0]) + linextr(x0,x1, convexity=convexity) + children(); +} + +module linextr_y_xz(y0,y1, convexity=20) { // XY turn into YZ + rotate([0,0,180]) + rotate([90,0,0]) + linextr(y0,y1, convexity=convexity) children(); }