From 154489989a6c7ee30abadf7fe91ae64215175749 Mon Sep 17 00:00:00 2001 From: daniel watson Date: Tue, 10 Apr 2018 20:39:26 -0700 Subject: [PATCH] add binary, and trinary up to 4 places --- place-value-manipulative.scad | 55 ++++++++++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/place-value-manipulative.scad b/place-value-manipulative.scad index 8e5b21e..29cca3e 100644 --- a/place-value-manipulative.scad +++ b/place-value-manipulative.scad @@ -4,7 +4,23 @@ please do not remove this notice. */ -ones_place(); +/*****************************************************/ +/* binary */ +//ones_place(); +//twos_place(); +//fours_place(); +//eights_place(); + +/*****************************************************/ +/* trinary */ +//ones_place(); +//threes_place(); +//nines_place(); +twenty_sevens_place(); + +/*****************************************************/ +/* decimal */ +//ones_place(); //tens_place(); //hundreds_place(); //thousands_place(); @@ -64,6 +80,8 @@ module ones_place() { side_length - 2 * fudge]) { connector_tab(connector_thickness - 2 * fudge); } } +/*****************************************************/ +/* decimal */ module tens_place() { for(ones_index = [0 : (10 - 1)]) { translate([ones_index * side_length, 0, 0]) { @@ -79,4 +97,39 @@ module thousands_place() { translate([0, 0, hundreds_index * side_length]) { hundreds_place(); } } } + +/*****************************************************/ +/* binary */ +module twos_place() { + for(ones_index = [0 : (2 - 1)]) { + translate([ones_index * side_length, 0, 0]) { + ones_place(); } } } + +module fours_place() { + for(twos_index = [0 : (2 - 1)]) { + translate([0, twos_index * side_length, 0]) { + twos_place(); } } } + +module eights_place() { + for(fours_index = [0 : (2 - 1)]) { + translate([0, 0, fours_index * side_length]) { + fours_place(); } } } + +/*****************************************************/ +/* trinary */ +module threes_place() { + for(ones_index = [0 : (3 - 1)]) { + translate([ones_index * side_length, 0, 0]) { + ones_place(); } } } + +module nines_place() { + for(threes_index = [0 : (3 - 1)]) { + translate([0, threes_index * side_length, 0]) { + threes_place(); } } } + +module twenty_sevens_place() { + for(nines_index = [0 : (3 - 1)]) { + translate([0, 0, nines_index * side_length]) { + nines_place(); } } } + //connector_tab(connector_thickness); -- 2.30.2