Refactoring dimensions into a separate module

This commit is contained in:
Roberto Alsina 2023-04-15 17:38:43 -03:00
parent 8e0d3ad1a2
commit c53263626c
16 changed files with 373 additions and 344 deletions

View File

@ -0,0 +1,95 @@
import audio_plug
import 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
## 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
## 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

View File

@ -1,53 +1,19 @@
import cadquery as cq
from cadquery import exporters
import screen_pillars
from modelo import (
height,
mounting_pillar_positions,
ti_depth,
ti_radius,
width,
thickness as model_thickness,
shell_t,
)
import dimensions as dim
import keyboard
import screen_mount
import keyboard
hinge_radius = 5.5
screw_radius = 1.5 # M3
ring_radius = 5 # M3
hinge_offset = max(p[1] for p in mounting_pillar_positions) + 6
hinge_width = 25
thickness = 43
mounting_pillar_positions = [(x, -y) for x, y in mounting_pillar_positions]
mounting_pillar_positions = [(x, -y) for x, y in dim.mounting_pillar_positions]
mounting_pillars = (
cq.Sketch()
.push(mounting_pillar_positions)
.push(dim.mounting_pillar_positions)
.trapezoid(-12, 12, 90, mode="a")
.circle(ti_radius, mode="s")
.circle(dim.ti_radius, mode="s")
.clean()
)
# 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
hinge_slant = shell_t + 2
# M3 hex nut dimensions
m3_hn_diam = 5.5
m3_hn_hole = 3
m3_hn_thickness = 2.5
bezel_width = m3_hn_diam + 2
bezel_height = 1
bezel_thickness = 2
def model():
# Create a 2-part hinged lid
@ -55,8 +21,8 @@ def model():
model = (
cq.Workplane("XY")
# Hollow box
.workplane(offset=-thickness / 2)
.box(width, height, thickness)
.workplane(offset=-dim.hl_full_thickness / 2)
.box(dim.width, dim.height, dim.hl_full_thickness)
.tag("base")
.edges("|X and >Z and <Y")
.fillet(10)
@ -65,90 +31,110 @@ def model():
.edges("|Z")
.fillet(2)
.faces("<Z")
.shell(-shell_t)
.shell(-dim.shell_t)
.faces(">X")
.workplane()
.center(height / 2 - hinge_offset, thickness / 2 - hinge_radius)
.center(
dim.height / 2 - dim.hl_hinge_offset,
dim.hl_full_thickness / 2 - dim.hl_hinge_radius,
)
.tag("rightSide")
# Outer surface of the hinge
.workplaneFromTagged("rightSide")
.placeSketch(cq.Sketch().circle(hinge_radius))
.extrude(-hinge_width)
.placeSketch(cq.Sketch().circle(dim.hl_hinge_radius))
.extrude(-dim.hl_hinge_width)
.workplaneFromTagged("rightSide")
.workplane(offset=-width + hinge_width)
.placeSketch(cq.Sketch().circle(hinge_radius))
.extrude(-hinge_width)
.workplane(offset=-dim.width + dim.hl_hinge_width)
.placeSketch(cq.Sketch().circle(dim.hl_hinge_radius))
.extrude(-dim.hl_hinge_width)
# Cut middle section between the hinges
.workplaneFromTagged("rightSide")
.workplane(offset=-hinge_width)
.workplane(offset=-dim.hl_hinge_width)
.placeSketch(
cq.Sketch().polygon(
[
(-hinge_radius, -hinge_radius),
(-hinge_radius, 0),
(-hinge_radius - hinge_slant, hinge_radius),
(-hinge_slant, hinge_radius),
(-hinge_slant, hinge_radius - hinge_slant),
(hinge_radius, hinge_radius - hinge_slant),
(hinge_radius, -hinge_radius),
(-hinge_radius, -hinge_radius),
(-dim.hl_hinge_radius, -dim.hl_hinge_radius),
(-dim.hl_hinge_radius, 0),
(-dim.hl_hinge_radius - dim.hl_hinge_slant, dim.hl_hinge_radius),
(-dim.hl_hinge_slant, dim.hl_hinge_radius),
(-dim.hl_hinge_slant, dim.hl_hinge_radius - dim.hl_hinge_slant),
(dim.hl_hinge_radius, dim.hl_hinge_radius - dim.hl_hinge_slant),
(dim.hl_hinge_radius, -dim.hl_hinge_radius),
(-dim.hl_hinge_radius, -dim.hl_hinge_radius),
]
)
)
.cutBlind(-width + 2 * hinge_width - 1)
.cutBlind(-dim.width + 2 * dim.hl_hinge_width - 1)
# Pillars to attach to base
.workplaneFromTagged("base")
.workplane(
centerOption="CenterOfBoundBox", offset=model_thickness - thickness / 2
centerOption="CenterOfBoundBox",
offset=dim.base_thickness - dim.hl_full_thickness / 2,
)
.workplaneFromTagged("base")
.workplane(offset=thickness / 2 - shell_t)
.center(-width / 2, height / 2 - shell_t)
.workplane(offset=dim.hl_full_thickness / 2 - dim.shell_t)
.center(-dim.width / 2, dim.height / 2 - dim.shell_t)
.placeSketch(mounting_pillars)
.extrude(-10)
# Hole for screws
.workplaneFromTagged("rightSide")
.placeSketch(cq.Sketch().circle(screw_radius))
.cutBlind(-hinge_width)
.placeSketch(cq.Sketch().circle(dim.hl_screw_radius))
.cutBlind(-dim.hl_hinge_width)
.workplaneFromTagged("rightSide")
.workplane(offset=-width + hinge_width)
.placeSketch(cq.Sketch().circle(screw_radius))
.cutBlind(-hinge_width)
.workplane(offset=-dim.width + dim.hl_hinge_width)
.placeSketch(cq.Sketch().circle(dim.hl_screw_radius))
.cutBlind(-dim.hl_hinge_width)
# Holes for rings & screw heads
.workplaneFromTagged("rightSide")
.placeSketch(cq.Sketch().circle(ring_radius))
.placeSketch(cq.Sketch().circle(dim.hl_ring_radius))
.cutBlind(-5)
.workplaneFromTagged("rightSide")
.workplane(offset=-width + 4)
.placeSketch(cq.Sketch().circle(ring_radius))
.workplane(offset=-dim.width + 4)
.placeSketch(cq.Sketch().circle(dim.hl_ring_radius))
.cutBlind(-5)
# Split hinge halves
.faces(">X")
.workplaneFromTagged("rightSide")
.workplane(offset=-hinge_width / 2)
.placeSketch(cq.Sketch().trapezoid(hinge_radius * 2 + 1, hinge_radius * 2, 90))
.workplane(offset=-dim.hl_hinge_width / 2)
.placeSketch(
cq.Sketch().trapezoid(
dim.hl_hinge_radius * 2 + 1, dim.hl_hinge_radius * 2, 90
)
)
.cutBlind(-1)
.workplaneFromTagged("rightSide")
.workplane(offset=-hinge_width)
.placeSketch(cq.Sketch().trapezoid(hinge_radius * 2 + 1, hinge_radius * 2, 90))
.workplane(offset=-dim.hl_hinge_width)
.placeSketch(
cq.Sketch().trapezoid(
dim.hl_hinge_radius * 2 + 1, dim.hl_hinge_radius * 2, 90
)
)
.cutBlind(-1)
.workplaneFromTagged("rightSide")
.workplane(offset=-width + hinge_width / 2)
.placeSketch(cq.Sketch().trapezoid(hinge_radius * 2 + 1, hinge_radius * 2, 90))
.workplane(offset=-dim.width + dim.hl_hinge_width / 2)
.placeSketch(
cq.Sketch().trapezoid(
dim.hl_hinge_radius * 2 + 1, dim.hl_hinge_radius * 2, 90
)
)
.cutBlind(-1)
.workplaneFromTagged("rightSide")
.workplane(offset=-width + hinge_width)
.placeSketch(cq.Sketch().trapezoid(hinge_radius * 2 + 1, hinge_radius * 2, 90))
.workplane(offset=-dim.width + dim.hl_hinge_width)
.placeSketch(
cq.Sketch().trapezoid(
dim.hl_hinge_radius * 2 + 1, dim.hl_hinge_radius * 2, 90
)
)
.cutBlind(-1)
# Threaded inserts
.workplaneFromTagged("rightSide")
.workplane(offset=-hinge_width / 2)
.placeSketch(cq.Sketch().circle(ti_radius))
.cutBlind(-ti_depth)
.workplane(offset=-dim.hl_hinge_width / 2)
.placeSketch(cq.Sketch().circle(dim.ti_radius))
.cutBlind(-dim.ti_depth)
.workplaneFromTagged("rightSide")
.workplane(offset=-width + hinge_width / 2)
.placeSketch(cq.Sketch().circle(ti_radius))
.cutBlind(ti_depth)
.workplane(offset=-dim.width + dim.hl_hinge_width / 2)
.placeSketch(cq.Sketch().circle(dim.ti_radius))
.cutBlind(dim.ti_depth)
# Split two halves
# First cut for the right hinge
.workplaneFromTagged("rightSide")
@ -157,84 +143,90 @@ def model():
.polygon(
[
(0, 0),
(-hinge_radius - 0.2, 0),
(-hinge_radius - hinge_slant, hinge_radius),
(0, hinge_radius),
(-dim.hl_hinge_radius - 0.2, 0),
(-dim.hl_hinge_radius - dim.hl_hinge_slant, dim.hl_hinge_radius),
(0, dim.hl_hinge_radius),
(0, 0),
]
)
.polygon(
[
(-hinge_radius - 0.2, 0),
(-hinge_radius - 0.2, -1000),
(-hinge_radius, -1000),
(-hinge_radius, 0),
(-hinge_radius - 0.2, 0),
(-dim.hl_hinge_radius - 0.2, 0),
(-dim.hl_hinge_radius - 0.2, -1000),
(-dim.hl_hinge_radius, -1000),
(-dim.hl_hinge_radius, 0),
(-dim.hl_hinge_radius - 0.2, 0),
]
)
.circle(hinge_radius, mode="s")
.circle(dim.hl_hinge_radius, mode="s")
)
.cutBlind(-hinge_width / 2 - 1)
.cutBlind(-dim.hl_hinge_width / 2 - 1)
# Second cut for the right hinge
.workplaneFromTagged("rightSide")
.workplane(offset=-hinge_width / 2)
.workplane(offset=-dim.hl_hinge_width / 2)
.placeSketch(
cq.Sketch()
.polygon(
[
(0, 0),
(hinge_radius + 0.2, 0),
(hinge_radius + 0.2 + hinge_slant, hinge_radius),
(0, hinge_radius),
(dim.hl_hinge_radius + 0.2, 0),
(
dim.hl_hinge_radius + 0.2 + dim.hl_hinge_slant,
dim.hl_hinge_radius,
),
(0, dim.hl_hinge_radius),
(0, 0),
]
)
.circle(hinge_radius, mode="s")
.circle(dim.hl_hinge_radius, mode="s")
)
.cutBlind(-hinge_width / 2 - 1)
.cutBlind(-dim.hl_hinge_width / 2 - 1)
# First cut for the left hinge
.workplaneFromTagged("rightSide")
.workplane(offset=-width + hinge_width)
.workplane(offset=-dim.width + dim.hl_hinge_width)
.placeSketch(
cq.Sketch()
.polygon(
[
(0, 0),
(hinge_radius + 0.2, 0),
(hinge_radius + 0.2 + hinge_slant, hinge_radius),
(0, hinge_radius),
(dim.hl_hinge_radius + 0.2, 0),
(
dim.hl_hinge_radius + 0.2 + dim.hl_hinge_slant,
dim.hl_hinge_radius,
),
(0, dim.hl_hinge_radius),
(0, 0),
]
)
.circle(hinge_radius, mode="s")
.circle(dim.hl_hinge_radius, mode="s")
)
.cutBlind(-hinge_width / 2 - 1)
.cutBlind(-dim.hl_hinge_width / 2 - 1)
# Second cut for the left hinge
.workplaneFromTagged("rightSide")
.workplane(offset=-width + hinge_width / 2)
.workplane(offset=-dim.width + dim.hl_hinge_width / 2)
.placeSketch(
cq.Sketch()
.polygon(
[
(0, 0),
(-hinge_radius - 0.2, 0),
(-hinge_radius - hinge_slant, hinge_radius),
(0, hinge_radius),
(-dim.hl_hinge_radius - 0.2, 0),
(-dim.hl_hinge_radius - dim.hl_hinge_slant, dim.hl_hinge_radius),
(0, dim.hl_hinge_radius),
(0, 0),
]
)
.polygon(
[
(-hinge_radius - 0.2, 0),
(-hinge_radius - 0.2, -1000),
(-hinge_radius, -1000),
(-hinge_radius, 0),
(-hinge_radius - 0.2, 0),
(-dim.hl_hinge_radius - 0.2, 0),
(-dim.hl_hinge_radius - 0.2, -1000),
(-dim.hl_hinge_radius, -1000),
(-dim.hl_hinge_radius, 0),
(-dim.hl_hinge_radius - 0.2, 0),
]
)
.circle(hinge_radius, mode="s")
.circle(dim.hl_hinge_radius, mode="s")
)
.cutBlind(-hinge_width / 2 - 1)
.cutBlind(-dim.hl_hinge_width / 2 - 1)
)
# Screen mount
@ -242,69 +234,75 @@ def model():
# 1st layer
model.workplaneFromTagged("base")
.center(0, -32)
.workplane(offset=thickness / 2 - shell_t)
.workplane(offset=dim.hl_full_thickness / 2 - dim.shell_t)
.tag("screen_plane")
.placeSketch(
cq.Sketch()
.trapezoid(
screen_mount.scr_w + 2 * bezel_width,
screen_mount.scr_h + 2 * bezel_height,
screen_mount.dim.scr_w + 2 * dim.hl_bezel_width,
screen_mount.dim.scr_h + 2 * dim.hl_bezel_height,
90,
)
.vertices()
.fillet(2)
)
.extrude(-2 - screen_mount.scr_thickness)
.extrude(-2 - screen_mount.dim.scr_thickness)
# Hole for screws
.workplaneFromTagged("screen_plane")
.workplane(offset=1)
.rect(
screen_mount.scr_w + 2 * bezel_width - m3_hn_diam - 1,
screen_mount.scr_h + 2 * bezel_height - m3_hn_diam - 1,
screen_mount.dim.scr_w + 2 * dim.hl_bezel_width - dim.m3_hn_diam - 1,
screen_mount.dim.scr_h + 2 * dim.hl_bezel_height - dim.m3_hn_diam - 1,
forConstruction=True,
)
.vertices()
.hole(m3_hn_hole, depth=10)
.hole(dim.m3_hn_hole, depth=10)
# Holes for captured nuts
.workplaneFromTagged("screen_plane")
.workplane(offset=1)
.rect(
screen_mount.scr_w + 2 * bezel_width - m3_hn_diam - 1,
screen_mount.scr_h + 2 * bezel_height - m3_hn_diam - 1,
screen_mount.dim.scr_w + 2 * dim.hl_bezel_width - dim.m3_hn_diam - 1,
screen_mount.dim.scr_h + 2 * dim.hl_bezel_height - dim.m3_hn_diam - 1,
forConstruction=True,
)
.vertices()
.hole(m3_hn_diam, depth=m3_hn_thickness + 0.5)
.hole(dim.m3_hn_diam, depth=dim.m3_hn_thickness + 0.5)
# Remove middle of the screen holder
.workplaneFromTagged("screen_plane")
.placeSketch(
cq.Sketch().trapezoid(
screen_mount.scr_w - 40, screen_mount.scr_h + 2 * bezel_height, 90
screen_mount.dim.scr_w - 40,
screen_mount.dim.scr_h + 2 * dim.hl_bezel_height,
90,
)
)
.cutBlind(-100)
# Hole to place screen
.workplaneFromTagged("screen_plane")
.workplane(offset=-screen_mount.scr_thickness - 2)
.placeSketch(cq.Sketch().trapezoid(screen_mount.scr_w, screen_mount.scr_h, 90))
.cutBlind(screen_mount.scr_thickness)
.workplane(offset=-screen_mount.dim.scr_thickness - 2)
.placeSketch(
cq.Sketch().trapezoid(screen_mount.dim.scr_w, screen_mount.dim.scr_h, 90)
)
.cutBlind(screen_mount.dim.scr_thickness)
)
# Cut off shape of the base
model = (
model.workplaneFromTagged("rightSide")
.center(-height + hinge_offset, -thickness + hinge_radius)
.center(
-dim.height + dim.hl_hinge_offset,
-dim.hl_full_thickness + dim.hl_hinge_radius,
)
.placeSketch(
cq.Sketch().polygon(
[
(0, 0),
(0, keyboard.front_thickness),
(shell_t, keyboard.front_thickness),
(keyboard.actual_height + shell_t, keyboard.back_thickness),
(keyboard.actual_height + shell_t, model_thickness),
(height, model_thickness),
(height, 0),
(dim.shell_t, keyboard.front_thickness),
(keyboard.actual_height + dim.shell_t, keyboard.back_thickness),
(keyboard.actual_height + dim.shell_t, dim.base_thickness),
(dim.height, dim.base_thickness),
(dim.height, 0),
(0, 0),
]
)
@ -323,21 +321,25 @@ def front_bezel():
.placeSketch(
cq.Sketch()
.trapezoid(
screen_mount.scr_w + 2 * bezel_width + 2 * bezel_thickness,
screen_mount.scr_h + 2 * bezel_height + 2 * bezel_thickness,
screen_mount.dim.scr_w
+ 2 * dim.hl_bezel_width
+ 2 * dim.hl_bezel_thickness,
screen_mount.dim.scr_h
+ 2 * dim.hl_bezel_height
+ 2 * dim.hl_bezel_thickness,
90,
)
.vertices()
.fillet(2)
)
.extrude(-2 - screen_mount.scr_thickness - bezel_thickness)
.extrude(-2 - screen_mount.dim.scr_thickness - dim.hl_bezel_thickness)
.workplaneFromTagged("base")
.workplane(offset=-bezel_thickness)
.workplane(offset=-dim.hl_bezel_thickness)
.placeSketch(
cq.Sketch()
.trapezoid(
screen_mount.scr_w + 2 * bezel_width,
screen_mount.scr_h + 2 * bezel_height,
screen_mount.dim.scr_w + 2 * dim.hl_bezel_width,
screen_mount.dim.scr_h + 2 * dim.hl_bezel_height,
90,
)
.vertices()
@ -347,19 +349,19 @@ def front_bezel():
# Holes for screws
.workplaneFromTagged("base")
.rect(
screen_mount.scr_w + 2 * bezel_width - m3_hn_diam - 1,
screen_mount.scr_h + 2 * bezel_height - m3_hn_diam - 1,
screen_mount.dim.scr_w + 2 * dim.hl_bezel_width - dim.m3_hn_diam - 1,
screen_mount.dim.scr_h + 2 * dim.hl_bezel_height - dim.m3_hn_diam - 1,
forConstruction=True,
)
.vertices()
.hole(m3_hn_hole, depth=10)
.hole(dim.m3_hn_hole, depth=10)
# Viewport hole
.workplaneFromTagged("base")
.placeSketch(
cq.Sketch()
.trapezoid(
screen_mount.vis_w,
screen_mount.vis_h,
screen_mount.dim.vis_w,
screen_mount.dim.vis_h,
90,
)
.vertices()
@ -368,13 +370,13 @@ def front_bezel():
.cutBlind("last")
# Cable gap
.workplaneFromTagged("base")
.workplane(offset=-screen_mount.scr_thickness - bezel_thickness)
.workplane(offset=-screen_mount.dim.scr_thickness - dim.hl_bezel_thickness)
.center(0, 10)
.placeSketch(
cq.Sketch()
.trapezoid(
screen_mount.vis_w,
screen_mount.vis_h,
screen_mount.dim.vis_w,
screen_mount.dim.vis_h,
90,
)
.vertices()
@ -401,7 +403,7 @@ if __name__ == "__main__":
},
)
offset_width = -width / 2
offset_width = -dim.width / 2
right_side = (
model.faces(">X")

Binary file not shown.

View File

@ -203,14 +203,6 @@
<path d="M-118.25,-62.25 L-118.25391015272308,-62.141763366299074 L-118.26562022516654,-62.03409102828882 L-118.28506916643487,-61.927544339683465 L-118.31215557875383,-61.82267878558245 L-118.3467382461116,-61.720041086428346 L-118.38863687049357,-61.620166347659605 L-118.43763301187278,-61.523575269918574 L-118.49347122705505,-61.43077143435946 L-118.55586040144154,-61.34223867720935 L-118.6244752667654,-61.2584385672702 L-118.69895809688998,-61.17980799951276 L-118.77892057282726,-61.106756917308545 L-118.86394580725317,-61.039666175174894 L-118.95359051796517,-60.97888555317587 L-119.04738733895032,-60.92473193333097 L-119.14484725701529,-60.877487647538985 L-119.24546216127473,-60.83739900563024 L-119.34870749220617,-60.804675011221164 L-119.4540449764604,-60.77948627206623 L-119.56092543316956,-60.761964110588096 L-119.66879163712187,-60.75219987922331 L-119.77708122387584,-60.750244484153036 L-119.8852296216681,-60.75610811990175 L-119.99267299482915,-60.76976021618771 L-120.09885118336146,-60.791129597302316 L-120.20321062335435,-60.82010485318722 L-120.30520723300987,-60.85653492027481 L-120.40430924923335,-60.900229869063736 L-120.5,-60.95096189432334 L-120.59178059804357,-61.00846650276466 L-120.67917254182359,-61.07244389198599 L-120.76172021021077,-61.14256051350375 L-120.8389932378847,-61.21845081171986 L-120.91058875905925,-61.29971912975937 L-120.97613350783834,-61.38594177224214 L-121.03528576425138,-61.47666921423447 L-121.08773713582308,-61.57142844486386 L-121.1332141653889,-61.669725433378744 L-121.1714797567742,-61.77104770479603 L-121.20233441090384,-61.87486701170841 L-121.22561726589801,-61.980642088321694 L-121.24120693573154,-62.08782147236409 L-121.24902214308452,-62.195846380155096 L-121.24902214308452,-62.30415361984491 L-121.24120693573154,-62.412178527635916 L-121.22561726589801,-62.51935791167831 L-121.20233441090384,-62.6251329882916 L-121.1714797567742,-62.728952295203975 L-121.13321416538889,-62.83027456662126 L-121.08773713582308,-62.928571555136145 L-121.03528576425138,-63.02333078576554 L-120.97613350783834,-63.114058227757866 L-120.91058875905925,-63.20028087024064 L-120.8389932378847,-63.28154918828014 L-120.76172021021077,-63.357439486496254 L-120.67917254182358,-63.42755610801401 L-120.59178059804357,-63.49153349723534 L-120.5,-63.54903810567666 L-120.40430924923335,-63.599770130936264 L-120.30520723300987,-63.64346507972519 L-120.20321062335435,-63.67989514681278 L-120.09885118336146,-63.708870402697684 L-119.99267299482915,-63.73023978381229 L-119.8852296216681,-63.74389188009825 L-119.77708122387584,-63.749755515846964 L-119.66879163712187,-63.74780012077669 L-119.56092543316956,-63.738035889411904 L-119.4540449764604,-63.72051372793377 L-119.34870749220617,-63.695324988778836 L-119.24546216127473,-63.66260099436976 L-119.14484725701529,-63.622512352461015 L-119.04738733895032,-63.57526806666903 L-118.95359051796517,-63.52111444682413 L-118.86394580725317,-63.460333824825106 L-118.77892057282726,-63.393243082691455 L-118.69895809688998,-63.32019200048724 L-118.6244752667654,-63.2415614327298 L-118.55586040144154,-63.15776132279065 L-118.49347122705505,-63.06922856564055 L-118.43763301187278,-62.97642473008143 L-118.38863687049357,-62.8798336523404 L-118.3467382461116,-62.77995891357166 L-118.31215557875385,-62.67732121441755 L-118.28506916643487,-62.57245566031654 L-118.26562022516654,-62.46590897171119 L-118.25391015272308,-62.35823663370093 L-118.25,-62.25000000000001 " />
<path d="M-118.25,-1.75 L-118.25391015272308,-1.6417633662990758 L-118.26562022516654,-1.5340910282888214 L-118.28506916643487,-1.427544339683464 L-118.31215557875383,-1.32267878558245 L-118.3467382461116,-1.2200410864283464 L-118.38863687049357,-1.120166347659603 L-118.43763301187278,-1.0235752699185707 L-118.49347122705505,-0.9307714343594546 L-118.55586040144154,-0.8422386772093523 L-118.6244752667654,-0.7584385672701998 L-118.69895809688998,-0.6798079995127604 L-118.77892057282726,-0.6067569173085454 L-118.86394580725317,-0.5396661751748948 L-118.95359051796517,-0.47888555317587045 L-119.04738733895032,-0.4247319333309658 L-119.14484725701529,-0.3774876475389821 L-119.24546216127473,-0.33739900563023806 L-119.34870749220617,-0.3046750112211656 L-119.4540449764604,-0.2794862720662299 L-119.56092543316956,-0.26196411058809344 L-119.66879163712187,-0.2521998792233142 L-119.77708122387584,-0.250244484153038 L-119.8852296216681,-0.25610811990174365 L-119.99267299482915,-0.2697602161877106 L-120.09885118336146,-0.2911295973023149 L-120.20321062335435,-0.3201048531872155 L-120.30520723300987,-0.35653492027481226 L-120.40430924923335,-0.4002298690637396 L-120.5,-0.45096189432334155 L-120.59178059804357,-0.5084665027646638 L-120.67917254182359,-0.5724438919859911 L-120.76172021021077,-0.6425605135037518 L-120.8389932378847,-0.7184508117198649 L-120.91058875905925,-0.7997191297593644 L-120.97613350783834,-0.885941772242141 L-121.03528576425138,-0.9766692142344681 L-121.08773713582308,-1.0714284448638607 L-121.1332141653889,-1.1697254333787424 L-121.1714797567742,-1.2710477047960316 L-121.20233441090384,-1.3748670117084072 L-121.22561726589801,-1.4806420883216946 L-121.24120693573154,-1.5878214723640898 L-121.24902214308452,-1.695846380155098 L-121.24902214308452,-1.8041536198449075 L-121.24120693573154,-1.9121785276359158 L-121.22561726589801,-2.019357911678311 L-121.20233441090384,-2.125132988291598 L-121.1714797567742,-2.2289522952039738 L-121.13321416538889,-2.330274566621263 L-121.08773713582308,-2.4285715551361444 L-121.03528576425138,-2.5233307857655367 L-120.97613350783834,-2.6140582277578637 L-120.91058875905925,-2.70028087024064 L-120.8389932378847,-2.781549188280139 L-120.76172021021077,-2.8574394864962516 L-120.67917254182358,-2.927556108014012 L-120.59178059804357,-2.9915334972353387 L-120.5,-3.0490381056766602 L-120.40430924923335,-3.0997701309362617 L-120.30520723300987,-3.1434650797251886 L-120.20321062335435,-3.179895146812785 L-120.09885118336146,-3.2088704026976855 L-119.99267299482915,-3.23023978381229 L-119.8852296216681,-3.2438918800982566 L-119.77708122387584,-3.249755515846962 L-119.66879163712187,-3.247800120776686 L-119.56092543316956,-3.2380358894119063 L-119.4540449764604,-3.22051372793377 L-119.34870749220617,-3.195324988778834 L-119.24546216127473,-3.162600994369762 L-119.14484725701529,-3.1225123524610185 L-119.04738733895032,-3.075268066669035 L-118.95359051796517,-3.0211144468241304 L-118.86394580725317,-2.9603338248251063 L-118.77892057282726,-2.8932430826914564 L-118.69895809688998,-2.820192000487242 L-118.6244752667654,-2.7415614327298026 L-118.55586040144154,-2.6577613227906505 L-118.49347122705505,-2.5692285656405485 L-118.43763301187278,-2.476424730081433 L-118.38863687049357,-2.379833652340401 L-118.3467382461116,-2.279958913571658 L-118.31215557875385,-2.177321214417555 L-118.28506916643487,-2.0724556603165416 L-118.26562022516654,-1.9659089717111848 L-118.25391015272308,-1.8582366337009306 L-118.25,-1.750000000000007 " />
<path d="M-129.5,33.47272727272727 L-129.5,36.199999999999996 " />
<path d="M29.5,34.5 L29.5,22.5 " />
<path d="M29.5,22.5 L41.5,22.5 " />
<path d="M41.5,22.5 L41.5,34.5 " />
<path d="M41.5,34.5 L29.5,34.5 " />
<path d="M-20.5,34.5 L-20.5,22.5 " />
<path d="M-20.5,22.5 L-8.5,22.5 " />
<path d="M-8.5,22.5 L-8.5,34.5 " />
<path d="M-8.5,34.5 L-20.5,34.5 " />
<path d="M-150.5,27.0 L-143.0,27.0 " />
<path d="M155.5,29.742640687119287 L155.49879327778947,29.6843657294894 L155.4952607803924,29.625269505108527 L155.48172283150154,29.504853499413407 L155.46034307022944,29.381859466442958 L155.4319994127193,29.256729616545464 L155.39749582551622,29.12987830558566 L155.357557083631,29.001660443777187 L155.31273201750915,28.87210454247331 L155.26354130686912,28.741385479897865 L155.21047305800934,28.60972479412739 L155.15396468938454,28.477315768339164 L155.09440622526736,28.344323254813332 L155.03214328817182,28.21088365482435 L154.90068057914633,27.9430673514909 L154.76155132493403,27.674396130011793 L154.61617233067687,27.4049615410145 L154.4654641993786,27.13443202605324 L154.31024997814532,26.862661601271565 L154.15176992712304,26.59044579889797 L153.82819254978452,26.045426208688433 L153.5,25.50000000000001 " />
<path d="M130.5,33.47272727272727 L130.5,36.199999999999996 " />
@ -224,8 +216,6 @@
<path d="M122.5,-1.75 L122.49603551905139,-1.6023892683164156 L122.48415350683042,-1.4552041365845185 L122.46438822225426,-1.3088689776411593 L122.436796653755,-1.1638057136316058 L122.4014583549673,-1.0204325994987729 L122.35847521535464,-0.8791630170459506 L122.30797116643568,-0.7404042830500492 L122.25009182445748,-0.6045564748618903 L122.18500407054633,-0.4720112768796363 L122.1128955695461,-0.34315085122127265 L122.03397422893204,-0.2183467358522917 L121.94846759935963,-0.09795877334555803 L121.85662221857719,0.017665926637983276 L121.75870290059369,0.12819398815631478 L121.6549919721514,0.2333067301954901 L121.54578845870486,0.33270108550949473 L121.43140722225303,0.42609047444157033 L121.31217805351068,0.5132056312075552 L121.18844472103633,0.5937953802588423 L121.0605639800586,0.6676273604865104 L120.9289045438584,0.734488695178551 L120.79384602067321,0.7941866057985396 L120.65577781918822,0.8465489678160574 L120.51509802577024,0.8914248069862736 L120.37221225668173,0.9286847346477747 L120.22753248858406,0.9582213207835721 L120.08147587070214,0.9799494037696483 L119.93446352207526,0.9938063359179692 L119.78691931736185,0.999752164105983 L119.63926866469912,0.9977697449718166 L119.49193727914125,0.987864794343027 L119.34534995521278,0.9700658707563874 L119.19992934211588,0.9444242931162368 L119.05609472512339,0.9110139927287908 L118.91426081667082,0.8699313001390481 L118.77483656063303,0.8212946673848922 L118.63822395323317,0.7652443264692019 L118.5048168839835,0.7019418850346844 L118.375,0.6315698604072084 L118.24914759696512,0.5543311533511006 L118.12762253993641,0.47044846305372134 L118.01077521711272,0.38016364502605304 L117.89894252957419,0.2837370137706561 L117.79244691990932,0.18144659222756676 L117.69159544252948,0.07358731016219133 L117.59667887835154,-0.03952984619355915 L117.50797089640126,-0.15757873079507756 L117.42572726475457,-0.28021897814854135 L117.35018511309207,-0.40709698467273836 L117.28156224899271,-0.5378469282297327 L117.22005652993823,-0.6720918228847865 L117.16584529283875,-0.8094446058544037 L117.11908484272459,-0.9495092535085317 L117.07991000207836,-1.091881923209208 L117.04843372210692,-1.2361521176934285 L117.02474675707376,-1.3819038686430218 L117.00891740263093,-1.5287169360289947 L117.00099129890506,-1.6761680197723225 L117.00099129890506,-1.8238319802276584 L117.00891740263093,-1.9712830639709864 L117.02474675707376,-2.1180961313569595 L117.04843372210692,-2.263847882306553 L117.07991000207835,-2.4081180767907737 L117.11908484272458,-2.55049074649145 L117.16584529283875,-2.690555394145578 L117.22005652993823,-2.827908177115196 L117.2815622489927,-2.96215307177025 L117.35018511309205,-3.092903015327245 L117.42572726475456,-3.2197810218514427 L117.50797089640125,-3.342421269204907 L117.59667887835153,-3.460470153806426 L117.69159544252946,-3.573587310162177 L117.79244691990931,-3.6814465922275534 L117.89894252957417,-3.7837370137706436 L118.0107752171127,-3.880163645026041 L118.1276225399364,-3.970448463053711 L118.2491475969651,-4.054331153351091 L118.37499999999999,-4.1315698604072 L118.5048168839835,-4.201941885034678 L118.63822395323315,-4.265244326469196 L118.77483656063302,-4.321294667384888 L118.91426081667082,-4.369931300139045 L119.05609472512339,-4.411013992728789 L119.19992934211588,-4.444424293116235 L119.34534995521278,-4.470065870756386 L119.49193727914125,-4.487864794343026 L119.6392686646991,-4.497769744971817 L119.78691931736184,-4.499752164105983 L119.93446352207526,-4.493806335917969 L120.08147587070214,-4.479949403769648 L120.22753248858406,-4.458221320783572 L120.37221225668173,-4.428684734647774 L120.51509802577024,-4.391424806986273 L120.65577781918822,-4.346548967816056 L120.79384602067321,-4.294186605798538 L120.92890454385841,-4.234488695178548 L121.0605639800586,-4.167627360486507 L121.18844472103635,-4.093795380258838 L121.31217805351069,-4.0132056312075495 L121.43140722225304,-3.926090474441564 L121.54578845870486,-3.832701085509487 L121.65499197215141,-3.7333067301954816 L121.75870290059369,-3.628193988156305 L121.8566222185772,-3.5176659266379726 L121.94846759935963,-3.40204122665443 L122.03397422893204,-3.281653264147695 L122.11289556954611,-3.156849148778713 L122.18500407054634,-3.027988723120348 L122.2500918244575,-2.8954435251380923 L122.30797116643569,-2.7595957169499328 L122.35847521535466,-2.62083698295403 L122.4014583549673,-2.4795674005012063 L122.436796653755,-2.3361942863683725 L122.46438822225426,-2.1911310223588174 L122.48415350683042,-2.0447958634154575 L122.49603551905139,-1.897610731683559 L122.5,-1.7499999999999738 " />
<path d="M-117.0,-62.25 L-117.00396448094861,-62.102389268316415 L-117.01584649316958,-61.95520413658452 L-117.03561177774574,-61.80886897764116 L-117.063203346245,-61.663805713631604 L-117.0985416450327,-61.520432599498776 L-117.14152478464536,-61.379163017045954 L-117.19202883356432,-61.24040428305005 L-117.24990817554252,-61.10455647486189 L-117.31499592945367,-60.972011276879634 L-117.3871044304539,-60.843150851221274 L-117.46602577106796,-60.71834673585229 L-117.55153240064037,-60.59795877334556 L-117.64337778142281,-60.48233407336202 L-117.74129709940631,-60.37180601184369 L-117.8450080278486,-60.26669326980451 L-117.95421154129514,-60.1672989144905 L-118.06859277774697,-60.07390952555843 L-118.18782194648932,-59.986794368792445 L-118.31155527896367,-59.90620461974116 L-118.4394360199414,-59.83237263951349 L-118.5710954561416,-59.76551130482145 L-118.70615397932679,-59.70581339420146 L-118.84422218081178,-59.653451032183945 L-118.98490197422976,-59.60857519301373 L-119.12778774331827,-59.571315265352226 L-119.27246751141594,-59.54177867921643 L-119.41852412929786,-59.52005059623035 L-119.56553647792474,-59.50619366408203 L-119.71308068263815,-59.500247835894015 L-119.86073133530088,-59.50223025502818 L-120.00806272085875,-59.512135205656975 L-120.15465004478722,-59.529934129243614 L-120.30007065788412,-59.555575706883765 L-120.44390527487661,-59.58898600727121 L-120.58573918332918,-59.63006869986095 L-120.72516343936697,-59.67870533261511 L-120.86177604676683,-59.7347556735308 L-120.9951831160165,-59.798058114965315 L-121.125,-59.86843013959279 L-121.25085240303488,-59.9456688466489 L-121.37237746006359,-60.02955153694628 L-121.48922478288728,-60.11983635497395 L-121.60105747042581,-60.216262986229346 L-121.70755308009068,-60.318553407772434 L-121.80840455747052,-60.42641268983781 L-121.90332112164846,-60.53952984619356 L-121.99202910359874,-60.65757873079508 L-122.07427273524543,-60.78021897814854 L-122.14981488690793,-60.90709698467274 L-122.21843775100729,-61.03784692822973 L-122.27994347006177,-61.17209182288479 L-122.33415470716125,-61.3094446058544 L-122.38091515727541,-61.44950925350853 L-122.42008999792164,-61.59188192320921 L-122.45156627789308,-61.73615211769343 L-122.47525324292624,-61.88190386864302 L-122.49108259736907,-62.02871693602899 L-122.49900870109494,-62.17616801977232 L-122.49900870109494,-62.32383198022766 L-122.49108259736907,-62.471283063970986 L-122.47525324292624,-62.61809613135696 L-122.45156627789308,-62.76384788230655 L-122.42008999792165,-62.90811807679077 L-122.38091515727542,-63.05049074649145 L-122.33415470716125,-63.190555394145576 L-122.27994347006177,-63.3279081771152 L-122.2184377510073,-63.46215307177025 L-122.14981488690795,-63.592903015327245 L-122.07427273524544,-63.719781021851446 L-121.99202910359875,-63.842421269204905 L-121.90332112164847,-63.960470153806426 L-121.80840455747054,-64.07358731016218 L-121.70755308009069,-64.18144659222756 L-121.60105747042583,-64.28373701377065 L-121.4892247828873,-64.38016364502604 L-121.3723774600636,-64.47044846305371 L-121.2508524030349,-64.55433115335109 L-121.12500000000001,-64.6315698604072 L-120.9951831160165,-64.70194188503467 L-120.86177604676685,-64.7652443264692 L-120.72516343936698,-64.82129466738489 L-120.58573918332918,-64.86993130013904 L-120.44390527487661,-64.91101399272878 L-120.30007065788412,-64.94442429311624 L-120.15465004478722,-64.97006587075639 L-120.00806272085875,-64.98786479434303 L-119.8607313353009,-64.99776974497182 L-119.71308068263816,-64.99975216410598 L-119.56553647792474,-64.99380633591797 L-119.41852412929786,-64.97994940376965 L-119.27246751141594,-64.95822132078357 L-119.12778774331827,-64.92868473464777 L-118.98490197422976,-64.89142480698628 L-118.84422218081178,-64.84654896781606 L-118.70615397932679,-64.79418660579854 L-118.57109545614159,-64.73448869517856 L-118.4394360199414,-64.6676273604865 L-118.31155527896365,-64.59379538025884 L-118.18782194648931,-64.51320563120755 L-118.06859277774696,-64.42609047444157 L-117.95421154129514,-64.33270108550948 L-117.84500802784859,-64.23330673019548 L-117.74129709940631,-64.12819398815631 L-117.6433777814228,-64.01766592663797 L-117.55153240064037,-63.90204122665443 L-117.46602577106796,-63.78165326414769 L-117.38710443045389,-63.65684914877871 L-117.31499592945366,-63.527988723120345 L-117.2499081755425,-63.39544352513809 L-117.19202883356431,-63.25959571694993 L-117.14152478464534,-63.12083698295403 L-117.0985416450327,-62.9795674005012 L-117.063203346245,-62.836194286368375 L-117.03561177774574,-62.69113102235882 L-117.01584649316958,-62.54479586341546 L-117.00396448094861,-62.39761073168356 L-117.0,-62.24999999999997 " />
<path d="M-117.0,-1.75 L-117.00396448094861,-1.6023892683164156 L-117.01584649316958,-1.4552041365845185 L-117.03561177774574,-1.3088689776411593 L-117.063203346245,-1.1638057136316058 L-117.0985416450327,-1.0204325994987729 L-117.14152478464536,-0.8791630170459506 L-117.19202883356432,-0.7404042830500492 L-117.24990817554252,-0.6045564748618903 L-117.31499592945367,-0.4720112768796363 L-117.3871044304539,-0.34315085122127265 L-117.46602577106796,-0.2183467358522917 L-117.55153240064037,-0.09795877334555803 L-117.64337778142281,0.017665926637983276 L-117.74129709940631,0.12819398815631478 L-117.8450080278486,0.2333067301954901 L-117.95421154129514,0.33270108550949473 L-118.06859277774697,0.42609047444157033 L-118.18782194648932,0.5132056312075552 L-118.31155527896367,0.5937953802588423 L-118.4394360199414,0.6676273604865104 L-118.5710954561416,0.734488695178551 L-118.70615397932679,0.7941866057985396 L-118.84422218081178,0.8465489678160574 L-118.98490197422976,0.8914248069862736 L-119.12778774331827,0.9286847346477747 L-119.27246751141594,0.9582213207835721 L-119.41852412929786,0.9799494037696483 L-119.56553647792474,0.9938063359179692 L-119.71308068263815,0.999752164105983 L-119.86073133530088,0.9977697449718166 L-120.00806272085875,0.987864794343027 L-120.15465004478722,0.9700658707563874 L-120.30007065788412,0.9444242931162368 L-120.44390527487661,0.9110139927287908 L-120.58573918332918,0.8699313001390481 L-120.72516343936697,0.8212946673848922 L-120.86177604676683,0.7652443264692019 L-120.9951831160165,0.7019418850346844 L-121.125,0.6315698604072084 L-121.25085240303488,0.5543311533511006 L-121.37237746006359,0.47044846305372134 L-121.48922478288728,0.38016364502605304 L-121.60105747042581,0.2837370137706561 L-121.70755308009068,0.18144659222756676 L-121.80840455747052,0.07358731016219133 L-121.90332112164846,-0.03952984619355915 L-121.99202910359874,-0.15757873079507756 L-122.07427273524543,-0.28021897814854135 L-122.14981488690793,-0.40709698467273836 L-122.21843775100729,-0.5378469282297327 L-122.27994347006177,-0.6720918228847865 L-122.33415470716125,-0.8094446058544037 L-122.38091515727541,-0.9495092535085317 L-122.42008999792164,-1.091881923209208 L-122.45156627789308,-1.2361521176934285 L-122.47525324292624,-1.3819038686430218 L-122.49108259736907,-1.5287169360289947 L-122.49900870109494,-1.6761680197723225 L-122.49900870109494,-1.8238319802276584 L-122.49108259736907,-1.9712830639709864 L-122.47525324292624,-2.1180961313569595 L-122.45156627789308,-2.263847882306553 L-122.42008999792165,-2.4081180767907737 L-122.38091515727542,-2.55049074649145 L-122.33415470716125,-2.690555394145578 L-122.27994347006177,-2.827908177115196 L-122.2184377510073,-2.96215307177025 L-122.14981488690795,-3.092903015327245 L-122.07427273524544,-3.2197810218514427 L-121.99202910359875,-3.342421269204907 L-121.90332112164847,-3.460470153806426 L-121.80840455747054,-3.573587310162177 L-121.70755308009069,-3.6814465922275534 L-121.60105747042583,-3.7837370137706436 L-121.4892247828873,-3.880163645026041 L-121.3723774600636,-3.970448463053711 L-121.2508524030349,-4.054331153351091 L-121.12500000000001,-4.1315698604072 L-120.9951831160165,-4.201941885034678 L-120.86177604676685,-4.265244326469196 L-120.72516343936698,-4.321294667384888 L-120.58573918332918,-4.369931300139045 L-120.44390527487661,-4.411013992728789 L-120.30007065788412,-4.444424293116235 L-120.15465004478722,-4.470065870756386 L-120.00806272085875,-4.487864794343026 L-119.8607313353009,-4.497769744971817 L-119.71308068263816,-4.499752164105983 L-119.56553647792474,-4.493806335917969 L-119.41852412929786,-4.479949403769648 L-119.27246751141594,-4.458221320783572 L-119.12778774331827,-4.428684734647774 L-118.98490197422976,-4.391424806986273 L-118.84422218081178,-4.346548967816056 L-118.70615397932679,-4.294186605798538 L-118.57109545614159,-4.234488695178548 L-118.4394360199414,-4.167627360486507 L-118.31155527896365,-4.093795380258838 L-118.18782194648931,-4.0132056312075495 L-118.06859277774696,-3.926090474441564 L-117.95421154129514,-3.832701085509487 L-117.84500802784859,-3.7333067301954816 L-117.74129709940631,-3.628193988156305 L-117.6433777814228,-3.5176659266379726 L-117.55153240064037,-3.40204122665443 L-117.46602577106796,-3.281653264147695 L-117.38710443045389,-3.156849148778713 L-117.31499592945366,-3.027988723120348 L-117.2499081755425,-2.8954435251380923 L-117.19202883356431,-2.7595957169499328 L-117.14152478464534,-2.62083698295403 L-117.0985416450327,-2.4795674005012063 L-117.063203346245,-2.3361942863683725 L-117.03561177774574,-2.1911310223588174 L-117.01584649316958,-2.0447958634154575 L-117.00396448094861,-1.897610731683559 L-117.0,-1.7499999999999738 " />
<path d="M33.15,28.5 L33.15397582806252,28.63664034793962 L33.16588985930643,28.772818348194292 L33.18570178042131,28.908073217517288 L33.213344554137414,29.041947296244736 L33.2487246460586,29.17398759687106 L33.29172234115312,29.30374733681532 L33.34219214883136,29.430787450192017 L33.39996329523998,29.554678073471088 L33.46484030110657,29.675 L33.536603643179596,29.791346098466395 L33.615010497025644,29.903322690501547 L33.6997955586704,30.01055088276337 L33.790671942303334,30.112667848991524 L33.88733215100848,30.209328057696663 L33.98944911723663,30.300204441329598 L34.09667730949845,30.384989502974353 L34.20865390153361,30.4633963568204 L34.325,30.53515969889343 L34.44532192652891,30.60003670476002 L34.56921254980798,30.657807851168645 L34.69625266318468,30.708277658846885 L34.826012403128935,30.7512753539414 L34.958052703755264,30.786655445862586 L35.091926782482716,30.81429821957869 L35.22718165180571,30.834110140693568 L35.36335965206038,30.84602417193748 L35.5,30.85 L35.63664034793962,30.84602417193748 L35.77281834819429,30.834110140693568 L35.908073217517284,30.81429821957869 L36.041947296244736,30.786655445862586 L36.173987596871065,30.7512753539414 L36.30374733681532,30.708277658846885 L36.43078745019202,30.657807851168645 L36.55467807347109,30.60003670476002 L36.675,30.53515969889343 L36.79134609846639,30.4633963568204 L36.90332269050155,30.384989502974353 L37.01055088276337,30.3002044413296 L37.11266784899152,30.209328057696666 L37.20932805769666,30.112667848991528 L37.3002044413296,30.01055088276337 L37.38498950297435,29.90332269050155 L37.4633963568204,29.7913460984664 L37.53515969889343,29.675000000000004 L37.600036704760015,29.55467807347109 L37.65780785116864,29.430787450192025 L37.70827765884688,29.303747336815327 L37.751275353941395,29.17398759687107 L37.786655445862586,29.041947296244743 L37.81429821957869,28.908073217517295 L37.83411014069357,28.7728183481943 L37.84602417193748,28.63664034793963 L37.85,28.50000000000001 L37.84602417193748,28.363359652060392 L37.83411014069357,28.22718165180572 L37.81429821957869,28.091926782482723 L37.786655445862586,27.95805270375528 L37.7512753539414,27.82601240312895 L37.70827765884689,27.69625266318469 L37.65780785116865,27.569212549807993 L37.60003670476002,27.445321926528926 L37.53515969889344,27.325000000000014 L37.46339635682041,27.20865390153362 L37.38498950297436,27.096677309498464 L37.30020444132961,26.989449117236646 L37.20932805769667,26.887332151008486 L37.112667848991535,26.790671942303348 L37.01055088276338,26.699795558670413 L36.90332269050156,26.615010497025658 L36.791346098466406,26.536603643179607 L36.67500000000001,26.464840301106577 L36.5546780734711,26.39996329523999 L36.430787450192035,26.342192148831362 L36.303747336815334,26.29172234115312 L36.17398759687107,26.248724646058605 L36.04194729624475,26.213344554137418 L35.9080732175173,26.18570178042131 L35.772818348194306,26.165889859306436 L35.63664034793963,26.15397582806252 L35.500000000000014,26.15 L35.36335965206039,26.15397582806252 L35.22718165180572,26.165889859306432 L35.09192678248272,26.185701780421308 L34.95805270375527,26.21334455413741 L34.82601240312894,26.248724646058598 L34.69625266318469,26.29172234115311 L34.569212549807986,26.34219214883135 L34.44532192652892,26.399963295239978 L34.325,26.464840301106566 L34.20865390153361,26.536603643179596 L34.09667730949845,26.615010497025644 L33.98944911723664,26.6997955586704 L33.88733215100848,26.790671942303334 L33.79067194230334,26.887332151008472 L33.6997955586704,26.98944911723663 L33.61501049702565,27.09667730949845 L33.5366036431796,27.208653901533605 L33.46484030110657,27.325 L33.399963295239985,27.445321926528912 L33.34219214883136,27.569212549807983 L33.29172234115312,27.69625266318468 L33.2487246460586,27.82601240312894 L33.213344554137414,27.958052703755268 L33.18570178042131,28.091926782482716 L33.16588985930643,28.22718165180571 L33.15397582806252,28.363359652060385 L33.15,28.500000000000004 " />
<path d="M-16.85,28.5 L-16.84602417193748,28.63664034793962 L-16.834110140693568,28.772818348194292 L-16.81429821957869,28.908073217517288 L-16.786655445862586,29.041947296244736 L-16.7512753539414,29.17398759687106 L-16.708277658846885,29.30374733681532 L-16.657807851168645,29.430787450192017 L-16.60003670476002,29.554678073471088 L-16.53515969889343,29.675 L-16.4633963568204,29.791346098466395 L-16.384989502974353,29.903322690501547 L-16.300204441329598,30.01055088276337 L-16.209328057696666,30.112667848991524 L-16.112667848991524,30.209328057696663 L-16.01055088276337,30.300204441329598 L-15.903322690501547,30.384989502974353 L-15.791346098466395,30.4633963568204 L-15.675,30.53515969889343 L-15.554678073471086,30.60003670476002 L-15.43078745019202,30.657807851168645 L-15.303747336815322,30.708277658846885 L-15.173987596871061,30.7512753539414 L-15.041947296244734,30.786655445862586 L-14.908073217517286,30.81429821957869 L-14.772818348194292,30.834110140693568 L-14.636640347939618,30.84602417193748 L-14.5,30.85 L-14.363359652060382,30.84602417193748 L-14.22718165180571,30.834110140693568 L-14.091926782482714,30.81429821957869 L-13.958052703755266,30.786655445862586 L-13.826012403128939,30.7512753539414 L-13.696252663184678,30.708277658846885 L-13.56921254980798,30.657807851168645 L-13.445321926528914,30.60003670476002 L-13.325000000000001,30.53515969889343 L-13.208653901533607,30.4633963568204 L-13.096677309498453,30.384989502974353 L-12.989449117236633,30.3002044413296 L-12.887332151008478,30.209328057696666 L-12.790671942303337,30.112667848991528 L-12.699795558670404,30.01055088276337 L-12.615010497025649,29.90332269050155 L-12.536603643179602,29.7913460984664 L-12.464840301106571,29.675000000000004 L-12.399963295239983,29.55467807347109 L-12.342192148831359,29.430787450192025 L-12.291722341153118,29.303747336815327 L-12.248724646058603,29.17398759687107 L-12.213344554137416,29.041947296244743 L-12.185701780421311,28.908073217517295 L-12.165889859306436,28.7728183481943 L-12.15397582806252,28.63664034793963 L-12.15,28.50000000000001 L-12.153975828062519,28.363359652060392 L-12.165889859306432,28.22718165180572 L-12.185701780421308,28.091926782482723 L-12.21334455413741,27.95805270375528 L-12.248724646058598,27.82601240312895 L-12.291722341153111,27.69625266318469 L-12.342192148831352,27.569212549807993 L-12.399963295239974,27.445321926528926 L-12.464840301106562,27.325000000000014 L-12.53660364317959,27.20865390153362 L-12.615010497025638,27.096677309498464 L-12.699795558670392,26.989449117236646 L-12.790671942303325,26.887332151008486 L-12.887332151008463,26.790671942303348 L-12.989449117236619,26.699795558670413 L-13.096677309498439,26.615010497025658 L-13.208653901533593,26.536603643179607 L-13.324999999999987,26.464840301106577 L-13.4453219265289,26.39996329523999 L-13.569212549807968,26.342192148831362 L-13.696252663184666,26.29172234115312 L-13.826012403128924,26.248724646058605 L-13.958052703755254,26.213344554137418 L-14.091926782482702,26.18570178042131 L-14.227181651805697,26.165889859306436 L-14.363359652060371,26.15397582806252 L-14.49999999999999,26.15 L-14.636640347939608,26.15397582806252 L-14.772818348194281,26.165889859306432 L-14.908073217517277,26.185701780421308 L-15.041947296244725,26.21334455413741 L-15.173987596871054,26.248724646058598 L-15.303747336815315,26.29172234115311 L-15.430787450192012,26.34219214883135 L-15.55467807347108,26.399963295239978 L-15.674999999999995,26.464840301106566 L-15.79134609846639,26.536603643179596 L-15.903322690501543,26.615010497025644 L-16.010550882763365,26.6997955586704 L-16.11266784899152,26.790671942303334 L-16.209328057696663,26.887332151008472 L-16.300204441329598,26.98944911723663 L-16.384989502974353,27.09667730949845 L-16.4633963568204,27.208653901533605 L-16.53515969889343,27.325 L-16.60003670476002,27.445321926528912 L-16.657807851168645,27.569212549807983 L-16.708277658846885,27.69625266318468 L-16.7512753539414,27.82601240312894 L-16.786655445862586,27.958052703755268 L-16.81429821957869,28.091926782482716 L-16.834110140693568,28.22718165180571 L-16.84602417193748,28.363359652060385 L-16.85,28.500000000000004 " />
<path d="M136.75,23.15 L143.0,23.15 " />
<path d="M-150.5,30.5 L-155.5,30.5 " />
<path d="M-150.5,20.5 L-155.5,20.5 " />
@ -375,16 +365,6 @@
<path d="M130.5,20.5 L130.5,33.47272727272727 " />
<path d="M130.5,20.5 L-129.5,20.5 " />
<path d="M-129.5,33.47272727272727 L-129.5,20.5 " />
<path d="M29.5,34.5 L29.5,22.5 " />
<path d="M29.5,22.5 L41.5,22.5 " />
<path d="M41.5,22.5 L41.5,34.5 " />
<path d="M41.5,34.5 L29.5,34.5 " />
<path d="M-20.5,34.5 L-20.5,22.5 " />
<path d="M-20.5,22.5 L-8.5,22.5 " />
<path d="M-8.5,22.5 L-8.499999999999998,34.5 " />
<path d="M-8.5,34.5 L-20.5,34.5 " />
<path d="M33.15,28.5 L33.15397582806252,28.63664034793962 L33.16588985930643,28.772818348194292 L33.18570178042131,28.908073217517288 L33.213344554137414,29.041947296244736 L33.2487246460586,29.17398759687106 L33.29172234115312,29.30374733681532 L33.34219214883136,29.430787450192017 L33.39996329523998,29.554678073471088 L33.46484030110657,29.675 L33.536603643179596,29.791346098466395 L33.615010497025644,29.903322690501547 L33.6997955586704,30.01055088276337 L33.790671942303334,30.112667848991524 L33.88733215100848,30.209328057696663 L33.98944911723663,30.300204441329598 L34.09667730949845,30.384989502974353 L34.20865390153361,30.4633963568204 L34.325,30.53515969889343 L34.44532192652891,30.60003670476002 L34.56921254980798,30.657807851168645 L34.69625266318468,30.708277658846885 L34.826012403128935,30.7512753539414 L34.958052703755264,30.786655445862586 L35.091926782482716,30.81429821957869 L35.22718165180571,30.834110140693568 L35.36335965206038,30.84602417193748 L35.5,30.85 L35.63664034793962,30.84602417193748 L35.77281834819429,30.834110140693568 L35.908073217517284,30.81429821957869 L36.041947296244736,30.786655445862586 L36.173987596871065,30.7512753539414 L36.30374733681532,30.708277658846885 L36.43078745019202,30.657807851168645 L36.55467807347109,30.60003670476002 L36.675,30.53515969889343 L36.79134609846639,30.4633963568204 L36.90332269050155,30.384989502974353 L37.01055088276337,30.3002044413296 L37.11266784899152,30.209328057696666 L37.20932805769666,30.112667848991528 L37.3002044413296,30.01055088276337 L37.38498950297435,29.90332269050155 L37.4633963568204,29.7913460984664 L37.53515969889343,29.675000000000004 L37.600036704760015,29.55467807347109 L37.65780785116864,29.430787450192025 L37.70827765884688,29.303747336815327 L37.751275353941395,29.17398759687107 L37.786655445862586,29.041947296244743 L37.81429821957869,28.908073217517295 L37.83411014069357,28.7728183481943 L37.84602417193748,28.63664034793963 L37.85,28.50000000000001 L37.84602417193748,28.363359652060392 L37.83411014069357,28.22718165180572 L37.81429821957869,28.091926782482723 L37.786655445862586,27.95805270375528 L37.7512753539414,27.82601240312895 L37.70827765884689,27.69625266318469 L37.65780785116865,27.569212549807993 L37.60003670476002,27.445321926528926 L37.53515969889344,27.325000000000014 L37.46339635682041,27.20865390153362 L37.38498950297436,27.096677309498464 L37.30020444132961,26.989449117236646 L37.20932805769667,26.887332151008486 L37.112667848991535,26.790671942303348 L37.01055088276338,26.699795558670413 L36.90332269050156,26.615010497025658 L36.791346098466406,26.536603643179607 L36.67500000000001,26.464840301106577 L36.5546780734711,26.39996329523999 L36.430787450192035,26.342192148831362 L36.303747336815334,26.29172234115312 L36.17398759687107,26.248724646058605 L36.04194729624475,26.213344554137418 L35.9080732175173,26.18570178042131 L35.772818348194306,26.165889859306436 L35.63664034793963,26.15397582806252 L35.500000000000014,26.15 L35.36335965206039,26.15397582806252 L35.22718165180572,26.165889859306432 L35.09192678248272,26.185701780421308 L34.95805270375527,26.21334455413741 L34.82601240312894,26.248724646058598 L34.69625266318469,26.29172234115311 L34.569212549807986,26.34219214883135 L34.44532192652892,26.399963295239978 L34.325,26.464840301106566 L34.20865390153361,26.536603643179596 L34.09667730949845,26.615010497025644 L33.98944911723664,26.6997955586704 L33.88733215100848,26.790671942303334 L33.79067194230334,26.887332151008472 L33.6997955586704,26.98944911723663 L33.61501049702565,27.09667730949845 L33.5366036431796,27.208653901533605 L33.46484030110657,27.325 L33.399963295239985,27.445321926528912 L33.34219214883136,27.569212549807983 L33.29172234115312,27.69625266318468 L33.2487246460586,27.82601240312894 L33.213344554137414,27.958052703755268 L33.18570178042131,28.091926782482716 L33.16588985930643,28.22718165180571 L33.15397582806252,28.363359652060385 L33.15,28.500000000000004 " />
<path d="M-16.85,28.5 L-16.84602417193748,28.63664034793962 L-16.834110140693568,28.772818348194292 L-16.81429821957869,28.908073217517288 L-16.786655445862586,29.041947296244736 L-16.7512753539414,29.17398759687106 L-16.708277658846885,29.30374733681532 L-16.657807851168645,29.430787450192017 L-16.60003670476002,29.554678073471088 L-16.53515969889343,29.675 L-16.4633963568204,29.791346098466395 L-16.384989502974353,29.903322690501547 L-16.300204441329598,30.01055088276337 L-16.209328057696666,30.112667848991524 L-16.112667848991524,30.209328057696663 L-16.01055088276337,30.300204441329598 L-15.903322690501547,30.384989502974353 L-15.791346098466395,30.4633963568204 L-15.675,30.53515969889343 L-15.554678073471086,30.60003670476002 L-15.43078745019202,30.657807851168645 L-15.303747336815322,30.708277658846885 L-15.173987596871061,30.7512753539414 L-15.041947296244734,30.786655445862586 L-14.908073217517286,30.81429821957869 L-14.772818348194292,30.834110140693568 L-14.636640347939618,30.84602417193748 L-14.5,30.85 L-14.363359652060382,30.84602417193748 L-14.22718165180571,30.834110140693568 L-14.091926782482714,30.81429821957869 L-13.958052703755266,30.786655445862586 L-13.826012403128939,30.7512753539414 L-13.696252663184678,30.708277658846885 L-13.56921254980798,30.657807851168645 L-13.445321926528914,30.60003670476002 L-13.325000000000001,30.53515969889343 L-13.208653901533607,30.4633963568204 L-13.096677309498453,30.384989502974353 L-12.989449117236633,30.3002044413296 L-12.887332151008478,30.209328057696666 L-12.790671942303337,30.112667848991528 L-12.699795558670404,30.01055088276337 L-12.615010497025649,29.90332269050155 L-12.536603643179602,29.7913460984664 L-12.464840301106571,29.675000000000004 L-12.399963295239983,29.55467807347109 L-12.342192148831359,29.430787450192025 L-12.291722341153118,29.303747336815327 L-12.248724646058603,29.17398759687107 L-12.213344554137416,29.041947296244743 L-12.185701780421311,28.908073217517295 L-12.165889859306436,28.7728183481943 L-12.15397582806252,28.63664034793963 L-12.15,28.50000000000001 L-12.153975828062519,28.363359652060392 L-12.165889859306432,28.22718165180572 L-12.185701780421308,28.091926782482723 L-12.21334455413741,27.95805270375528 L-12.248724646058598,27.82601240312895 L-12.291722341153111,27.69625266318469 L-12.342192148831352,27.569212549807993 L-12.399963295239974,27.445321926528926 L-12.464840301106562,27.325000000000014 L-12.53660364317959,27.20865390153362 L-12.615010497025638,27.096677309498464 L-12.699795558670392,26.989449117236646 L-12.790671942303325,26.887332151008486 L-12.887332151008463,26.790671942303348 L-12.989449117236619,26.699795558670413 L-13.096677309498439,26.615010497025658 L-13.208653901533593,26.536603643179607 L-13.324999999999987,26.464840301106577 L-13.4453219265289,26.39996329523999 L-13.569212549807968,26.342192148831362 L-13.696252663184666,26.29172234115312 L-13.826012403128924,26.248724646058605 L-13.958052703755254,26.213344554137418 L-14.091926782482702,26.18570178042131 L-14.227181651805697,26.165889859306436 L-14.363359652060371,26.15397582806252 L-14.49999999999999,26.15 L-14.636640347939608,26.15397582806252 L-14.772818348194281,26.165889859306432 L-14.908073217517277,26.185701780421308 L-15.041947296244725,26.21334455413741 L-15.173987596871054,26.248724646058598 L-15.303747336815315,26.29172234115311 L-15.430787450192012,26.34219214883135 L-15.55467807347108,26.399963295239978 L-15.674999999999995,26.464840301106566 L-15.79134609846639,26.536603643179596 L-15.903322690501543,26.615010497025644 L-16.010550882763365,26.6997955586704 L-16.11266784899152,26.790671942303334 L-16.209328057696663,26.887332151008472 L-16.300204441329598,26.98944911723663 L-16.384989502974353,27.09667730949845 L-16.4633963568204,27.208653901533605 L-16.53515969889343,27.325 L-16.60003670476002,27.445321926528912 L-16.657807851168645,27.569212549807983 L-16.708277658846885,27.69625266318468 L-16.7512753539414,27.82601240312894 L-16.786655445862586,27.958052703755268 L-16.81429821957869,28.091926782482716 L-16.834110140693568,28.22718165180571 L-16.84602417193748,28.363359652060385 L-16.85,28.500000000000004 " />
<path d="M143.5,74.5 L41.5,74.5 " />
<path d="M-20.5,74.5 L-143.5,74.5 " />
<path d="M29.5,74.5 L-8.5,74.5 " />

Before

Width:  |  Height:  |  Size: 192 KiB

After

Width:  |  Height:  |  Size: 175 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,8 +1,8 @@
import cadquery as cq
from cadquery import exporters
from modelo import mounting_pillar_positions, shell_t, width
from utils import hex_vents, punch_hole, extrude_shape2
import dimensions as dim
from utils import extrude_shape2, hex_vents, punch_hole
# Dimensions for countersunk M4 screws
m4_top = 9
@ -11,8 +11,10 @@ m4_bottom = 4
lip_thickness = 1.5
# Position of pillar + shell_t + pillar "radius" + lip
height = max([y for _, y in mounting_pillar_positions]) + 6 + shell_t + lip_thickness
thickness = shell_t
dim.height = (
max([y for _, y in dim.mounting_pillar_positions]) + 6 + dim.shell_t + lip_thickness
)
thickness = dim.shell_t
front_lip = 8
@ -21,35 +23,39 @@ def model():
model = (
cq.Workplane("XY")
# Hollow box
.box(width, height, thickness)
.box(dim.width, dim.height, thickness)
.edges("|Z and >Y")
.fillet(2)
)
# Make many holes
vent = hex_vents(size=6, width=width * 0.9, height=height * 0.9)[0]
vent = hex_vents(size=6, width=dim.width * 0.9, height=dim.height * 0.9)[0]
model = punch_hole(
model=model,
face=">Z",
w=width,
h=height,
x_offset=0.05 * width,
y_offset=0.05 * height,
w=dim.width,
h=dim.height,
x_offset=0.05 * dim.width,
y_offset=0.05 * dim.height,
hole=vent,
depth=thickness,
)
# Add screw holes
for position in mounting_pillar_positions:
for position in dim.mounting_pillar_positions:
model = (
model.faces(">Z")
.workplane(centerOption="CenterOfBoundBox")
.center(-width / 2 + position[0], height / 2 - position[1] - shell_t)
.center(
-dim.width / 2 + position[0], dim.height / 2 - position[1] - dim.shell_t
)
.placeSketch(cq.Sketch().circle(m4_top / 2 + 1.5))
.extrude(-thickness)
.faces(">Z")
.workplane(centerOption="CenterOfBoundBox")
.center(-width / 2 + position[0], height / 2 - position[1] - shell_t)
.center(
-dim.width / 2 + position[0], dim.height / 2 - position[1] - dim.shell_t
)
.cskHole(m4_bottom, m4_top, 82, depth=None)
)
@ -58,8 +64,10 @@ def model():
model = (
model.faces(">Z")
.workplane(centerOption="CenterOfBoundBox")
.center(0, -height / 2 + lip_thickness / 2)
.placeSketch(cq.Sketch().trapezoid(width - 2 * shell_t, lip_thickness, 90))
.center(0, -dim.height / 2 + lip_thickness / 2)
.placeSketch(
cq.Sketch().trapezoid(dim.width - 2 * dim.shell_t, lip_thickness, 90)
)
.extrude(-front_lip - thickness)
)
@ -68,16 +76,18 @@ def model():
def decorative_cover():
# A decorative thingie to cover the ugly seam in the middle
model = cq.Workplane("XY").box(10, height, 1).edges("|Z").fillet(1)
vent = hex_vents(size=6, width=width * 0.9, height=height * 0.9, density=0.775)[0]
model = cq.Workplane("XY").box(10, dim.height, 1).edges("|Z").fillet(1)
vent = hex_vents(
size=6, width=dim.width * 0.9, height=dim.height * 0.9, density=0.775
)[0]
model = extrude_shape2(
model=model,
face=">Z",
w=width,
h=height,
x_offset=0.05 * width,
y_offset=0.05 * height,
w=dim.width,
h=dim.height,
x_offset=0.05 * dim.width,
y_offset=0.05 * dim.height,
hole=vent,
depth=3,
)
@ -100,10 +110,10 @@ if __name__ == "__main__":
)
exporters.export(
model.faces(">X").workplane(offset=-width / 2).split(keepTop=True),
model.faces(">X").workplane(offset=-dim.width / 2).split(keepTop=True),
"right_side_lid.stl",
)
exporters.export(
model.faces(">X").workplane(offset=-width / 2).split(keepBottom=True),
model.faces(">X").workplane(offset=-dim.width / 2).split(keepBottom=True),
"left_side_lid.stl",
)

Binary file not shown.

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 226 KiB

After

Width:  |  Height:  |  Size: 227 KiB

View File

@ -9,68 +9,26 @@ import keyboard
import screen_pillars
import usb_hub
import zero_holder as cpu_holder
import dimensions as dim
# Base for the notebook. Basically a kbd base that extends back
# as much as possible
# Thickness of the outer material
shell_t = 3
# Size of the kbd board
kbd_height = 95.5
kbd_width = 305
# Size of the whole object
width = kbd_width + 2 * shell_t
height = 159
print(f"Width:{width} Height:{height}")
thickness = 30 + shell_t # 30 inside
# Insert Positions
ti_radius = 2.35
ti_depth = 6.25
# These are placed where convenient, and are used to join the top and bottom
# parts of the case.
# Measured from top-left corner OUTSIDE
mounting_pillar_positions = [
(6, 6),
(6, 43),
(120, 6),
(170, 6),
(width - 6, 6),
(width - 6, 43),
(120, 48),
(170, 48),
]
screen_pillars.init(mounting_pillar_positions, thickness - shell_t)
# 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
screen_pillars.init(dim.mounting_pillar_positions, dim.base_thickness - dim.shell_t)
def model():
# Create the basic shape of the case bottom.
model = (
cq.Workplane("XY")
.workplane(offset=thickness / 2)
.workplane(offset=dim.base_thickness / 2)
.tag("mid_height")
# Hollow box
.box(width, height, thickness)
.box(dim.width, dim.height, dim.base_thickness)
.edges("|Z")
.fillet(2)
.faces(">Z")
.shell(-shell_t)
.shell(-dim.shell_t)
)
# Now the basic box shape is in place, start adding things
@ -78,89 +36,89 @@ def model():
model = usb_hub.add(
model=model,
width=width,
height=height,
thickness=thickness,
width=dim.width,
height=dim.height,
thickness=dim.base_thickness,
bottom_face="<Z",
back_face=">Y",
offset_x=usb_offset_x,
offset_x=dim.usb_offset_x,
offset_y=0,
shell_t=shell_t,
shell_t=dim.shell_t,
)
# Hole for audio in right side
model = audio_plug.add(
model=model,
width=width,
height=height,
thickness=thickness,
offset_x=width - audio_plug.item_w,
width=dim.width,
height=dim.height,
thickness=dim.base_thickness,
offset_x=dim.width - audio_plug.item_w,
offset_y=19,
bottom_face="<Z",
back_face=">X",
shell_t=shell_t,
shell_t=dim.shell_t,
)
# Hole for HDMI out in the back
model = hdmi_out.add(
model=model,
width=width,
height=height,
thickness=thickness,
width=dim.width,
height=dim.height,
thickness=dim.base_thickness,
offset_x=138,
offset_y=0,
bottom_face=None,
back_face=">Y",
shell_t=shell_t,
shell_t=dim.shell_t,
)
model = cpu_holder.add(
model=model,
width=width,
height=height,
thickness=thickness,
offset_x=cpu_offset_x,
offset_y=cpu_offset_y,
width=dim.width,
height=dim.height,
thickness=dim.base_thickness,
offset_x=dim.cpu_offset_x,
offset_y=dim.cpu_offset_y,
bottom_face="<Z",
back_face=None, # Not exposing the holes
shell_t=shell_t,
shell_t=dim.shell_t,
)
# This adds all the holes and extrusions for the battery system
model = battery_holder.add(
model=model,
width=width,
height=height,
thickness=thickness,
offset_x=battery_offset_x,
offset_y=battery_offset_y,
width=dim.width,
height=dim.height,
thickness=dim.base_thickness,
offset_x=dim.battery_offset_x,
offset_y=dim.battery_offset_y,
bottom_face="<Z",
back_face=">Y",
shell_t=shell_t,
shell_t=dim.shell_t,
)
model = screen_pillars.add(
model=model,
width=width,
height=height,
thickness=thickness,
width=dim.width,
height=dim.height,
thickness=dim.base_thickness,
offset_x=0,
offset_y=0,
bottom_face="<Z",
back_face=None,
shell_t=shell_t,
shell_t=dim.shell_t,
)
model = keyboard.add(
model=model,
width=width,
height=height,
thickness=thickness,
width=dim.width,
height=dim.height,
thickness=dim.base_thickness,
bottom_face="<Z",
back_face=None,
offset_x=shell_t,
offset_y=kbd_height + shell_t,
shell_t=shell_t,
offset_x=dim.shell_t,
offset_y=dim.kbd_height + dim.shell_t,
shell_t=dim.shell_t,
)
return model
@ -170,15 +128,21 @@ if __name__ == "__main__":
model = model()
left_cutout = cq.Sketch().polygon(
[(0, 0), (width / 2, 0), (width / 2, -height), (0, -height), (0, 0)],
[
(0, 0),
(dim.width / 2, 0),
(dim.width / 2, -dim.height),
(0, -dim.height),
(0, 0),
],
mode="a",
)
right_side = (
model.faces("<Z")
.workplaneFromTagged("mid_height")
.transformed(offset=cq.Vector(0, 0, -thickness / 2))
.center(-width / 2, height / 2)
.transformed(offset=cq.Vector(0, 0, -dim.base_thickness / 2))
.center(-dim.width / 2, dim.height / 2)
.placeSketch(left_cutout)
.cutBlind(100)
)
@ -187,11 +151,11 @@ if __name__ == "__main__":
right_cutout = cq.Sketch().polygon(
[
(width / 2, 0),
(width, 0),
(width, -height),
(width / 2, -height),
(width / 2, 0),
(dim.width / 2, 0),
(dim.width, 0),
(dim.width, -dim.height),
(dim.width / 2, -dim.height),
(dim.width / 2, 0),
],
mode="a",
)
@ -199,8 +163,8 @@ if __name__ == "__main__":
left_side = (
model.faces("<Z")
.workplaneFromTagged("mid_height")
.transformed(offset=cq.Vector(0, 0, -thickness / 2))
.center(-width / 2, height / 2)
.transformed(offset=cq.Vector(0, 0, -dim.base_thickness / 2))
.center(-dim.width / 2, dim.height / 2)
.placeSketch(right_cutout)
.cutBlind(100)
)

Binary file not shown.

Binary file not shown.

View File

@ -1,41 +1,19 @@
import cadquery as cq
from cadquery import exporters
from modelo import (
kbd_height,
kbd_width,
mounting_pillar_positions,
shell_t,
ti_depth,
ti_radius,
import dimensions as dim
viewport_cutout = (
cq.Sketch().trapezoid(dim.vis_w, dim.vis_h, 90, mode="a").vertices().fillet(2)
)
# Size of the whole object
width = kbd_width + 2 * shell_t
height = 66
height_bottom = 59
thickness = 48 # Will be shorter after construction
# Visible screen size
vis_w = 219
vis_h = 55
viewport_cutout = cq.Sketch().trapezoid(vis_w, vis_h, 90, mode="a").vertices().fillet(2)
# Whole screen size
scr_w = 231
scr_h = 65
scr_thickness = 5.5
screen_cutout = cq.Sketch().trapezoid(scr_w, scr_h, 90, mode="a")
# Screen angle
scr_angle = 20
screen_cutout = cq.Sketch().trapezoid(dim.scr_w, dim.scr_h, 90, mode="a")
# Circuit board and cable hole.
# This is in the back of the screen, and is a bit shorter in height than the
# screen. It's wider so it removes enough material to make the shape simpler.
board_cutout = cq.Sketch().trapezoid(
scr_w + 5,
scr_h - 10,
dim.scr_w + 5,
dim.scr_h - 10,
90,
mode="a",
)
@ -43,13 +21,13 @@ board_cutout = cq.Sketch().trapezoid(
kbd_cable_hole = cq.Sketch().trapezoid(20, 9, 90, mode="a").vertices().fillet(1)
# y needs to be inverted because this is the top side, adn there's 2 pillars we don't use
mounting_pillar_positions = [(x, -y) for x, y in mounting_pillar_positions[:-2]]
dim.mounting_pillar_positions = [(x, -y) for x, y in dim.mounting_pillar_positions[:-2]]
mounting_pillars = (
cq.Sketch()
.push(mounting_pillar_positions)
.push(dim.mounting_pillar_positions)
.trapezoid(-12, 12, 90, mode="a")
.circle(ti_radius, mode="s")
.circle(dim.ti_radius, mode="s")
.clean()
)
@ -59,10 +37,10 @@ def model():
cq.Workplane("XY")
.workplane()
.tag("mid_height")
.box(width, height, thickness)
.box(dim.width, dim.tl_height, dim.tl_full_thickness)
# The screen goes rotated
.faces(">Z")
.transformed(rotate=(scr_angle, 0, 0))
.transformed(rotate=(dim.tl_scr_angle, 0, 0))
# Move the screen "lower" so it doesn't interfere
# so much with the back
.center(0, -2)
@ -79,18 +57,18 @@ def model():
# Make bottom smaller to fit with base
.faces(">X")
.workplane(centerOption="CenterOfBoundBox")
.center(-height / 2, -thickness / 2)
.center(-dim.tl_height / 2, -dim.tl_full_thickness / 2)
.placeSketch(
cq.Sketch()
.polygon(
[
(height_bottom, 0),
(height_bottom, thickness / 3),
(height, thickness - 21),
(height, thickness),
(height + 5, thickness + 5),
(height + 5, 0),
(height_bottom, 0),
(dim.tl_height_bottom, 0),
(dim.tl_height_bottom, dim.tl_full_thickness / 3),
(dim.tl_height, dim.tl_full_thickness - 21),
(dim.tl_height, dim.tl_full_thickness),
(dim.tl_height + 5, dim.tl_full_thickness + 5),
(dim.tl_height + 5, 0),
(dim.tl_height_bottom, 0),
]
)
.vertices()
@ -103,26 +81,26 @@ def model():
# Cut off viewport hole so we can see the screen
.workplaneFromTagged("slanted")
.placeSketch(viewport_cutout)
.cutBlind(-shell_t)
.cutBlind(-dim.shell_t)
# Make hole for screen assembly so the whole screen fits
.workplaneFromTagged("slanted")
.workplane(offset=-shell_t, centerOption="CenterOfBoundBox")
.workplane(offset=-dim.shell_t, centerOption="CenterOfBoundBox")
# Left bezel is wider than right one, so this hole is displaced to the left
.center(-3, 0)
.placeSketch(screen_cutout)
.cutBlind(-scr_thickness)
.cutBlind(-dim.scr_thickness)
# Make it hollow
.faces("<Z")
# Can't be exactly shell_t because cq fails
.shell(-shell_t + 0.01)
.shell(-dim.shell_t + 0.01)
# Cut hole for the screen board and cables
.workplaneFromTagged("slanted")
.workplane(offset=-scr_thickness, centerOption="CenterOfBoundBox")
.workplane(offset=-dim.scr_thickness, centerOption="CenterOfBoundBox")
.placeSketch(board_cutout)
.cutBlind(-6)
.workplaneFromTagged("mid_height")
.workplane(offset=-thickness / 2, centerOption="CenterOfBoundBox")
.center(-width / 2, height_bottom - height / 2 - shell_t)
.workplane(offset=-dim.tl_full_thickness / 2, centerOption="CenterOfBoundBox")
.center(-dim.width / 2, dim.tl_height_bottom - dim.tl_height / 2 - dim.shell_t)
.placeSketch(mounting_pillars)
.extrude(10)
# Fillet the front edge of the screen case so it looks softer
@ -135,7 +113,7 @@ if __name__ == "__main__":
model = model()
exporters.export(model, "screen_mount.stl")
offset_width = -width / 2
offset_width = -dim.width / 2
right_side = (
model.faces(">X")

Binary file not shown.