Created
December 10, 2013 01:08
-
-
Save makevoid/7884148 to your computer and use it in GitHub Desktop.
Led holder 3d model made in in Oozby
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # oozby compile led_holder.ooz.rb; openscad -o led_holder.stl led_holder.ooz.scad | |
| resolution minimum: 0.5 | |
| # resolution minimum: 0.2 # I used 0.2 for my prints | |
| # led = 9 | |
| # ported by an old scad, rewrite with oozby's hexagonal_prism builtin function | |
| def hex_cyl(h, d) | |
| cylinder h, d/2, d/2#, $fn=6 | |
| end | |
| dim = 48; | |
| space = 12; | |
| height = 4; | |
| render do | |
| difference do | |
| cube [dim, dim, height], radius: 1.4 | |
| dim = dim-space | |
| (space..dim).step(space) do |x| | |
| (space..dim).step(space) do |y| | |
| translate(x: x, y: y, z: -1) do | |
| hex_cyl(10, 5.2) | |
| end | |
| end | |
| end | |
| end | |
| end | |
| # original openscad source | |
| # module hex_cyl(h, d) { | |
| # cylinder(h, d/2, d/2, $fn=6); | |
| # } | |
| # dim = 40; | |
| # space = 10; | |
| # height = 4; | |
| # render() difference() { | |
| # cube([dim, dim, height]); | |
| # for (x = [space : space : dim-space]) { | |
| # for (y = [space : space : dim-space]) { | |
| # translate([x, y, -1]) hex_cyl(10, 3.2); | |
| # } | |
| # } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment