cadquery/notebook_nueva/dimensions.py

112 lines
2.3 KiB
Python

import components.audio_plug as audio_plug
import components.usb_hub as usb_hub
## Standard things (TODO move to separate file)
# M3 threaded insert sizes
ti_radius = 2.35
ti_depth = 6.25
# M3 hex nut dimensions
m3_hn_diam = 5.5
m3_hn_hole = 3
m3_hn_thickness = 2.5
# Dimensions for countersunk M4 screws
m4_top = 9
m4_bottom = 4
## Keyboard dimensions
kbd_height = 95.5
kbd_width = 305
## Screen dimensions
# Whole screen size
scr_w = 231
scr_h = 65
scr_thickness = 5.5
# Visible screen size
vis_w = 219
vis_h = 55
## Dimensions for the base of the computer
# Thickness of the outer material
shell_t = 3
# Size of the base
width = kbd_width + 2 * shell_t
height = 159
base_thickness = 30 + shell_t # 30 inside
# These are placed where convenient, and are used to join the top and bottom
# parts of the case.
# Measured from back-left corner OUTSIDE
mounting_pillar_positions = [
(6, 6),
(6, 43),
(120, 6),
(170, 6),
(width - 6, 6),
(width - 6, 43),
(120, 48),
(170, 48),
]
# Offset for the USB port from back-left corner
# of the case to left side of the hub
usb_offset_x = width - audio_plug.item_w - usb_hub.item_w
# CPU holder position from back-left corner of the case
cpu_offset_x = 177
cpu_offset_y = 2
# Battery holder position from back-left corner of the case
battery_offset_x = 15
battery_offset_y = 3
# HDMI out hole from back-left corner of the case
hdmi_out_offset_x = 138
## Dimensions for the Tandy lid
# Size of the whole object
tl_height = 66
tl_height_bottom = 59
tl_full_thickness = 48 # Will be shorter after construction
# Screen angle
tl_scr_angle = 20
## Dimensions for the hinged lid
# This is a constant used to control how far back the hinges go
# when open. It's arbitrary and can be adjusted experimentally
# printing small samples
hl_hinge_slant = shell_t + 2
hl_bezel_width = m3_hn_diam + 2
hl_bezel_height = 1
hl_bezel_thickness = 2
hl_hinge_radius = 5.5
hl_screw_radius = 1.5 # M3
hl_ring_radius = 5 # M3
hl_hinge_offset = max(p[1] for p in mounting_pillar_positions) + 6
hl_hinge_width = 25
# Base + this lid
hl_full_thickness = 43
## Dimensions for the simple lid
sl_lip_thickness = 1.5
sl_height = (
max([y for _, y in mounting_pillar_positions]) + 6 + shell_t + sl_lip_thickness
)
sl_thickness = shell_t
sl_front_lip = 8