Created
April 18, 2020 18:45
-
-
Save codekansas/75f3d8e1c1dd6aee6d30de147ebb364c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Parametric OpenSCAD design for a laptop stand. | |
// Laptop dimensions. | |
lwid = 304.1; | |
lhei = 212.4; | |
ldep = 15; | |
// Stand long dimensions. | |
slen = 200; | |
sswid = 60; | |
sstap = 0.6; | |
suhei = 100; | |
sbwid = 60; | |
// Stand thickness. | |
sthi = 10; | |
// Buttress dimensions. | |
butwid = 10; | |
butfact = 0.7; | |
// Additional padding factor for slot. | |
padding = 1; | |
module baseCorner() { | |
polyhedron( | |
points=[ | |
[0, 0, 0], | |
[sbwid, sswid * (1 - sstap), 0], | |
[sbwid, sswid * sstap, 0], | |
[0, sswid, 0], | |
[0, 0, sthi], | |
[sbwid, sswid * (1 - sstap), sthi], | |
[sbwid, sswid * sstap, sthi], | |
[0, sswid, sthi], | |
], | |
faces=[ | |
[0, 1, 2, 3], | |
[4, 5, 1, 0], | |
[7, 6, 5, 4], | |
[5, 6, 2, 1], | |
[6, 7, 3, 2], | |
[7, 4, 0, 3], | |
] | |
); | |
} | |
module buttress() { | |
translate([0, (sswid + butwid) / 2, sthi]) | |
rotate([90, 0, 0]) | |
linear_extrude(butwid) | |
polygon( | |
points=[ | |
[0, 0], | |
[0, suhei*butfact], | |
[sbwid*butfact, 0], | |
]); | |
} | |
sbtranslate = ldep + (2 * (padding + sthi)) + sbwid; | |
// Prints the four base corners. | |
translate([sbwid, 0, 0]) | |
mirror([1, 0, 0]) { | |
baseCorner(); | |
buttress(); | |
} | |
translate([sbwid, slen - sswid, 0]) | |
mirror([1, 0, 0]) { | |
baseCorner(); | |
buttress(); | |
} | |
translate([sbtranslate, slen - sswid, 0]) { | |
baseCorner(); | |
buttress(); | |
} | |
translate([sbtranslate, 0, 0]) { | |
baseCorner(); | |
buttress(); | |
} | |
// Prints the inside. | |
translate([sbwid, 0, 0, ]) | |
cube([ldep + (2 * (padding + sthi)), slen, sthi]); | |
module standUpright() { | |
polyhedron( | |
points=[ | |
[0, 0, 0], | |
[sthi, 0, 0], | |
[sthi, sswid, 0], | |
[0, sswid, 0], | |
[0, sswid * (1 - sstap), suhei], | |
[sthi, sswid * (1 - sstap), suhei], | |
[sthi, sswid * sstap, suhei], | |
[0, sswid * sstap, suhei], | |
], | |
faces=[ | |
[0, 1, 2, 3], | |
[4, 5, 1, 0], | |
[7, 6, 5, 4], | |
[5, 6, 2, 1], | |
[6, 7, 3, 2], | |
[7, 4, 0, 3], | |
] | |
); | |
} | |
// Prints the four uprights. | |
translate([sbwid, 0, sthi]) | |
standUpright(); | |
translate([sbwid + ldep + (2 * padding + sthi), slen - sswid, sthi]) | |
standUpright(); | |
translate([sbwid + ldep + (2 * padding + sthi), 0, sthi]) | |
standUpright(); | |
translate([sbwid, slen - sswid, sthi]) | |
standUpright(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Final result: