Skip to content

Instantly share code, notes, and snippets.

@ralsina
Created July 6, 2022 20:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ralsina/5940b92cef319e06743a013d90c2096d to your computer and use it in GitHub Desktop.
Save ralsina/5940b92cef319e06743a013d90c2096d to your computer and use it in GitHub Desktop.
length=135
front_h = 10
back_h =20
width = 210
fillet_s = 5
screen_h = 100
kbd_w = 200
kbd_h = 4
kbd_l = 125
kbd_fillet = 5
kbd_base = \
cq.Workplane("left").\
lineTo(0,length).\
lineTo(front_h,length).\
lineTo(back_h, 0).\
close().\
extrude(width).\
edges("+Z").fillet(fillet_s).\
edges("+Y").fillet(fillet_s).\
faces(">Z").workplane(offset=20).\
center(5,-5).\
lineTo(kbd_w,0).\
lineTo(kbd_w,-kbd_l).\
lineTo(0,-kbd_l).close().cutBlind(-20-kbd_h)
screen_base = \
cq.Workplane("bottom").\
lineTo(-width, 0).\
lineTo(-width, back_h).\
lineTo(0, back_h).\
close().\
extrude(screen_h).edges("|Y and <Z").fillet(fillet_s).faces(">Y").shell(-2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment