tweaks, add makefile
This commit is contained in:
parent
49bdada671
commit
7f8d98ca0a
4 changed files with 58 additions and 10 deletions
21
main.scad
21
main.scad
|
|
@ -1,7 +1,7 @@
|
|||
/* [Main design variables] */
|
||||
variant = "stamp"; // ["stamp", "stencil"]
|
||||
// Set the text size to match the width.
|
||||
textsize = 36; // [10:36]
|
||||
textsize = 24; // [10:36]
|
||||
font_set = 4; // [0:"linux", 1:"windows", 2:"custom", 3:"stencil", 4:"manual"]
|
||||
font_manual = "Ubuntu:style=Bold";
|
||||
font_index = 0;
|
||||
|
|
@ -39,7 +39,6 @@ fonts_custom = [
|
|||
];
|
||||
|
||||
fonts_stencil = ["Depot:style=Regular",
|
||||
"Depot Filled:style=Regular",
|
||||
"Allerta Stencil:style=Regular",
|
||||
"Stardos Stencil:style=Regular",
|
||||
"Stardos Stencil:style=Bold",
|
||||
|
|
@ -65,6 +64,10 @@ width = tm.size[0];
|
|||
height = tm.size[1];
|
||||
base_position = tm.position;
|
||||
|
||||
echo();
|
||||
echo(str("model size is x:", width, " y:", height));
|
||||
echo("");
|
||||
|
||||
// All variables are set, make main
|
||||
main();
|
||||
|
||||
|
|
@ -122,15 +125,13 @@ module stencil()
|
|||
{
|
||||
difference()
|
||||
{
|
||||
stamp_base(width, height, base_thickness_stencil, base_rounding_stamp);
|
||||
translate(base_position)
|
||||
translate([-border,-border,0])
|
||||
stamp_base(width+2*border, height+2*border, base_thickness_stencil, base_rounding_stamp);
|
||||
|
||||
linear_extrude(height = base_thickness_stencil+0.01)
|
||||
text(line, font = font, size=textsize);
|
||||
|
||||
for (i = [0 : 1 : len(lines)])
|
||||
{
|
||||
line = lines[(len(lines)-1)-i];
|
||||
translate(v = [width/2, linespacing/2 +border + i*linespacing, 0])
|
||||
linear_extrude(height = base_thickness_stencil+0.01)
|
||||
text(line, font = font, halign="center", valign="center", size=textsize);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue