include ; include ; include ; /* The DD play: Vivo XL base piece @author Perrier Stéphanie, Le Coultre Régis, Borgognon Nathalie @date 15 dec. 2015 @licence CC BY-NC-SA 4.0 */ // base and dots faces difference() { block (col=0, row=0, up=0, width=$BASE_DOBLO_DIMENSION, length=$BASE_DOBLO_DIMENSION, height=$BASE_DOBLO_HEIGHT, nibbles_on_off=false, diamonds_on_off=false, scale=LUGO); // 3 dots dice face dotsFactory(topLeftDot=false, topRightDot=true, middleLeftDot=false, middleCenterDot=true, middleRightDot=false, bottomLeftDot=true, bottomRightDot=false); // 6 dots dice face rotate([-90,0,0]) { dotsFactory(topLeftDot=true, topRightDot=true, middleLeftDot=true, middleCenterDot=false, middleRightDot=true, bottomLeftDot=true, bottomRightDot=true); } // 1 dots dice face translate([0, -1 * $BASE_DIMENSION, 0]) { rotate([-90,0,0]) { dotsFactory(topLeftDot=false, topRightDot=false, middleLeftDot=false, middleCenterDot=true, middleRightDot=false, bottomLeftDot=false, bottomRightDot=false); } } // 2 dots dice face rotate([-90,0,-90]) { dotsFactory(topLeftDot=false, topRightDot=true, middleLeftDot=false, middleCenterDot=false, middleRightDot=false, bottomLeftDot=true, bottomRightDot=false); } // 5 dots dice face translate([$BASE_DIMENSION, 0, 0]) { rotate([-90,0,-90]) { dotsFactory(topLeftDot=true, topRightDot=true, middleLeftDot=false, middleCenterDot=true, middleRightDot=false, bottomLeftDot=true, bottomRightDot=true); } } } // nebbles for(i = [0 : 3]) { if (i == 0) { nibbles (col=i, row=0, up=$BASE_DOBLO_HEIGHT, width=1, length=1, scale=LUGO); for(j = [0 : 2]) { nibbles (col=i, row=1, up=$BASE_DOBLO_HEIGHT + j, width=1, length=1, scale=LUGO); } // no nebbles on row=2 nibbles (col=i, row=3, up=$BASE_DOBLO_HEIGHT, width=1, length=1, scale=LUGO); } else if (i == 1) { nibbles (col=i, row=0, up=$BASE_DOBLO_HEIGHT, width=1, length=1, scale=LUGO); // no nebbles on row=1 for(j = [0 : 2]) { nibbles (col=i, row=2, up=$BASE_DOBLO_HEIGHT + j, width=1, length=1, scale=LUGO); } nibbles (col=i, row=3, up=$BASE_DOBLO_HEIGHT, width=1, length=1, scale=LUGO); } else { nibbles (col=i, row=0, up=$BASE_DOBLO_HEIGHT, width=1, length=4, scale=LUGO); } }