p "module ${modb}_2D(){\n";
p " scale(Commitid__scale()){\n";
my $y = @lines;
+ my $cols = 1;
foreach my $line (@lines) {
$y--;
my $x = 0;
$x, $y, chrmodname $chr;
$x++;
}
+ $cols = $x if $x > $cols;
}
p " }\n";
p "}\n";
p " d=Commitid_depth();\n";
p " translate([0,0,-d]) linear_extrude(height=d*2) ${modb}_2D();\n";
p "}\n";
+ p sprintf "function %s_sz() = Commitid__scale() * 0.1 * [ %d, %d ];\n",
+ $modb, 2 * (@lines * 6 - 1), 2 * ($cols * 4 - 1);
}
our @demo;