From b8e43952c263ed27c35def569ac7000421ec7dc7 Mon Sep 17 00:00:00 2001 From: "Jan \"Yenya\" Kasprzak" Date: Thu, 16 Nov 2017 14:51:09 +0100 Subject: [PATCH] 808 glasses holder - another interation --- 808-glasses-holder.scad | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/808-glasses-holder.scad b/808-glasses-holder.scad index c675f04..9834ad5 100644 --- a/808-glasses-holder.scad +++ b/808-glasses-holder.scad @@ -6,42 +6,44 @@ wall = 1.5; lens_size = 9.2; lens_depth = 3; lens_side = 0.9; -lens_angle = 0; +lens_up_angle = 0; cable_w = 7; stem_w = 2.75; slot_l = 8; slot_x_off = 6; -slot_angle = 15; +slot_angle = 10; slot_y_angle = 10; -// FIXME: Print rotated 180 degrees! module body() { - hull() { - rotate([lens_angle, 0, 0]) - translate([-lens_size/2-wall, 0, 0]) - cube([lens_size+2*wall, 2*wall+lens_depth, wall+lens_size/2]); - rotate([0, 0, slot_angle]) - translate([-stem_w-wall-slot_x_off, -slot_l, 0]) - cube([stem_w + 2*wall, slot_l, wall + lens_size/2]); + intersection() { + hull() { + // lens outer body + rotate([lens_up_angle, 0, 0]) + translate([-lens_size/2-wall, 0, 0]) + cube([lens_size+2*wall, 2*wall+lens_depth, wall+lens_size/2]); + // stem outer body + rotate([0, 0, slot_angle]) + translate([-stem_w-wall-slot_x_off, -slot_l, 0]) + cube([stem_w + 2*wall, slot_l, wall + lens_size/2]); + } + translate([-infty/2, -infty/2, 0]) + cube([infty, infty, wall+lens_size/2]); } } difference() { body(); - // bottom - translate([-infty/2, -infty/2, -infty]) cube(infty); // lens body - rotate([lens_angle, 0, 0]) + rotate([lens_up_angle, 0, 0]) translate([-lens_size/2, wall, wall+(wall+lens_depth)*tan(-lens_angle)]) cube([lens_size, lens_depth, lens_size + eps]); // lens front - rotate([lens_angle, 0, 0]) + rotate([lens_up_angle, 0, 0]) translate([-lens_size/2+lens_side, wall, wall+(wall+lens_depth)*tan(-lens_angle)]) cube([lens_size-2*lens_side, lens_depth+wall+eps, lens_size + wall + 2*eps]); // cable hole - rotate([lens_angle, 0, 0]) translate([-cable_w/2, wall, -eps]) cube([cable_w, lens_depth+wall+eps, lens_size+wall+2*eps]); rotate([0, 0, slot_angle]) -- 2.43.5