Created
June 1, 2020 00:33
-
-
Save ezterry/ce207da27b8978acd20d45c8533a7c26 to your computer and use it in GitHub Desktop.
A sample OpenSCAD file to generate a Die or Dice with the first letter of the Harry Potter Owl grades.
This file contains hidden or 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
// Simple dice model that shows the grades of the Owl Test from | |
// Harry Potter | |
// Simple OpenSCAD example | |
// 2020 - Terrence Ezrol | |
// CC-0 - No Rights Reserved | |
// https://creativecommons.org/share-your-work/public-domain/cc0/ | |
// Font used on the Dice | |
FONT = "FreeMono:style=Bold"; | |
//A text object to display on the side of the dice | |
module TextChar(ch){ | |
translate([3,3,-2]){ | |
linear_extrude(height = 2.5, center = false){ | |
text(ch,size=11,font=FONT); | |
} | |
} | |
} | |
//build the actuale object | |
difference(){ | |
//a cube, but testing linear extrude | |
linear_extrude(height = 15, center = false) | |
square(15,[0,0]); | |
//combination of the 6 letters on the side | |
//Passing O,E,A | |
//Failing P,D,T | |
union() { | |
//Harry Potter Owl Grades | |
translate([0,0,15]) | |
rotate([0,0,0]) | |
TextChar("O"); | |
translate([0,0,0]) | |
rotate([90,0,0]) | |
TextChar("E"); | |
translate([15,0,15]) | |
rotate([0,90,0]) | |
TextChar("A"); | |
translate([0,15,0]) | |
rotate([180,0,0]) | |
TextChar("P"); | |
translate([0,15,15]) | |
rotate([270,0,0]) | |
TextChar("D"); | |
translate([0,0,0]) | |
rotate([0,270,0]) | |
TextChar("T"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment