Skip to content

Commit

Permalink
change rrect to use radius instead of diameter
Browse files Browse the repository at this point in the history
  • Loading branch information
b-kelly committed Mar 20, 2021
1 parent 1ddf899 commit 525901a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions enclosure.scad
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ encLength =

encHeight = switchHeight + wallWidth;

module rrect(d, x, y, h=1)
module rrect(r, x, y, h=1)
{
r = d / 2;
d = r * 2;
tl = x - d;
tw = y - d;
translate([r, r, 0]) {
Expand Down Expand Up @@ -85,10 +85,11 @@ module microUsbCutout(depth = wallWidth)
difference()
{
mod = wallWidth * 2;
cornerCurveRadius = 5;

rrect(10, encLength, encWidth, encHeight);
rrect(cornerCurveRadius, encLength, encWidth, encHeight);
translate([wallWidth, wallWidth, wallWidth])
rrect(10, encLength-mod, encWidth-mod, encHeight);
rrect(cornerCurveRadius, encLength-mod, encWidth-mod, encHeight);

pcbHeight = 1.6;
translate([(encLength / 2), 0, wallWidth + pcbHeight])
Expand Down

0 comments on commit 525901a

Please sign in to comment.