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