add label

This commit is contained in:
numzero 2026-04-07 01:28:41 +03:00
parent 7f15ecbf27
commit d581d32d58

View File

@ -8,6 +8,7 @@ marks_medium_ml = 0; // .1
marks_large_ml = 1; // .1
extra_height_mm = 5;
text_size_mm = 6; // .5
wall_thickness_mm = 0.8;
mark_depth_mm = 0.3;
mark_width_mm = 0.4;
@ -26,6 +27,8 @@ outer_radius_mm = inner_radius_mm + wall_thickness_mm;
inner_height_mm = 10 * useful_height_cm + extra_height_mm;
outer_height_mm = inner_height_mm + bottom_thickness_mm;
text_z_mm = 10 * useful_height_cm - text_size_mm;
difference() {
// outer shape
translate([0, 0, -bottom_thickness_mm])
@ -42,4 +45,17 @@ difference() {
for (v = [0:step_ml:volume_ml])
translate([0, 10 * v / cross_section_cm2, 0])
square([mark_depth_mm + 1, mark_width_mm]);
// text
translate([0, 0, text_z_mm])
difference() {
rotate([0, 0, -90])
rotate([90, 0, 0])
render(convexity=10)
linear_extrude(outer_radius_mm + 1)
text(str(volume_ml, "ml"), size=text_size_mm, halign="center");
translate([0, 0, -1])
cylinder(h=text_size_mm+2, r=outer_radius_mm - mark_depth_mm);
}
}