You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
////////////////////////////////// variables
string = "BLACK BOXE"; // type a word
PIXEL_SISE = 8; // sise of letter
LETTER_SPACE = 1.1; // space between letters
PIXEL_SPACE = 1; // space between pixels
HEIGHT = 0.3;
////////////////////////////////// 3D text
word();
////////////////////////////////// module word
module word(){
/////// BLACKBOXE TYPO
/////// maurin.box@gmail.com
////////////////////////////////// variables
string = "BLACK BOXE"; // type a word
PIXEL_SISE = 8; // sise of letter
LETTER_SPACE = 1.1; // space between letters
PIXEL_SPACE = 1; // space between pixels
HEIGHT = 0.3;
////////////////////////////////// 3D text
word();
////////////////////////////////// module word
module word(){
for( i = [0:len(string)] ){
translate([0, i* (5*PIXEL_SISE) * LETTER_SPACE, 0])
alphabet(string[i]);
}
}
////////////////////////////////// module prismeDir
module prismeDir(dir, posX, posY){
if(dir == 0){
// color([1,0,0])
// translate([posX, posY, 0])
// prisme(PIXEL_SISE);
}
if(dir == 1){
color([1,0,1])
translate([posX, posY, 0])
mirror([1,0,0]){
prisme(PIXEL_SISE);
}
}
}
////////////////////////////////// Pixel shape
module prisme(size){
polyhedron(
points =
[[-size/2, -size/2, 0],
[-size/2, size/2, 0],
[size/2, size/2, 0],
[size/2, -size/2, 0],
[-size/2, -size/2, size_HEIGHT],
[-size/2, size/2, size_HEIGHT]],
}
////////////////////////////////// letters
module alphabet(char){
if (char == " "){
letter([
[0,0,0,0],
[0,0,0,0],
[0,0,0,0],
[0,0,0,0],
[0,0,0,0]
]);
}
if (char == "A"){
letter([
[0,1,1,0],
[1,0,0,1],
[1,1,1,1],
[1,0,0,1],
[1,0,0,1]
]);
}
else if (char == "B"){
letter([
[1,1,1,0],
[1,0,0,1],
[1,1,1,0],
[1,0,0,1],
[1,1,1,0]
]);
}
if (char == "C"){
letter([
[0,1,1,1],
[1,0,0,0],
[1,0,0,0],
[1,0,0,0],
[0,1,1,1]
]);
}
if (char == "D"){
letter([
[1,1,1,0],
[1,0,0,1],
[1,0,0,1],
[1,0,0,1],
[1,1,1,0]
]);
}
if (char == "E"){
letter([
[1,1,1,1],
[1,0,0,0],
[1,1,1,0],
[1,0,0,0],
[1,1,1,1]
]);
}
if (char == "F"){
letter([
[1,1,1,1],
[1,0,0,0],
[1,1,1,0],
[1,0,0,0],
[1,0,0,0]
]);
}
if (char == "G"){
letter([
[0,1,1,1],
[1,0,0,0],
[1,0,1,1],
[1,0,0,1],
[0,1,1,0]
]);
}
if (char == "H"){
letter([
[1,0,0,1],
[1,0,0,1],
[1,1,1,1],
[1,0,0,1],
[1,0,0,1]
]);
}
if (char == "I"){
letter([
[1,1,1,0],
[0,1,0,0],
[0,1,0,0],
[0,1,0,0],
[1,1,1,0]
]);
}
if (char == "J"){
letter([
[1,1,1,1],
[0,0,1,0],
[0,0,1,0],
[1,0,1,0],
[0,1,0,0]
]);
}
if (char == "K"){
letter([
[1,0,0,1],
[1,0,1,0],
[1,1,0,0],
[1,0,1,0],
[1,0,0,1]
]);
}
if (char == "L"){
letter([
[1,0,0,0],
[1,0,0,0],
[1,0,0,0],
[1,0,0,0],
[1,1,1,1]
]);
}
if (char == "M"){
letter([
[1,0,0,1],
[1,1,1,1],
[1,0,0,1],
[1,0,0,1],
[1,0,0,1]
]);
}
if (char == "N"){
letter([
[1,0,0,1],
[1,1,0,1],
[1,0,1,1],
[1,0,0,1],
[1,0,0,1]
]);
}
if (char == "O"){
letter([
[0,1,1,0],
[1,0,0,1],
[1,0,0,1],
[1,0,0,1],
[0,1,1,0]
]);
}
if (char == "P"){
letter([
[1,1,1,0],
[1,0,0,1],
[1,1,1,0],
[1,0,0,0],
[1,0,0,0]
]);
}
if (char == "Q"){
letter([
[0,1,1,0],
[1,0,0,1],
[1,0,0,1],
[1,0,0,1],
[0,1,1,1]
]);
}
if (char == "R"){
letter([
[1,1,1,0],
[1,0,0,1],
[1,1,1,1],
[1,0,1,0],
[1,0,0,1]
]);
}
if (char == "S"){
letter([
[0,1,1,1],
[1,0,0,0],
[0,1,1,0],
[1,0,0,1],
[1,1,1,0]
]);
}
if (char == "T"){
letter([
[1,1,1,1],
[0,1,0,0],
[0,1,0,0],
[0,1,0,0],
[0,1,0,0]
]);
}
if (char == "U"){
letter([
[1,0,0,1],
[1,0,0,1],
[1,0,0,1],
[1,0,0,1],
[0,1,1,0]
]);
}
if (char == "V"){
letter([
[1,0,0,1],
[1,0,0,1],
[1,0,0,1],
[0,1,0,1],
[0,0,1,0]
]);
}
if (char == "W"){
letter([
[1,0,0,1],
[1,0,0,1],
[1,0,0,1],
[1,1,1,1],
[1,0,0,1]
]);
}
if (char == "X"){
letter([
[1,0,0,1],
[1,0,0,1],
[0,1,1,0],
[1,0,0,1],
[1,0,0,1]
]);
}
if (char == "Y"){
letter([
[1,0,0,1],
[1,0,0,1],
[0,1,1,0],
[0,1,0,0],
[1,0,0,0]
]);
}
if (char == "Z"){
letter([
[1,1,1,1],
[0,0,1,0],
[0,1,0,0],
[1,0,0,0],
[1,1,1,1]
]);
}
}
////////////////////////////////// module letter
module letter(array){
for( i = [0:4] ){ // rows
for(j = [0:3]){ // columns
prismeDir(array[i][j], i_PIXEL_SISE + i_PIXEL_SPACE, j_PIXEL_SISE + j_PIXEL_SPACE);
}
}
}
The text was updated successfully, but these errors were encountered: