From d581d32d58b74c50d729ee2ec4bc7f3d90f5ba46 Mon Sep 17 00:00:00 2001 From: numzero Date: Tue, 7 Apr 2026 01:28:41 +0300 Subject: [PATCH] add label --- mini-tube.scad | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/mini-tube.scad b/mini-tube.scad index 268dfe4..10a9cd4 100644 --- a/mini-tube.scad +++ b/mini-tube.scad @@ -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); + } }