91 lines
2.3 KiB
OpenSCAD
91 lines
2.3 KiB
OpenSCAD
/* https://github.com/BelfrySCAD/BOSL2 */
|
|
include <BOSL2/std.scad>
|
|
include <BOSL2/hooks.scad>
|
|
|
|
$fn = 75;
|
|
|
|
/* [Clip] */
|
|
|
|
// Thickness of the clip
|
|
roof_clip_thickness = 3;
|
|
|
|
// Width of the clip (height on the print bed)
|
|
roof_clip_width = 7;
|
|
|
|
// Length of the straight pieces of the clip
|
|
roof_clip_length = 110;
|
|
|
|
// Angle of the opening
|
|
roof_clip_opening_deg = 160; // [90:180]
|
|
|
|
// Radius of the round part at the top of the opening
|
|
roof_clip_opening_radius = 25;
|
|
|
|
/* [Light Holder] */
|
|
|
|
// Diameter of the light
|
|
light_diameter = 16.25;
|
|
|
|
// Offset of the light from the center of the roof ridge
|
|
light_offset = 25;
|
|
|
|
// Width of the opening at the light holder
|
|
light_opening = 6;
|
|
|
|
// Distance between first and second light holder
|
|
light_second_distance = 25;
|
|
|
|
assert(light_second_distance>=light_offset);
|
|
|
|
clip_path = turtle([
|
|
"left", 90,
|
|
"arcleft", roof_clip_opening_radius, roof_clip_opening_deg/2,
|
|
"move", roof_clip_length,
|
|
"left", 45,
|
|
"move", 15,
|
|
"left", 90,
|
|
"move", 15
|
|
]);
|
|
|
|
second_holder_path = turtle([
|
|
"move", light_second_distance-(light_offset-light_diameter),
|
|
"arcleft", light_offset-light_diameter, 90,
|
|
"move", light_diameter
|
|
]);
|
|
|
|
module holder_clip() {
|
|
translate([0,light_offset,0])
|
|
difference() {
|
|
ring_hook([2*roof_clip_thickness+light_diameter, roof_clip_thickness], 0.5*light_diameter+roof_clip_width, id=light_diameter, wall=roof_clip_thickness, spin=90);
|
|
up(light_diameter+roof_clip_width)
|
|
cube([roof_clip_thickness,light_opening,light_diameter], center=true);
|
|
}
|
|
}
|
|
|
|
linear_extrude(roof_clip_width)
|
|
group() {
|
|
/* left roof clip side */
|
|
stroke(clip_path, width=roof_clip_thickness, closed=false);
|
|
|
|
/* right roof clip side */
|
|
yflip()
|
|
stroke(clip_path, width=roof_clip_thickness, closed=false);
|
|
|
|
/* Second light holder */
|
|
stroke(second_holder_path, width=roof_clip_thickness, closed=false);
|
|
|
|
/* Dot for additional support */
|
|
right(roof_clip_thickness)
|
|
regular_ngon(n=3, id=2*roof_clip_thickness);
|
|
}
|
|
|
|
/* Light holder */
|
|
left(roof_clip_thickness/2)
|
|
cube([roof_clip_thickness,light_offset+light_diameter/2+roof_clip_thickness,roof_clip_width]);
|
|
|
|
/* Light holder clip */
|
|
holder_clip();
|
|
|
|
/* Second light holder clip */
|
|
right(light_second_distance)
|
|
holder_clip(); |