board_x = 5; board_y = 5; board_z = 0; board_length = 1000; board_width = 1000; board_height = 12; wall_j_width = 6; wall_j_length = 6; wall_j_height = 12; cell_size = board_length/10;// it's equal to car width/length(will be fine if car be quadrat) module board(x, y, z, length, width, height) { translate([x, y, z]) color("orange") cube([length, width, height]); } module set_board_nets(x, y, z, length, width, height) { for(i = [board_x + cell_size : cell_size/2 : (board_length)]) { for(j = [board_y + cell_size : cell_size/2 : board_width]){ translate([i, j, 0]) color("red") cube([length, width, height]); } } } module BoardWithNets() { difference() { board(board_x, board_y, board_z, board_length, board_width, board_height); set_board_nets(board_x, board_y, board_z+2, wall_j_width, wall_j_length, wall_j_height); } } module joint(tx, ty, coefficient1, coefficient2, coefficient3) { translate([tx, ty, 0]) color("black") cube([board_height * coefficient1, board_height * coefficient2, board_height * coefficient3]); } projection(cut = false) { union() { BoardWithNets(); // Loop through regarding wich count joints I want to set side of my board, If I want to 3 joint need to set loop 1/4, 2/4, 3/4. if I want to 5 joint need to set this loop 1/6, 2/6, 3/6, 4/6, 5/6 for (pos = [1/5, 2/5, 3/5, 4/5]) { offset = board_length * pos- board_height * 4; // Bottom & Top sides joint(board_x + offset, board_y - board_height, 8, 1, 1); joint(board_x + offset, board_y + board_width, 8, 1, 1); // Left & Right sides joint(board_x - board_height, board_y + offset, 1, 8, 1); joint(board_x + board_length, board_y + offset, 1, 8, 1); } } }