diff --git a/vitamins/panel_meter.scad b/vitamins/panel_meter.scad index f2472e6..4d1cc71 100644 --- a/vitamins/panel_meter.scad +++ b/vitamins/panel_meter.scad @@ -77,7 +77,6 @@ module panel_meter(type) { //! Draw panel mounted LCD meter module tab_z = pmeter_tab_z(type); pcb = pmeter_pcb(type); ap2 = pmeter_inner_ap(type); - pcb_h = pmeter_pcb_h(type) - bezel.z; buttons = pmeter_buttons(type); color("#94A7AB") @@ -146,15 +145,16 @@ module panel_meter(type) { //! Draw panel mounted LCD meter module translate(pmeter_inner_ap_o(type)) square([ap2.x, ap2.y], center = true); } - if(pcb) + if(pcb) { vflip() translate_z(h - pcb_thickness(pcb) - pmeter_pcb_z(type)) pcb(pcb); - if(pcb_h > 0) - %translate_z(-pcb_h / 2 - eps) - cube([size.x - 2 * t - eps, size.y - 2 * t - eps, pcb_h], center = true); - + pcb_h = pmeter_pcb_h(type) - bezel.z; + if(pcb_h > 0) + %translate_z(-pcb_h / 2 - eps) + cube([size.x - 2 * t - eps, size.y - 2 * t - eps, pcb_h], center = true); + } if(buttons) for(b = buttons) panel_meter_button(b); diff --git a/vitamins/panel_meters.scad b/vitamins/panel_meters.scad index 5e7df72..a2b6d5a 100644 --- a/vitamins/panel_meters.scad +++ b/vitamins/panel_meters.scad @@ -44,7 +44,7 @@ DSP5005 = ["DSP5005", "Ruideng DSP5005 Power supply module", [7 DSN_VC288PCB = ["", "", 41, 21, 1, 0, 0, 0, "green", false, [], [[ 5, -3, 0, "jst_xh", 3], ], []]; DSN_VC288 = ["DSN_VC288","DSN-VC288 DC 100V 10A Voltmeter ammeter", [45.3, 26, 17.4], [47.8, 28.8, 2.5], 0, [1, 1.8], [36, 18, 2.5], [], 0, 2, - [], 0, DSN_VC288PCB, 5]; + [], 0, DSN_VC288PCB, 5, 0]; panel_meters = [DSN_VC288, PZEM021, PZEM001, DSP5005]; diff --git a/vitamins/stepper_motor.scad b/vitamins/stepper_motor.scad index 3d4aaad..e97d892 100644 --- a/vitamins/stepper_motor.scad +++ b/vitamins/stepper_motor.scad @@ -89,7 +89,7 @@ module NEMA(type, shaft_angle = 0) { //! Draw specified NEMA stepper motor tube(or = boss_rad, ir = shaft_rad + 2, h = boss_height * 2); // raised boss linear_extrude(eps) - cap_shape(true); + cap_shape(1); } color(stepper_cap_colour) // aluminium end caps