129 lines
3.3 KiB
OpenSCAD
129 lines
3.3 KiB
OpenSCAD
|
|
||
|
module top_outer_plate() {
|
||
|
difference() {
|
||
|
circle(d=lamp_dia);
|
||
|
circle(d=screw_dia);
|
||
|
};
|
||
|
}
|
||
|
|
||
|
module top_inner_plate() {
|
||
|
difference() {
|
||
|
union() {
|
||
|
difference() {
|
||
|
circle(d=lamp_dia);
|
||
|
circle(d=acryl_outer_dia);
|
||
|
}
|
||
|
|
||
|
circle(d=acryl_inner_dia);
|
||
|
}
|
||
|
|
||
|
union() {
|
||
|
for(angle = [0:45:7*45]) {
|
||
|
rotate(angle) translate([tooth_distance/2, holder_offset])
|
||
|
square([tooth_width, wood_thickness], center=true);
|
||
|
rotate(angle) translate([-tooth_distance/2, holder_offset])
|
||
|
square([tooth_width, wood_thickness], center=true);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
circle(d=screw_dia);
|
||
|
};
|
||
|
}
|
||
|
|
||
|
module cable_holes() {
|
||
|
difference() {
|
||
|
circle(d = acryl_inner_dia-2*cable_hole_spacing);
|
||
|
circle(r = holder_offset + cable_hole_spacing);
|
||
|
|
||
|
for(angle = [0:45:7*45]) {
|
||
|
rotate(angle+22.5)
|
||
|
translate([0, lamp_dia/4]) square([cable_hole_spacing, lamp_dia/2], center=true);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
module box_tooth_holes() {
|
||
|
}
|
||
|
|
||
|
module bottom_inner_plate() {
|
||
|
difference() {
|
||
|
top_inner_plate();
|
||
|
cable_holes();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
module bottom_outer_plate() {
|
||
|
difference() {
|
||
|
top_outer_plate();
|
||
|
cable_holes();
|
||
|
box_wall_tooth_holes();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
module base_plate() {
|
||
|
difference() {
|
||
|
top_outer_plate();
|
||
|
box_tooth_holes();
|
||
|
box_wall_tooth_holes();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
module ledstrip_holder() {
|
||
|
union() {
|
||
|
square([holder_width, inner_height], center=true);
|
||
|
translate([tooth_distance/2, (inner_height + tooth_height)/2]) square([tooth_width, tooth_height], center=true);
|
||
|
translate([-tooth_distance/2, (inner_height + tooth_height)/2]) square([tooth_width, tooth_height], center=true);
|
||
|
translate([tooth_distance/2, -(inner_height + tooth_height)/2]) square([tooth_width, tooth_height], center=true);
|
||
|
translate([-tooth_distance/2, -(inner_height + tooth_height)/2]) square([tooth_width, tooth_height], center=true);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
module box_wall() {
|
||
|
teeth_topbottom = floor(bottom_box_wall_width / tooth_distance);
|
||
|
teeth_right = floor(bottom_box_height / tooth_distance);
|
||
|
teeth_left = teeth_right - 1;
|
||
|
|
||
|
union() {
|
||
|
square([bottom_box_wall_width, bottom_box_height], center=true);
|
||
|
|
||
|
start_pos_tb = -(tooth_distance * teeth_topbottom)/2 + tooth_distance/2;
|
||
|
|
||
|
for(i = [0:teeth_topbottom-1]) {
|
||
|
translate([start_pos_tb + i*tooth_distance, (bottom_box_height + tooth_height)/2])
|
||
|
square([tooth_width, tooth_height], center=true);
|
||
|
translate([start_pos_tb + i*tooth_distance, -(bottom_box_height + tooth_height)/2])
|
||
|
square([tooth_width, tooth_height], center=true);
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
start_pos_r = -(tooth_distance * teeth_right)/2 + tooth_distance/2;
|
||
|
|
||
|
for(i = [0:teeth_right-1]) {
|
||
|
translate([(bottom_box_wall_width + tooth_width)/2, start_pos_r + i*tooth_distance])
|
||
|
square([tooth_height, tooth_width], center=true);
|
||
|
}
|
||
|
|
||
|
start_pos_l = -(tooth_distance * teeth_left)/2 - tooth_distance/2;
|
||
|
|
||
|
for(i = [1:teeth_left]) {
|
||
|
translate([-(bottom_box_wall_width + tooth_width)/2, start_pos_l + i*tooth_distance])
|
||
|
square([tooth_height, tooth_width], center=true);
|
||
|
}
|
||
|
*/
|
||
|
}
|
||
|
}
|
||
|
|
||
|
module box_wall_tooth_holes() {
|
||
|
teeth_topbottom = floor(bottom_box_wall_width / tooth_distance);
|
||
|
|
||
|
start_pos_tb = -(tooth_distance * teeth_topbottom)/2 + tooth_distance/2;
|
||
|
|
||
|
for(angle = [0:45:7*45]) {
|
||
|
rotate(angle)
|
||
|
for(i = [0:teeth_topbottom-1]) {
|
||
|
translate([start_pos_tb + i*tooth_distance, bottom_box_wall_offset])
|
||
|
square([tooth_width, tooth_height], center=true);
|
||
|
}
|
||
|
}
|
||
|
}
|