Skip to content

Instantly share code, notes, and snippets.

@makevoid
Created December 10, 2013 01:08
Show Gist options
  • Select an option

  • Save makevoid/7884148 to your computer and use it in GitHub Desktop.

Select an option

Save makevoid/7884148 to your computer and use it in GitHub Desktop.
Led holder 3d model made in in Oozby
# 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);
# }
# }
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment