Skip to content

Commit

Permalink
Merge pull request ibnuda#91 from happysalada/refaktor
Browse files Browse the repository at this point in the history
configurable wall-thickness and web-thickness
  • Loading branch information
ibnuda authored Jul 20, 2021
2 parents 69a4e96 + 0f21607 commit 77bcc46
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions src/dactyl_keyboard/common.clj
Original file line number Diff line number Diff line change
Expand Up @@ -534,12 +534,13 @@
shift-left (= column 0)
shift-up (and (not (or shift-right shift-left)) (= row 0))
shift-down (and (not (or shift-right shift-left)) (>= row lastrow))
wall-thickness (get c :configuration-wall-thickness 5)
position (if shift-up
(key-position c column row (map + (wall-locate2 0 1) [0 (/ mount-height 2) 0]))
(key-position c column row (map + (wall-locate2 wall-thickness 0 1) [0 (/ mount-height 2) 0]))
(if shift-down
(key-position c column row (map - (wall-locate2 0 -1) [0 (/ mount-height 2) 0]))
(key-position c column row (map - (wall-locate2 wall-thickness 0 -1) [0 (/ mount-height 2) 0]))
(if shift-left
(map + (left-key-position c row 0) (wall-locate3 -1 0))
(key-position c column row (map + (wall-locate2 1 0) [(/ mount-width 2) 0 0])))))]
(map + (left-key-position c row 0) (wall-locate3 wall-thickness -1 0))
(key-position c column row (map + (wall-locate2 wall-thickness 1 0) [(/ mount-width 2) 0 0])))))]
(->> (screw-insert-shape bottom-radius top-radius height)
(translate [(first position) (second position) (/ height 2)]))))
2 changes: 1 addition & 1 deletion src/dactyl_keyboard/manuform.clj
Original file line number Diff line number Diff line change
Expand Up @@ -1238,7 +1238,7 @@
(thumb-bl-place c (translate (wall-locate1 wall-thickness -0.5 1) (web-post-tr web-thickness)))
(thumb-bl-place c (translate (wall-locate2 wall-thickness -0.5 1) (web-post-tr web-thickness)))
(thumb-bl-place c (translate (wall-locate3 wall-thickness -0.5 1) (web-post-tr web-thickness)))
(thumb-tl-place c thumb-post-tl))
(thumb-tl-place c (thumb-post-tl web-thickness)))
(hull (thumb-ml-place c (if (= thumb-count :three) (thumb-post-tr web-thickness) (web-post-tr web-thickness)))
(thumb-ml-place c (translate (wall-locate1 wall-thickness 0 1) (if (= thumb-count :three) (thumb-post-tr web-thickness) (web-post-tr web-thickness))))
(thumb-ml-place c (translate (wall-locate2 wall-thickness 0 1) (if (= thumb-count :three) (thumb-post-tr web-thickness) (web-post-tr web-thickness))))
Expand Down

0 comments on commit 77bcc46

Please sign in to comment.