Skip to content

Instantly share code, notes, and snippets.

@m0nochr0me
Created May 13, 2018 13:43
Show Gist options
  • Save m0nochr0me/0ef94175aacd6e0a5864f59782edc32e to your computer and use it in GitHub Desktop.
Save m0nochr0me/0ef94175aacd6e0a5864f59782edc32e 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();
@Nina967
Copy link

Nina967 commented Nov 21, 2020

img

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment