Increase performance with pre-calculated values

This commit is contained in:
maride 2017-11-27 01:30:58 +01:00
parent 4bade193be
commit 3328a996ee

View File

@ -1,12 +1,16 @@
LETTER_WIDTH=10; LETTER_WIDTH=10;
LETTER_HEIGHT=30; LETTER_HEIGHT=30;
LETTER_HEIGHT_13=LETTER_HEIGHT/3;
LETTER_HEIGHT_23=LETTER_HEIGHT*2/3;
LETTER_HEIGHT_12=LETTER_HEIGHT/2;
// m // m
polygon(points=[[0,LETTER_HEIGHT*2/3], [0, LETTER_HEIGHT/3], [LETTER_WIDTH, LETTER_HEIGHT*2/3], [LETTER_WIDTH, LETTER_HEIGHT]]); polygon(points=[[0,LETTER_HEIGHT_23], [0, LETTER_HEIGHT_13], [LETTER_WIDTH, LETTER_HEIGHT_23], [LETTER_WIDTH, LETTER_HEIGHT]]);
translate([LETTER_WIDTH*2, 0]) translate([LETTER_WIDTH*2, 0])
polygon(points=[[0,LETTER_HEIGHT*2/3], [0, LETTER_HEIGHT/3], [LETTER_WIDTH/2, LETTER_HEIGHT*2/3], [LETTER_WIDTH/2, LETTER_HEIGHT]]); polygon(points=[[0,LETTER_HEIGHT_23], [0, LETTER_HEIGHT/3], [LETTER_WIDTH/2, LETTER_HEIGHT_23], [LETTER_WIDTH/2, LETTER_HEIGHT]]);
translate([LETTER_WIDTH*3.5, 0]) translate([LETTER_WIDTH*3.5, 0])
polygon(points=[[0,LETTER_HEIGHT*2/3], [0, LETTER_HEIGHT/3], [LETTER_WIDTH/2, LETTER_HEIGHT*2/3], [LETTER_WIDTH/2, LETTER_HEIGHT]]); polygon(points=[[0,LETTER_HEIGHT_23], [0, LETTER_HEIGHT/3], [LETTER_WIDTH/2, LETTER_HEIGHT_23], [LETTER_WIDTH/2, LETTER_HEIGHT]]);
translate([LETTER_WIDTH, 0]) translate([LETTER_WIDTH, 0])
square([LETTER_WIDTH, LETTER_HEIGHT]); square([LETTER_WIDTH, LETTER_HEIGHT]);