openjscad-aurora-webapp
28 строк · 891.0 Байт
1// title: Hull()
2// author: Rene K. Mueller
3// license: MIT License
4// date: 2013/04/18
5
6function showHull() {7var o = Array.prototype.slice.call(arguments);8return union( // -- we have to extrude all, in order to union (we can't mix CAG and CSG)9linear_extrude({height: 0.1},union(o)).translate([20,0,0]), // flat single10linear_extrude({height: 0.1},hull(o)).translate([-10,0,0]), // flat convex hulled11linear_extrude({height: 10}, // convex hulled extruded12hull(o)).translate([-40,0,0])13);14}
15
16function main() {17return [18showHull(19circle({r: 8, center: true}).translate([0,20,0]),20circle({r: 8, center: true})21).translate([-20,-20,0]),22
23showHull(24circle({r: 8, center: true}).translate([-15,10,0]),25square({size: [10,10], center: true})26).translate([-20,30,0])27];28}
29