Skip to content

Instantly share code, notes, and snippets.

@Nina967
Forked from m0nochr0me/lithophane.scad
Created November 21, 2020 16:57
Show Gist options
  • Save Nina967/6324a315c1151b887e909f14248c2afe to your computer and use it in GitHub Desktop.
Save Nina967/6324a315c1151b887e909f14248c2afe to your computer and use it in GitHub Desktop.
OpenSCAD script for lithophane creation
// 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();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment