Merge pull request #40 from rsheldiii/examples-extraordinaire

Common use case examples
This commit is contained in:
Bob 2020-05-01 16:15:42 -04:00 committed by GitHub
commit aa276f380d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 79 additions and 0 deletions

View File

@ -0,0 +1,29 @@
include <../includes.scad>
/* use this file to generate multimaterial models for making keycaps with a
different material for the key top.
This would be great to use with flexible filament, to make squishy-topped
keys.
You don't need a multimaterial printer to use these files since it's hard
height cutoff. You could print the bottom, leave the prints on the bed, and
then print the top in a different material. Be careful though! your start
gcode may crash into the prints.
*/
depth = 1;
// swap the debug()s to render opposite part
/* debug() */ difference() { // intersection() {
key();
top_of_key() {
translate([-total_key_width(),-total_key_height(),-$total_depth - depth]) cube([total_key_width()*2, total_key_height()*2, $total_depth]);
}
}
debug() intersection() {
key();
top_of_key() {
translate([-total_key_width(),-total_key_height(),-$total_depth - depth]) cube([total_key_width()*2, total_key_height()*2, $total_depth]);
}
}

View File

@ -0,0 +1,16 @@
include <../includes.scad>
/* in this example we'll use some openSCAD to generate files for printing inset
legends with a multimaterial printer.
*/
legends = ["F1", "1", "q", "a", "z", ""];
for (x = [0:1:4]) {
translate_u(0,-x) legend(legends[x]) dcs_row(x, 0) {
// swap the debug()s to render opposite part
debug() key(true);
/* debug() */ dished() {
legends($inset_legend_depth);
}
}
}

View File

@ -0,0 +1,34 @@
include <../includes.scad>
/* Don't have a multimaterial printer but still want cool "doubleshot" legends?
with a couple tricks, you can! We just have to print upside down with no
dish.
Here's how to use this file:
1. modify it as you see fit
2. render the legends and the keycaps separately
3. run the legends through your 3d printer. make sure they are a single layer
4. LEAVE THEM on the bed
5. change filaments
6. run the keycaps over the legends. MAKE SURE they line up! PrusaSlicer
centers models on the bed
7. voila!
8. use a powder-coated bed for extra points
*/
legends = ["F1", "1", "q", "a", "z", ""];
for (x = [0:1:4]) {
translate_u(0,-x) dcs_row(x, 0) upside_down() legend(legends[x]) {
$dish_type = "disable";
$inset_legend_depth = 0.2; // whatever layer height you use
union() {
// swap the debug()s to render opposite part
debug() key(true);
/* debug() */ dished() {
legends($inset_legend_depth);
}
}
}
}