1
0
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:
Chris Palmer
2021-10-26 12:24:59 +01:00
parent 09bce09a85
commit f5528c5a9a
5 changed files with 55 additions and 37 deletions

View File

@@ -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