1
0
mirror of git://projects.qi-hardware.com/wernermisc.git synced 2024-12-19 22:08:26 +02:00

bacon/case/case.fpd: added the middle part (untested)

This commit is contained in:
Werner Almesberger 2012-03-22 05:33:59 -03:00
parent 6442e08d75
commit 84546403ea

View File

@ -89,6 +89,79 @@ frame top_surface {
}
/* ----- Middle part ------------------------------------------------------- */
frame mid_rrect {
base: vec @(red, red)
RRECT_SETUP(edge_, base, width-2*red, length-2*red, ro_edge)
usb_ur: vec edge_ur(-usb_roff, 0mm)
usb_ul: vec usb_ur(-usb_w, 0mm)
usb_ll: vec usb_ul(0mm, -usb_d+red)
usb_lr: vec usb_ur(0mm, -usb_d-red)
line edge_llx edge_lrx
line edge_ulx usb_ul
line usb_ul usb_ll /* USB bay */
line usb_ll usb_lr
line usb_lr usb_ur
line usb_ur edge_urx
line edge_lly edge_uly
line edge_lry edge_ury
}
frame mid_outline {
set red = 0mm
frame mid_rrect @
}
frame mid_ridge {
loop if = 1, mid_ridge
frame mid_outline @
set red = topborder
frame mid_rrect @
}
frame mid_pcb {
loop if = 1, mid_pcb
frame mid_outline @
set red = topborder+topridge
frame mid_rrect @
}
frame post {
vec @(r, 0mm)
circ @ .
}
frame mid_body {
loop if = 1, mid_body
frame mid_outline @
bc: vec @(width/2, batt_y)
br: vec bc(batt_d/2, 0mm)
circ bc br
set r = post_do/2
vec @(post_x, cvr_f+cvr_d+post_y)
frame post .
vec @(width-post_x, cvr_f+cvr_d+post_y)
frame post .
}
/* ----- Main -------------------------------------------------------------- */
@ -96,11 +169,15 @@ package "top-$part-$z"
unit mm
table
{ part, z, top_surface, top_window, top_pcb, top_ridge }
{ "top_surface", 2.5, 1, 0, 0, 0 }
{ "top_window", 1.5, 0, 1, 0, 0 }
// { "top_pcb", 0.5, 0, 0, 1, 0 }
{ "top_ridge", 0.5, 0, 0, 0, 1 }
{ part, z, top_surface, top_window, top_pcb, top_ridge,
mid_ridge, mid_pcb, mid_body }
{ "top_surface", 2.5, 1, 0, 0, 0, 0, 0, 0 }
{ "top_window", 1.5, 0, 1, 0, 0, 0, 0, 0 }
// { "top_pcb", 0.5, 0, 0, 1, 0, 0, 0, 0 }
{ "top_ridge", 0.5, 0, 0, 0, 1, 0, 0, 0 }
{ "mid_ridge", 0.5, 0, 0, 0, 0, 1, 0, 0 }
{ "mid_pcb", 1.0, 0, 0, 0, 0, 0, 1, 0 }
{ "mid_body", 1.0, 0, 0, 0, 0, 0, 0, 1 }
table
{ pcbw, pcbl, pcbgap }
@ -116,6 +193,20 @@ table
{ cmp_x0, cmp_y0, cmp_x1, cmp_y1, cmp_r }
{ 6.5mm, 1.0mm, 19.5mm, 30.0mm, 2.0mm }
table
/* usb_roff = offset from right outer case edge */
{ usb_w, usb_d, usb_roff }
{ 8.5mm, 6.0mm, 4.0mm }
table
/* post_y is from the edge of the battery bay. post_x is from the edge */
{ batt_d, batt_y, post_do, post_di, post_y, post_x }
{ 20.2mm, 12.1mm, 4.1mm, 4.0mm, 5.0mm, 4.5mm }
table
{ cvr_w, cvr_d, cvr_f, cvr_play }
{ 20.0mm, 15.0mm, 5.0mm, 0.1 mm }
set width = pcbw+2*(pcbgap+topridge+topborder)
set length = pcbl+2*(pcbgap+topridge+topborder)
@ -134,6 +225,10 @@ frame top_pcb @
frame top_window @
frame top_surface @
frame mid_ridge @
frame mid_pcb @
frame mid_body @
measx top_outline.edge_ul -> top_outline.edge_ur 4mm
measy top_outline.edge_ll -> top_outline.edge_ul 4mm
measx top_pcb.pcb_ul -> top_pcb.pcb_ur 3mm