labeler revised for improved legibility
This commit is contained in:
20
labeler.scad
20
labeler.scad
@@ -1,16 +1,20 @@
|
||||
use <fontmetrics.scad>
|
||||
|
||||
content="10kΩ 0603";
|
||||
fnt="Arial";
|
||||
height=3.5;
|
||||
|
||||
abs=0; // 1 if printing ABS...adds anti-warp pads
|
||||
$fn=45;
|
||||
|
||||
l=measureText(content, font=fnt, size=height)+2;
|
||||
label("10kΩ 0603", "Arial", 5, .75);
|
||||
|
||||
translate([0,10,0])
|
||||
label("10", "Arial:style=Bold", 5, 1);
|
||||
|
||||
module label(t, f, h, xc)
|
||||
{
|
||||
l=measureText(t, font=f, size=h)+2;
|
||||
|
||||
scale([xc, 1, 1])
|
||||
translate([0.5,2,.4])
|
||||
linear_extrude(.6, convexity=10)
|
||||
text(content, size=height, font=fnt);
|
||||
text(t, size=h, font=f);
|
||||
|
||||
cube([l, 8, 0.4]);
|
||||
cube([l*xc, 8, 0.4]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user