]> www.ljiriste.work Git - telescope.git/commitdiff
First version of lens holder
authorLukáš Jiřiště <redacted>
Wed, 12 Aug 2026 16:07:46 +0000 (18:07 +0200)
committerLukáš Jiřiště <redacted>
Wed, 12 Aug 2026 16:07:46 +0000 (18:07 +0200)
.gitignore [new file with mode: 0644]
telescope.scad [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..1567411
--- /dev/null
@@ -0,0 +1 @@
+*.stl
diff --git a/telescope.scad b/telescope.scad
new file mode 100644 (file)
index 0000000..bdbe608
--- /dev/null
@@ -0,0 +1,62 @@
+$fn = 20;
+
+hole_slope = 0.037;
+hole_size = 12;
+
+wall_thickness = 5;
+
+screw_diameter = 3;
+
+frame_thickness = 5;
+frame_height = 20;
+
+compliance_length = wall_thickness + sqrt(2) * hole_size + 20;
+compliance_thickness = 2.5;
+
+holder_height = frame_height + 2 * wall_thickness;
+holder_length = compliance_length + 2 * wall_thickness + frame_thickness;
+holder_width = hole_size * sqrt(2) + 2 * wall_thickness;
+
+epsilon = 0.1;
+
+module holding_hole()
+{
+       height = holder_height + 2 * epsilon;
+       translate([hole_size / sqrt(2) + wall_thickness, holder_width / 2, -epsilon])
+               rotate(45, [0, 0, 1])
+                       linear_extrude(height = height, scale = 1 - hole_slope * height / hole_size)
+                               square(hole_size, center = true);
+}
+
+module frame_hole()
+{
+       translate([holder_length - wall_thickness - frame_thickness, -epsilon, wall_thickness])
+               cube([frame_thickness, holder_width + 2 * epsilon, frame_height]);
+}
+
+module compliance_hole()
+{
+       translate([0, (holder_width - compliance_thickness) / 2, -epsilon])
+               cube([compliance_length, compliance_thickness, holder_height + 2 * epsilon]);
+}
+
+module screw_hole()
+{
+       translate([wall_thickness / 2, holder_width / 2 - epsilon, holder_height / 2])
+               rotate(90, [1, 0, 0])
+                       cylinder(holder_width + 2 * epsilon, d = screw_diameter, center = true);
+}
+
+module lens_holder()
+{
+       difference()
+       {
+               cube([holder_length, holder_width, holder_height]);
+               frame_hole();
+               holding_hole();
+               compliance_hole();
+               screw_hole();
+       }
+}
+
+lens_holder();
\ No newline at end of file