Skip to content

Instantly share code, notes, and snippets.

@patmandenver
Last active March 5, 2020 01:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save patmandenver/0860e4bfc56d546f06ae01a005b45143 to your computer and use it in GitHub Desktop.
Save patmandenver/0860e4bfc56d546f06ae01a005b45143 to your computer and use it in GitHub Desktop.
$fn=100;
//Note: give it 5-7 min to render :/
//Baby yoda svg file needs to be in same
//Directory as this openscad file
svg_file="baby_yoda.svg";
heigth = 80;
length = 80;
depth = 20;
rim = 5;
layer_01 = 0.6;
layer_02 = 0.6; //baby yoda
layer_03 = 0.6;
union(){
translate([-length, 0, 0]){
linear_extrude(layer_01){
square([length, heigth]);
}
}
translate([-length, 0, layer_01+layer_02]){
linear_extrude(layer_03){
square([length, heigth]);
}
}
linear_extrude(depth){
translate([-length, 0, 0]){
difference(){
square([length, heigth]);
translate([rim/2, rim/2, 0]){
square([length-rim, heigth-rim]);
}
}
}
}
mirror([1,0,0]){
color("#000000"){
translate([0, 0, layer_01]){
linear_extrude(layer_02){
import(svg_file, center=false,
dpi=80*235/heigth);
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment