diff --git a/tests/png/printed_box.png b/tests/png/printed_box.png index 0c16a02..24fd5d1 100644 Binary files a/tests/png/printed_box.png and b/tests/png/printed_box.png differ diff --git a/vitamins/insert.scad b/vitamins/insert.scad index 8391a94..492b67e 100644 --- a/vitamins/insert.scad +++ b/vitamins/insert.scad @@ -137,19 +137,26 @@ module insert_lug(insert, wall, counter_bore = 0, extension = 0, corner_r = 0, f boss_h = insert_hole_length(insert); boss_h2 = boss_h + counter_bore; - module shape() - intersection() { + module shape() { + module _shape() hull() { circle(boss_r); translate([boss_r + extension - eps, 0]) square([eps, 2 * boss_r], center = true); } - if(corner_r) + + if(corner_r) + intersection() { + _shape(); + translate([boss_r + extension - corner_r, 0]) rotate(-45) quadrant(w = 100, r = corner_r - eps, center = true); - } + } + else + _shape(); + } translate_z(-boss_h) linear_extrude(boss_h) diff --git a/vitamins/jhead.scad b/vitamins/jhead.scad index 66b4c2b..1f6b4e6 100644 --- a/vitamins/jhead.scad +++ b/vitamins/jhead.scad @@ -179,23 +179,27 @@ module jhead_hot_end_assembly(type, filament, naked = false) { //! Assembly with // // heater block // - rotate(90) - translate([-nozzle_x(heater), 0, inset - insulator_length - heater_height(heater) / 2]) { - intersection() { - group() { - translate([resistor_x(heater), -exploded() * 15, 0]) - rotate([90, 0, 0]) - sleeved_resistor(resistor, PTFE20, bare = -10); + module heater_components() { + translate([resistor_x(heater), -exploded() * 15, 0]) + rotate([90, 0, 0]) + sleeved_resistor(resistor, PTFE20, bare = -10); + + translate([-heater_length(heater) / 2 + resistor_length(thermistor) / 2 - exploded() * 10, thermistor_y(heater), 0]) + rotate([90, 0, -90]) + sleeved_resistor(thermistor, PTFE07, heatshrink = HSHRNK16); + } + + rotate(90) + translate([-nozzle_x(heater), 0, inset - insulator_length - heater_height(heater) / 2]) + if(exploded()) + heater_components(); + else + intersection() { + heater_components(); - translate([-heater_length(heater) / 2 + resistor_length(thermistor) / 2 - exploded() * 10, thermistor_y(heater), 0]) - rotate([90, 0, -90]) - sleeved_resistor(thermistor, PTFE07, heatshrink = HSHRNK16); - } - if(!exploded()) if(naked) color("grey") cylinder(r = 12, h = 100, center = true); else cube(1, true); // hide the wires when not exploded - } - } + } }