mirror of
https://github.com/tenderlove/initial-v.git
synced 2025-04-22 04:13:22 +00:00
I think we have a housing!
This commit is contained in:
parent
7a7e2c2241
commit
cde6ca01c6
@ -7,20 +7,29 @@ WALL = 3;
|
||||
JACK_X = 9.5;
|
||||
JACK_Y = 8;
|
||||
JACK_Z = 11;
|
||||
JACK_Z_SHIFT = 8;
|
||||
JACK_FROM_RIGHT = 6;
|
||||
TAB_LENGTH = 16;
|
||||
TAB_Z = 14;
|
||||
|
||||
POST_DIAMETER = 6;
|
||||
POST_OUTER_DIAMETER = 14;
|
||||
POST_OUTER_DIAMETER = 14.5;
|
||||
FRONT_TAB_Y = POST_OUTER_DIAMETER;
|
||||
FRONT_TAB_X = POST_OUTER_DIAMETER + 1;
|
||||
REAR_TAB_X = POST_OUTER_DIAMETER;
|
||||
FRONT_TAB_Z_SHIFT = 63.3;
|
||||
|
||||
REAR_TAB_X = POST_OUTER_DIAMETER;
|
||||
REAR_TAB_Y = 16;
|
||||
REAR_TAB_Z_SHIFT = 65.3;
|
||||
|
||||
REAR_SIDE_TO_SIDE = 79;
|
||||
|
||||
REAR_BOX_Y = TAB_LENGTH - (POST_OUTER_DIAMETER / 2) - WALL;
|
||||
REAR_BOX_X = REAR_SIDE_TO_SIDE - (REAR_TAB_X * 2);
|
||||
echo(REAR_BOX_X);
|
||||
|
||||
REAR_TAB_LOOP_Z = 7;
|
||||
REAR_TAB_LOOP_TOP = 43;
|
||||
|
||||
SUCTION_X = 14;
|
||||
SUCTION_Y = SUCTION_X + 2;
|
||||
@ -37,12 +46,14 @@ module ShifterRing() {
|
||||
import("handle.svg", center=true, dpi=24.6);
|
||||
}
|
||||
|
||||
module RearTab() {
|
||||
rear_tab_z = 6;
|
||||
module RearTabLoop() {
|
||||
rear_tab_z = REAR_TAB_LOOP_Z;
|
||||
rear_tab_y = 19;
|
||||
rear_tab_x = 14;
|
||||
rear_tab_top = 42;
|
||||
translate([(BOX_X / 2) - (rear_tab_x / 2), -rear_tab_y, rear_tab_top - rear_tab_z])
|
||||
rear_tab_top = REAR_TAB_LOOP_TOP;
|
||||
|
||||
x_shift = REAR_TAB_X + (REAR_BOX_X / 2) - (rear_tab_x / 2);
|
||||
translate([x_shift, -rear_tab_y, rear_tab_top - rear_tab_z])
|
||||
cube([rear_tab_x, rear_tab_y, rear_tab_z]);
|
||||
}
|
||||
|
||||
@ -70,11 +81,21 @@ module FrontTopJunk() {
|
||||
|
||||
module PowerJack() {
|
||||
x_shift = BOX_X - JACK_X - JACK_FROM_RIGHT;
|
||||
z_shift = 8;
|
||||
z_shift = JACK_Z_SHIFT;
|
||||
translate([x_shift, BOX_Y - 0.1, z_shift])
|
||||
cube([JACK_X, JACK_Y + 0.1, JACK_Z]);
|
||||
}
|
||||
|
||||
module Buttons() {
|
||||
x = 7.5;
|
||||
y = JACK_Y; // Doesn't matter
|
||||
z = 19;
|
||||
x_shift = BOX_X - x - JACK_FROM_RIGHT - JACK_X - 12.3;
|
||||
z_shift = JACK_Z_SHIFT; // same as jack
|
||||
translate([x_shift, BOX_Y - 0.1, z_shift])
|
||||
cube([x, y + 0.1, z]);
|
||||
}
|
||||
|
||||
module ProgAccess() {
|
||||
x = 11;
|
||||
y = 3;
|
||||
@ -94,21 +115,27 @@ module LeftSideBump() {
|
||||
cube([x, y, z]);
|
||||
}
|
||||
|
||||
// I thought that the tabs were on the edges of the box, but actually the
|
||||
// bottom right junk is wider. The tabs are aligned on the left _side_
|
||||
// of the box, but not the right side. The right side tabs are a fixed
|
||||
// distance from the left.
|
||||
FRONT_TIP_TO_TIP = 107.3;
|
||||
|
||||
module FrontMounts() {
|
||||
x = FRONT_TAB_X;
|
||||
y = FRONT_TAB_Y;
|
||||
z = TAB_Z;
|
||||
z_shift = FRONT_TAB_Z_SHIFT;
|
||||
|
||||
translate([BOX_X / 2, (BOX_Y / 2) - (x / 2), z_shift - z])
|
||||
for (i = [0, 1]) {
|
||||
mirror([i, 0, 0])
|
||||
translate([(y / 2) + (BOX_X / 2), BOX_Y / 2, 0])
|
||||
rotate([0, 0, 90])
|
||||
translate([0, 0, z / 2])
|
||||
// Adding 2 to make rendering work
|
||||
cube([x, y + 2, z], center=true);
|
||||
}
|
||||
x_shift = FRONT_TIP_TO_TIP - (FRONT_TAB_Y * 2);
|
||||
|
||||
jitter = 4;
|
||||
|
||||
translate([-(y + (jitter / 2)), BOX_Y - x, z_shift - z])
|
||||
cube([y + jitter, x, z]);
|
||||
|
||||
translate([x_shift - (jitter / 2), BOX_Y - x, z_shift - z])
|
||||
cube([y + jitter, x, z]);
|
||||
}
|
||||
|
||||
module RearMounts() {
|
||||
@ -116,11 +143,12 @@ module RearMounts() {
|
||||
y = TAB_LENGTH;
|
||||
z = TAB_Z;
|
||||
|
||||
z_shift = 65.3;
|
||||
z_shift = REAR_TAB_Z_SHIFT;
|
||||
x_shift = REAR_SIDE_TO_SIDE - x;
|
||||
|
||||
jitter = 4; // for fixing rendering on x/z plane
|
||||
|
||||
for(i = [0, BOX_X - x]) {
|
||||
for(i = [0, x_shift]) {
|
||||
translate([i, -(y + (jitter / 2)), z_shift - z])
|
||||
cube([x, y + jitter, z]);
|
||||
}
|
||||
@ -129,7 +157,7 @@ module RearMounts() {
|
||||
module Shifter() {
|
||||
MainBox();
|
||||
FrontLeftBump();
|
||||
RearTab();
|
||||
RearTabLoop();
|
||||
FrontTopJunk();
|
||||
PowerJack();
|
||||
LeftSideBump();
|
||||
@ -138,45 +166,48 @@ module Shifter() {
|
||||
ShifterRing();
|
||||
RearBox();
|
||||
ProgAccess();
|
||||
Buttons();
|
||||
}
|
||||
|
||||
module RearBox() {
|
||||
x = BOX_X - (POST_OUTER_DIAMETER * 2);
|
||||
x = REAR_BOX_X;
|
||||
y = REAR_BOX_Y;
|
||||
z = BOX_Z;
|
||||
|
||||
translate([(BOX_X / 2) - (x / 2), -y, 0])
|
||||
cube([x, y + 0.1, z]);
|
||||
translate([REAR_TAB_X, -y, 0])
|
||||
cube([x, y + 0.1, z]);
|
||||
|
||||
// Jitter to connect rear tabs
|
||||
translate([REAR_TAB_X, -y, REAR_TAB_Z_SHIFT - TAB_Z])
|
||||
cube([x + 2, y + 0.1, TAB_Z]);
|
||||
}
|
||||
|
||||
// POSITIVE SPACE
|
||||
|
||||
module FrontPost(height) {
|
||||
module FrontPost(height, positive) {
|
||||
$fn = 80;
|
||||
post_outer_radius = POST_OUTER_DIAMETER / 2;
|
||||
base_difference = (FRONT_TAB_X - POST_OUTER_DIAMETER) / 2;
|
||||
y_offset = FRONT_TAB_Y - POST_OUTER_DIAMETER;
|
||||
|
||||
translate([0, -FRONT_TAB_Y / 2, 0])
|
||||
difference() {
|
||||
linear_extrude(height)
|
||||
union() {
|
||||
if (positive) {
|
||||
linear_extrude(height) {
|
||||
translate([0, y_offset + POST_OUTER_DIAMETER / 2, 0])
|
||||
circle(d = POST_OUTER_DIAMETER);
|
||||
|
||||
translate([-(FRONT_TAB_X / 2), 0, 0])
|
||||
polygon([ [0, 0],
|
||||
[FRONT_TAB_X, 0],
|
||||
[POST_OUTER_DIAMETER + base_difference, post_outer_radius + y_offset],
|
||||
[base_difference, post_outer_radius + y_offset]
|
||||
]);
|
||||
[FRONT_TAB_X, 0],
|
||||
[POST_OUTER_DIAMETER + base_difference, post_outer_radius + y_offset],
|
||||
[base_difference, post_outer_radius + y_offset]
|
||||
]);
|
||||
}
|
||||
|
||||
translate([0, y_offset + (POST_OUTER_DIAMETER / 2), -1])
|
||||
linear_extrude(height + 2)
|
||||
circle(d = POST_DIAMETER);
|
||||
}
|
||||
|
||||
} else {
|
||||
translate([0, y_offset + (POST_OUTER_DIAMETER / 2), -1])
|
||||
linear_extrude(height + 2)
|
||||
circle(d = POST_DIAMETER);
|
||||
}
|
||||
}
|
||||
|
||||
module InnerBox(height) {
|
||||
@ -185,11 +216,11 @@ module InnerBox(height) {
|
||||
}
|
||||
|
||||
module RearBoxContainer(height) {
|
||||
x = BOX_X - (POST_OUTER_DIAMETER * 2);
|
||||
x = REAR_BOX_X;
|
||||
y = REAR_BOX_Y + WALL;
|
||||
z = height;
|
||||
|
||||
translate([(BOX_X / 2) - (x / 2), -y, 0])
|
||||
translate([REAR_TAB_X, -y, 0])
|
||||
cube([x, y + 0.1, z]);
|
||||
}
|
||||
|
||||
@ -198,14 +229,19 @@ module OuterBox(height) {
|
||||
cube([BOX_X + (WALL * 2), BOX_Y + REAR_BOX_Y + (WALL * 2), height]);
|
||||
}
|
||||
|
||||
module FrontPosts(height) {
|
||||
translate([BOX_X / 2, BOX_Y - FRONT_TAB_X, 0])
|
||||
for (i = [0, 1]) {
|
||||
mirror([i, 0, 0])
|
||||
translate([-BOX_X / 2, 0, 0])
|
||||
module FrontPosts(height, positive) {
|
||||
x_shift = FRONT_TIP_TO_TIP - (FRONT_TAB_Y * 2);
|
||||
|
||||
translate([0, BOX_Y - FRONT_TAB_X, 0]) {
|
||||
rotate([0, 0, 90])
|
||||
translate([FRONT_TAB_X / 2, FRONT_TAB_Y / 2, 0])
|
||||
FrontPost(height, positive);
|
||||
|
||||
translate([x_shift, 0, 0])
|
||||
mirror([1, 0, 0])
|
||||
rotate([0, 0, 90])
|
||||
translate([FRONT_TAB_X / 2, FRONT_TAB_Y / 2, 0])
|
||||
FrontPost(height);
|
||||
FrontPost(height, positive);
|
||||
}
|
||||
}
|
||||
|
||||
@ -234,7 +270,7 @@ module RearPost(height) {
|
||||
}
|
||||
|
||||
module RearPosts(height) {
|
||||
for (i = [0, BOX_X - REAR_TAB_X]) {
|
||||
for (i = [0, REAR_BOX_X + REAR_TAB_X]) {
|
||||
translate([(REAR_TAB_X / 2) + i, -REAR_TAB_Y / 2, 0])
|
||||
rotate([0, 0, 180])
|
||||
RearPost(height);
|
||||
@ -244,10 +280,15 @@ module RearPosts(height) {
|
||||
module Container() {
|
||||
height = BOX_Z + TOP_WALL + BOTTOM_WALL;
|
||||
translate([0, 0, -BOTTOM_WALL]) {
|
||||
InnerBox(height);
|
||||
difference() {
|
||||
union() {
|
||||
InnerBox(height);
|
||||
FrontPosts(height, true);
|
||||
}
|
||||
FrontPosts(height, false);
|
||||
}
|
||||
RearPosts(height);
|
||||
RearBoxContainer(height);
|
||||
FrontPosts(height);
|
||||
SuctionMounts();
|
||||
}
|
||||
}
|
||||
@ -323,23 +364,23 @@ module Mask() {
|
||||
cube([mask_x, mask_y, mask_z]);
|
||||
}
|
||||
|
||||
module BottomMask() {
|
||||
mask_z = BOX_Z + TOP_WALL + BOTTOM_WALL;
|
||||
translate([0, 0, FRONT_TAB_Z_SHIFT + BOTTOM_WALL - mask_z])
|
||||
Mask();
|
||||
module TopPartMask() {
|
||||
x = BOX_X + ((WALL + SUCTION_Y) * 2);
|
||||
y = BOX_Y + REAR_BOX_Y + ((WALL + SUCTION_Y) * 2);
|
||||
translate([-SUCTION_Y, -REAR_BOX_Y - SUCTION_Y - WALL, -BOTTOM_WALL - 1])
|
||||
cube([x, y, REAR_TAB_LOOP_TOP + BOTTOM_WALL - REAR_TAB_LOOP_Z + 1]);
|
||||
|
||||
y2 = BOX_Y + (WALL * 2) + SUCTION_Y;
|
||||
translate([-SUCTION_Y, -WALL, -BOTTOM_WALL - 1])
|
||||
cube([x, y2, FRONT_TAB_Z_SHIFT + BOTTOM_WALL + 1]);
|
||||
|
||||
RearPosts(REAR_TAB_Z_SHIFT);
|
||||
}
|
||||
|
||||
module TopPart() {
|
||||
difference() {
|
||||
FullContainer();
|
||||
BottomMask();
|
||||
}
|
||||
}
|
||||
|
||||
module BottomPart() {
|
||||
intersection() {
|
||||
FullContainer();
|
||||
BottomMask();
|
||||
TopPartMask();
|
||||
}
|
||||
}
|
||||
|
||||
@ -350,9 +391,61 @@ module BottomTray() {
|
||||
Mask();
|
||||
}
|
||||
}
|
||||
|
||||
module FrontPartMask() {
|
||||
front_mask_z = FRONT_TAB_Z_SHIFT - JACK_Z_SHIFT - JACK_Z;
|
||||
|
||||
// Mask the front
|
||||
translate([-WALL, BOX_Y - 1, JACK_Z_SHIFT + JACK_Z])
|
||||
cube([BOX_X + (WALL * 2), WALL + 2, front_mask_z]);
|
||||
|
||||
// Mask the posts
|
||||
translate([0, 0, JACK_Z_SHIFT + JACK_Z])
|
||||
FrontPosts(front_mask_z, true);
|
||||
}
|
||||
|
||||
module BottomPartMask() {
|
||||
// Mask the top
|
||||
x = BOX_X + ((WALL + SUCTION_Y) * 2);
|
||||
y = BOX_Y + REAR_BOX_Y + ((WALL + SUCTION_Y) * 2);
|
||||
translate([-SUCTION_Y, -SUCTION_Y, FRONT_TAB_Z_SHIFT])
|
||||
cube([x, y, 50]);
|
||||
|
||||
// Mask the back
|
||||
back_mask_z = REAR_TAB_LOOP_Z + 30;
|
||||
translate([REAR_TAB_X, -REAR_BOX_Y - WALL - 1, REAR_TAB_LOOP_TOP - REAR_TAB_LOOP_Z])
|
||||
cube([REAR_BOX_X, REAR_BOX_Y + WALL + 2, back_mask_z]);
|
||||
|
||||
FrontPartMask();
|
||||
}
|
||||
|
||||
rendering = "full";
|
||||
|
||||
if (rendering == "top") {
|
||||
//rotate([0, 180, 0])
|
||||
TopPart();
|
||||
}
|
||||
|
||||
if (rendering == "bottom") {
|
||||
difference() {
|
||||
FullContainer();
|
||||
BottomPartMask();
|
||||
}
|
||||
}
|
||||
|
||||
if (rendering == "middle") {
|
||||
intersection() {
|
||||
FullContainer();
|
||||
FrontPartMask();
|
||||
}
|
||||
}
|
||||
|
||||
if (rendering == "full") {
|
||||
FullContainer();
|
||||
}
|
||||
//BottomPart();
|
||||
//BottomTray();
|
||||
|
||||
FrontMounts();
|
||||
//FrontMounts();
|
||||
//FullContainer();
|
||||
//BottomTray();
|
||||
|
Loading…
Reference in New Issue
Block a user