Created
May 13, 2018 13:43
-
-
Save m0nochr0me/0ef94175aacd6e0a5864f59782edc32e to your computer and use it in GitHub Desktop.
OpenSCAD script for lithophane creation
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
// source image | |
image="img.png"; | |
// lithophane height | |
H = 2.6; | |
// dimensions | |
L = 90; | |
W = 60; | |
// border width | |
T = 1.2; | |
// bottom height | |
O = 0.2; | |
// border inset | |
C = 0.4; | |
// scale of image | |
S = 0.5; | |
module frame() { | |
difference() { | |
translate([-T/2, -T/2, 0]) | |
cube([L+T, W+T, H + O]); | |
translate([C/2, C/2, 0]) | |
cube([L-C, W-C, H+O*2]); | |
} | |
cube([L, W, O]); | |
} | |
translate([L/2, W/2, O]) | |
scale([S, S, H/100]) | |
surface(file = image, center = true, invert = false, convexity = 5); | |
frame(); |
Nina967
commented
Nov 21, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment