40 lines
936 B
OpenSCAD
40 lines
936 B
OpenSCAD
include <bakje_base.scad>
|
|
|
|
WIDTH = 1; // [1:1:10]
|
|
DEPTH = 1; // [1:1:10]
|
|
|
|
LABLE_HIEGHT = 10.0; // [1.0:0.125:20.0]
|
|
//LABLE_WIDTH = floor(0.25*WIDTH) + 0.8; // [0.1:0.1:3.0]
|
|
LABLE_WIDTH = max(0.08, 0.9 - 0.1*WIDTH) * WIDTH; // [0.1:0.1:3.0]
|
|
|
|
RENDER = "bakje"; // [bakje: bakje, grid: grid, all: all]
|
|
|
|
if (RENDER == "bakje" || RENDER == "all")
|
|
bakje_lable();
|
|
if (RENDER == "grid" || RENDER == "all")
|
|
grid();
|
|
|
|
module bakje_lable(){
|
|
difference() {
|
|
union(){
|
|
bakje(width=WIDTH, depth=DEPTH);
|
|
lable();
|
|
}
|
|
walls(width=WIDTH, depth=DEPTH, cut=true);
|
|
}
|
|
}
|
|
|
|
module lable(){
|
|
translate([
|
|
-0.5*WIDTH*UNIT,
|
|
0.5*DEPTH*UNIT - OUTER_TOLLERANCE - WALL_THIKNESS,
|
|
HIEGHT*UNIT - LABLE_HIEGHT*sqrt(2)
|
|
])
|
|
difference(){
|
|
rotate([45, 0, 0])
|
|
cube([LABLE_WIDTH*UNIT, LABLE_HIEGHT, LABLE_HIEGHT]);
|
|
translate([-WALL_THIKNESS, -1*LABLE_HIEGHT, -WALL_THIKNESS])
|
|
cube([LABLE_WIDTH*UNIT, 2*LABLE_HIEGHT, 0.5*LABLE_HIEGHT*sqrt(2)]);
|
|
}
|
|
}
|