Position mounting tabs/holes relative to parameters
Make the tab size relative to the screw hole size. Position the tabs based on Thick, PanelThick, and the tab size. The are now scaled properly as you increase the related parameters.
This commit is contained in:
parent
d9312ae7a8
commit
4855a03729
@ -137,6 +137,8 @@ Length = PCBLength + FrontEdgeMargin + BackEdgeMargin + ((Thick + PanelThick + m
|
|||||||
Width = PCBWidth + LeftEdgeMargin + RightEdgeMargin + Thick*2;
|
Width = PCBWidth + LeftEdgeMargin + RightEdgeMargin + Thick*2;
|
||||||
Height = FootHeight + TopMargin + Thick*2;
|
Height = FootHeight + TopMargin + Thick*2;
|
||||||
echo("Box: ", Length=Length, Width=Width, Height=Height);
|
echo("Box: ", Length=Length, Width=Width, Height=Height);
|
||||||
|
// X position inset of mounting holes and tabs
|
||||||
|
MountInset = Thick*3 + PanelThick + m + ScrewHole*4;
|
||||||
|
|
||||||
// Calculate panel dimensions from box dimensions.
|
// Calculate panel dimensions from box dimensions.
|
||||||
PanelWidth = Width - Thick*2 - m;
|
PanelWidth = Width - Thick*2 - m;
|
||||||
@ -216,14 +218,14 @@ module Coque() { //Coque - Shell
|
|||||||
|
|
||||||
difference() { // wall fixation box legs
|
difference() { // wall fixation box legs
|
||||||
union() {
|
union() {
|
||||||
translate([Thick*5 + PanelThick + 5, Thick*2, Height/2]) {
|
translate([MountInset, Thick, Height/2]) {
|
||||||
rotate([90, 0, 0]) {
|
rotate([270, 0, 0]) {
|
||||||
cylinder(Thick, d=16, $fn=6);
|
cylinder(Thick, r=4*ScrewHole, $fn=6);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
translate([Length - (Thick*5 + PanelThick + 5), Thick*2, Height/2]) {
|
translate([Length - MountInset, Thick, Height/2]) {
|
||||||
rotate([90, 0, 0]) {
|
rotate([270, 0, 0]) {
|
||||||
cylinder(Thick, d=16, $fn=6);
|
cylinder(Thick, r=4*ScrewHole, $fn=6);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -262,22 +264,22 @@ module Coque() { //Coque - Shell
|
|||||||
|
|
||||||
union() { //sides holes
|
union() { //sides holes
|
||||||
$fn = 100;
|
$fn = 100;
|
||||||
translate([Thick*5 + PanelThick + 5, 20, Height/2 + 4]) {
|
translate([MountInset, 20, Height/2 + 2*ScrewHole]) {
|
||||||
rotate([90, 0, 0]) {
|
rotate([90, 0, 0]) {
|
||||||
cylinder(20, d=ScrewHole);
|
cylinder(20, d=ScrewHole);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
translate([Length - (Thick*5 + PanelThick + 5), 20, Height/2 + 4]) {
|
translate([Length - MountInset, 20, Height/2 + 2*ScrewHole]) {
|
||||||
rotate([90, 0, 0]) {
|
rotate([90, 0, 0]) {
|
||||||
cylinder(20, d=ScrewHole);
|
cylinder(20, d=ScrewHole);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
translate([Thick*5 + PanelThick + 5, Width + 5, Height/2 - 4]) {
|
translate([MountInset, Width + 5, Height/2 - 2*ScrewHole]) {
|
||||||
rotate([90, 0, 0]) {
|
rotate([90, 0, 0]) {
|
||||||
cylinder(20, d=ScrewHole);
|
cylinder(20, d=ScrewHole);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
translate([Length - (Thick*5 + PanelThick + 5), Width + 5, Height/2 - 4]) {
|
translate([Length - MountInset, Width + 5, Height/2 - 2*ScrewHole]) {
|
||||||
rotate([90, 0, 0]) {
|
rotate([90, 0, 0]) {
|
||||||
cylinder(20, d=ScrewHole);
|
cylinder(20, d=ScrewHole);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user