From 183be1c828a7f5fc9baf45faad8dd196563ae48d Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Tue, 1 Mar 2022 17:44:35 -0500 Subject: [PATCH] Add key decoder card --- key_decoder.py | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 key_decoder.py diff --git a/key_decoder.py b/key_decoder.py new file mode 100644 index 0000000..a92bde4 --- /dev/null +++ b/key_decoder.py @@ -0,0 +1,61 @@ +import cadquery as cq +from cadquery import exporters + +import key_bittings +from key_bittings import BittingSpecification + +kerf = .11 + +bitting_width = 5 + +text_size = 5 +text_gap = 2 + +margins = 5 +margin_radius = 2 + + +def bitting(loc: cq.Location, name: str, depth: float): + # can only make text in a 3D workplane, so make it in 3D and extract the face + text = ( + cq.Workplane() + .text(name, fontsize=text_size, distance=1, valign="top", halign="center") + .edges("