Separate decorations into LeftDecorations

Mirror LeftDecorations to get the right decorations.
This commit is contained in:
Joel Ebel 2018-05-18 01:17:04 -04:00
parent 9ddb6d7516
commit 7d85d60ca4

View File

@ -209,7 +209,7 @@ module MainBox() {
}
/* Decoration: a single box decoration
/* decoration: a single box decoration
*/
module decoration() {
translate([-Vent_width/2, -Thick, -Thick]) {
@ -218,27 +218,33 @@ module decoration() {
}
/* LeftDecorations: left decorations module
Produces the decorations/vents for just the left side of the box.
These can be rotated and translated for the right side.
*/
module LeftDecorations() {
for (i=[0 : Dec_Spacing : Length/4]) {
translate([Dec_Offset + i, 0, 0]) {
decoration();
}
translate([Length - Dec_Offset - i, 0, 0]) {
decoration();
}
}
}
/* Decorations: decorations module
This module produces the box vents or decorations.
*/
module Decorations() {
for (i=[0 : Dec_Spacing : Length/4]) {
translate([Dec_Offset + i, 0, 0]) {
decoration();
}
translate([Length - Dec_Offset - i, 0, 0]) {
decoration();
}
translate([Length - Dec_Offset - i, Width, 0]) {
rotate([0, 0, 180]) {
decoration();
}
}
translate([Dec_Offset + i, Width, 0]) {
rotate([0, 0, 180]) {
decoration();
}
LeftDecorations();
// Mirror for the right side decorations
translate([0, Width, 0]) {
mirror([0, 1, 0]) {
LeftDecorations();
}
}
}