From f660fd59bac4abb75699bb3d587c2960662022c3 Mon Sep 17 00:00:00 2001 From: wes Date: Fri, 12 Jul 2024 14:50:11 -0400 Subject: [PATCH] simplify, leave out top, thicken sides --- amp_case.py | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/amp_case.py b/amp_case.py index d512349..369a7f3 100644 --- a/amp_case.py +++ b/amp_case.py @@ -11,20 +11,21 @@ import cadquery as cq import cqmore from math import ceil, floor -amp_bottom_height = 16 # how tall the pcb is +side_width = 5 +bottom_width = 5 +middle_width = 2 + +amp_bottom_height = 19 + bottom_width + middle_width # how tall the pcb is battery_width = 26 battery_height = 17 amp_width = 62 amp_length = 60 -amp_height = battery_height + amp_bottom_height + 10 - -side_width = 3 -middle_width = 2 +amp_height = battery_height + amp_bottom_height -result = Workplane().box(amp_length, amp_width, side_width) +result = Workplane().box(amp_length, amp_width, middle_width) result = ( - result.workplane(offset=(floor(amp_height / 2) - 1)) + result.workplane(offset=0) .center(0, -(amp_width / 2)) .line(0, amp_width, forConstruction=True) .vertices() @@ -32,14 +33,11 @@ result = ( ) result = ( - result.workplane(offset=ceil((amp_height / 2) + side_width * 2) + 1) + result.workplane(offset=amp_height/2) .center(0, amp_width / 2) - .box(amp_length, amp_width + side_width, side_width) + .box(amp_length, amp_width + bottom_width, bottom_width) ) -result = result.workplane(offset=0).box(amp_length, amp_width + side_width, middle_width) - - cq.exporters.export(result, "/home/deck/model_files/amp_case.step") try: