Created
December 31, 2014 13:12
-
-
Save cyrildiagne/33b982e788db26c73ca4 to your computer and use it in GitHub Desktop.
light line enclosure
This file contains 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
circuitLength = 66; | |
circuitClipHeight = 7; | |
circuitOffset = 4; | |
module xhole(radius, length) { | |
rotate(a=[0,90,0]) cylinder(r=radius,h=length+1,center=true, $fn=10); | |
} | |
module batteryClip(width, length, thickness) { | |
union() { | |
difference() { | |
union() { | |
translate([0,0,-thickness/2-width/4+4]) { | |
cube([2*thickness+length,2*thickness+width-0.11,thickness+width/2+9], center=true); | |
} | |
translate([length*0.5+thickness,-width*0.5-thickness,-10-thickness]) { | |
circuitClip(19,circuitLength+thickness,thickness); | |
} | |
} | |
union() { | |
rotate([0,90,0]) cylinder(r=width/2,h=length,$fn=30,center=true); | |
translate([0,0,width/1.5]) cube([length,width+2*thickness+1,width],center=true); | |
translate([0,1.5,0]) xhole(.75,length+2*thickness+1); | |
translate([0,-1.5,0]) xhole(.75,length+2*thickness+1); | |
translate([length/3.5,0,0]) cube([length/3.5,width+2*thickness+1,width], center=true); | |
translate([-length/3.5,0,0]) cube([length/3.5,width+2*thickness+1,width], center=true); | |
} | |
} | |
translate([-length*0.5, -width*0.5-thickness, -10]) { | |
cube([length+circuitLength+thickness*3, thickness, 2]); | |
} | |
translate([-length*0.5, width*0.5, -10]) { | |
cube([length+circuitLength+thickness*3, thickness, 2]); | |
} | |
} | |
} | |
module circuitClip(width, length, thickness) { | |
languette = 15; | |
difference() { | |
cube([length+circuitOffset+thickness,width+thickness*2, circuitClipHeight+thickness]); | |
translate([circuitOffset, thickness*1.25, thickness]) { | |
cube([length, width-thickness*0.50, circuitClipHeight+thickness]); | |
} | |
translate([circuitOffset, -thickness, thickness]) { | |
cube([languette, width+4*thickness, circuitClipHeight+thickness]); | |
} | |
translate([circuitOffset+40, -thickness, thickness]) { | |
cube([languette, width+4*thickness, circuitClipHeight+thickness]); | |
} | |
translate([length+circuitOffset-1, width*0.5-10*0.5+thickness, thickness]) { | |
cube([10, 10, circuitClipHeight+thickness]); | |
} | |
} | |
} | |
batteryClip(19,66,1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment