mirror of
https://github.com/nophead/NopSCADlib.git
synced 2025-08-27 09:14:24 +02:00
Single 7_segment objects can now have multiple digits.
This is deduced from the digit size compared to the overall size. The decimal point is now suppressed if there are not enough pins. Added 02531A and 02352A 3 digit displays.
This commit is contained in:
@@ -21,9 +21,11 @@ use <../utils/layout.scad>
|
||||
|
||||
include <../vitamins/7_segments.scad>
|
||||
|
||||
function digits(s) = 7_segment_digits(s) < 2 ? 2 : 1;
|
||||
|
||||
module 7_segments()
|
||||
layout([for(s = 7_segments) 7_segment_size(s).x * 2], 5) let(s = 7_segments[$i])
|
||||
7_segment_digits(s, 2);
|
||||
layout([for(s = 7_segments) 7_segment_size(s).x * digits(s)], 3) let(s = 7_segments[$i])
|
||||
7_segment_digits(s, digits(s));
|
||||
|
||||
if($preview)
|
||||
7_segments();
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 53 KiB |
Reference in New Issue
Block a user