68 lines
1.8 KiB
OpenSCAD
68 lines
1.8 KiB
OpenSCAD
// Insert for table lamp
|
|
|
|
|
|
$fn = $preview? 12 : 128;
|
|
|
|
// Input Values
|
|
led_ring_dia = 75;
|
|
led_ring_height = 10;
|
|
led_arc = 185;
|
|
led_width = 11;
|
|
led_length = 110;
|
|
led_mount_thickness = 3;
|
|
pedestal_insert_width = 99.5;
|
|
pedestal_insert_height = 10;
|
|
pedestal_base_width = 120;
|
|
pedestal_base_height = 10;
|
|
dimple_radius=2;
|
|
|
|
// Calculated Values
|
|
led_arc_angle_rad = (led_length/led_arc);
|
|
led_arc_angle_deg = led_arc_angle_rad * (180/PI);
|
|
led_arc_angle = led_arc_angle_deg;
|
|
|
|
module led_mount() {
|
|
rotate([90,0,0])
|
|
translate([led_ring_dia/2-led_arc, led_ring_height, -led_width/2])
|
|
linear_extrude(height=led_width)
|
|
intersection() {
|
|
difference() {
|
|
circle(r=led_arc);
|
|
circle(r=led_arc-led_mount_thickness);
|
|
}
|
|
polygon([
|
|
[0,0],
|
|
[2*led_arc,0],
|
|
[2*led_arc*cos(led_arc_angle), 2*led_arc*sin(led_arc_angle)],
|
|
]);
|
|
}
|
|
|
|
};
|
|
|
|
/* for (i = [1:4]) { */
|
|
/* rotate([0,0,i*90+45]) */
|
|
/* led_mount(); */
|
|
/* } */
|
|
difference() {
|
|
union() {
|
|
cylinder(h=pedestal_insert_height,d=pedestal_insert_width);
|
|
translate([0,0,-10])
|
|
cylinder(h=pedestal_base_height,d=pedestal_base_width);
|
|
}
|
|
rotate([0,5,0])
|
|
translate([20,-6.25,0])
|
|
cube([100,12.5,20]);
|
|
}
|
|
|
|
module mirror_copy(vector) {
|
|
children();
|
|
mirror(vector)
|
|
children();
|
|
};
|
|
|
|
mirror_copy([0,1,0])
|
|
translate([0, (pedestal_insert_width/2)-dimple_radius/2, pedestal_insert_height-dimple_radius])
|
|
#sphere(r=dimple_radius);
|
|
rotate([0,0,90])
|
|
translate([0, (pedestal_insert_width/2)-dimple_radius/2, pedestal_insert_height-dimple_radius])
|
|
#sphere(r=dimple_radius);
|