Add option for fixed side modules. This simplifies assembly and removes some awkward printing topology

This commit is contained in:
zhao
2024-08-30 14:54:16 -04:00
committed by jazwa
parent cab2d1c6c9
commit 520ee9eadf
36 changed files with 221 additions and 104 deletions

View File

@ -3,18 +3,18 @@ include <../../config/common.scad>
include <../sharedVariables.scad>
include <./sideWallVariables.scad>
hingeModule();
module hingeModule() {
module hingeModule(fixed=false) {
applyHingePole()
applyYBarScrewMount()
applyYBarScrewMount(fixed)
base();
connW = sideWallConnW;
connD = sideWallConnD;
module base() {
connW = sideWallConnW;
connD = sideWallConnD;
intersection() {
union() {
@ -57,10 +57,13 @@ module hingeModule() {
}
module applyYBarScrewMount() {
module applyYBarScrewMount(fixed=false) {
apply_n() {
translate(v = [yBarScrewHoleToOuterYEdge, yBarScrewHoleToFrontXEdge, sideWallConnLugDepression])
counterSunkHead_N(rackFrameScrewType, headExtension = eps, screwExtension = inf10);
if (!fixed) {
translate(v = [yBarScrewHoleToOuterYEdge, yBarScrewHoleToFrontXEdge, sideWallConnLugDepression])
counterSunkHead_N(rackFrameScrewType, headExtension = eps, screwExtension = inf10);
}
children(0);
}

View File

@ -4,20 +4,19 @@ include <../sharedVariables.scad>
include <./sideWallVariables.scad>
magnetModule();
module magnetModule(fixed=false) {
module magnetModule() {
applyYBarScrewMount()
applyYBarScrewMount(fixed)
applyMagnetMount()
base();
connW = sideWallConnW;
connD = sideWallConnD;
module base() {
connW = sideWallConnW;
connD = sideWallConnD;
intersection() {
cube(size = [connW, connD, sideWallConnLugDepression]);
// TODO: pattern for this? beef up mirror4XY?
@ -29,10 +28,14 @@ module magnetModule() {
}
}
module applyYBarScrewMount() {
module applyYBarScrewMount(fixed=false) {
apply_n() {
translate(v = [yBarScrewHoleToOuterYEdge, yBarScrewHoleToFrontXEdge, sideWallConnLugDepression])
counterSunkHead_N(rackFrameScrewType, headExtension = eps, screwExtension = inf10);
if (!fixed) {
translate(v = [yBarScrewHoleToOuterYEdge, yBarScrewHoleToFrontXEdge, sideWallConnLugDepression])
counterSunkHead_N(rackFrameScrewType, headExtension = eps, screwExtension = inf10);
}
children(0);
}