Improve spacing

Add/remove lots of spacing for consistency. Add/remove a few parenthesis
for arithmetic readability.

Actually undo previous spacing because I disagree with the style guide
referenced previously.
This commit is contained in:
Joel Ebel 2018-05-04 00:01:57 -04:00
parent 3767d5bd27
commit 40e125b833

View File

@ -103,9 +103,9 @@ module RoundBox($a=Length, $b=Width, $c=Height) {// Cube bords arrondis
$fn = Resolution;
translate([0, Filet, Filet]) {
minkowski() {
cube ([$a-(Length/2),$b-(2*Filet),$c-(2*Filet)], center = false);
cube([$a - Length/2, $b - 2*Filet, $c - 2*Filet], center=false);
rotate([0, 90, 0]) {
cylinder(r=Filet,h=Length/2, center = false);
cylinder(r=Filet, h=(Length/2), center=false);
}
}
}
@ -125,15 +125,15 @@ module Coque() {//Coque - Shell
difference() { //Coque
RoundBox();
translate([Thick/2, Thick/2, Thick/2]) {
RoundBox($a=Length-Thick, $b=Width-Thick, $c=Height-Thick);
RoundBox($a=(Length - Thick), $b=(Width - Thick), $c=(Height - Thick));
}
} //Fin diff Coque
difference() { //largeur Rails
translate([Thick + m, Thick/2, Thick/2]) { // Rails
RoundBox($a=Length-((2*Thick)+(2*m)), $b=Width-Thick, $c=Height-(Thick*2));
RoundBox($a=(Length - (2*Thick + 2*m)), $b=(Width - Thick), $c=(Height - Thick*2));
}//fin Rails
translate([((Thick + m/2) * 1.55), Thick/2, Thick/2 + 0.1]) { // +0.1 added to avoid the artefact
RoundBox($a=Length-((Thick*3)+2*m), $b=Width-Thick, $c=Height-Thick);
RoundBox($a=(Length - ((Thick*3) + 2*m)), $b=(Width - Thick), $c=(Height - Thick));
}
} //Fin largeur Rails
} //Fin union
@ -142,7 +142,7 @@ module Coque() {//Coque - Shell
}
} //fin soustraction cube median - End Median cube slicer
translate([-Thick/2, Thick, Thick]) { // Forme de soustraction centrale
RoundBox($a=Length+Thick, $b=Width-Thick*2, $c=Height-Thick);
RoundBox($a=(Length + Thick), $b=(Width - Thick*2), $c=(Height - Thick));
}
}
@ -154,7 +154,7 @@ module Coque() {//Coque - Shell
cylinder(d=16, Thick/2);
}
}
translate([Length-((3*Thick)+5),Thick,Height/2]) {
translate([Length - (3*Thick + 5), Thick, Height/2]) {
rotate([90, 0, 0]) {
$fn = 6;
cylinder(d=16, Thick/2);
@ -202,7 +202,7 @@ module Coque() {//Coque - Shell
cylinder(d=2, 20);
}
}
translate([Length-((3*Thick)+5),20,Height/2+4]) {
translate([Length - (3*Thick + 5), 20, Height/2 + 4]) {
rotate([90, 0, 0]) {
cylinder(d=2, 20);
}
@ -212,7 +212,7 @@ module Coque() {//Coque - Shell
cylinder(d=2, 20);
}
}
translate([Length-((3*Thick)+5),Width+5,Height/2-4]) {
translate([Length - (3*Thick + 5), Width + 5, Height/2 - 4]) {
rotate([90, 0, 0]) {
cylinder(d=2, 20);
}
@ -236,7 +236,7 @@ module foot(FootDia,FootHole,FootHeight) {
difference() {
difference() {
cylinder(d=FootDia+Filet,FootHeight-Thick, $fn=100);
cylinder(d=(FootDia + Filet), FootHeight - Thick, $fn=100);
rotate_extrude($fn = 100) {
translate([(FootDia + Filet*2) / 2, Filet, 0]) {
minkowski() {
@ -252,9 +252,8 @@ module foot(FootDia,FootHole,FootHeight) {
module Feet() {
//////////////////// - PCB only visible in the preview mode - /////////////////////
translate([3*Thick+2,Thick+5,FootHeight+(Thick/2)-0.5]) {
%square ([PCBLength+10,PCBWidth+10]);
translate([(3*Thick + 2), Thick + 5, (FootHeight + Thick/2 - 0.5)]) {
%squar ([PCBLength + 10, PCBWidth + 10]);
translate([PCBLength/2, PCBWidth/2, 0.5]) {
color("Olive")
%text("PCB", halign="center", valign="center", font="Arial black");
@ -266,13 +265,13 @@ module Feet() {
translate([3*Thick + 7, Thick + 10, Thick/2]) {
foot(FootDia, FootHole, FootHeight);
}
translate([(3*Thick)+PCBLength+7,Thick+10,Thick/2]) {
translate([(3*Thick + PCBLength + 7), Thick + 10, Thick/2]) {
foot(FootDia, FootHole, FootHeight);
}
translate([(3*Thick)+PCBLength+7,(Thick)+PCBWidth+10,Thick/2]) {
translate([3*Thick + PCBLength + 7, Thick + PCBWidth + 10, Thick/2]) {
foot(FootDia, FootHole, FootHeight);
}
translate([3*Thick+7,(Thick)+PCBWidth+10,Thick/2]) {
translate([3*Thick + 7, Thick + PCBWidth + 10, Thick/2]) {
foot(FootDia, FootHole, FootHeight);
}