1
0
mirror of https://github.com/nophead/NopSCADlib.git synced 2025-01-16 13:08:15 +01:00

extrusion_corner_bracket_assembly() and extrusion_inner_corner_bracket() can now be passed the extrusion type.

E2020t and E4040t thinner extrusions added to work with the brackets.
Extrusions can now have recessed channels, round or square centre sections and holes.
Fixed the shape of extrusion centre section spars.
T-nuts now have 45 degree chamfers instead of a fixed 1mm minimum thickness.
This commit is contained in:
Chris Palmer 2021-09-05 10:24:42 +01:00
parent 511729008d
commit 2166a9be6a
15 changed files with 177 additions and 132 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 929 KiB

After

Width:  |  Height:  |  Size: 931 KiB

View File

@ -977,31 +977,31 @@ Brackets for joining extrusions at a corner.
| Module | Description |
|:--- |:--- |
| `extrusion_corner_bracket(type)` | Corner bracket for extrusion |
| `extrusion_corner_bracket_assembly(type, part_thickness = undef, screw_type = undef, nut_type = undef, max_screw_depth = undef)` | Assembly with fasteners in place |
| `extrusion_corner_bracket_assembly(type, part_thickness = undef, screw_type = undef, nut_type = undef, max_screw_depth = undef, extrusion = undef)` | Assembly with fasteners in place |
| `extrusion_corner_bracket_hole_positions(type)` | Place children at hole positions |
| `extrusion_inner_corner_bracket(type, grub_screws = true, backwards = false)` | Inner corner bracket for extrusion |
| `extrusion_inner_corner_bracket(type, grub_screws = true, backwards = false, extrusion = undef)` | Inner corner bracket for extrusion |
![extrusion_brackets](tests/png/extrusion_brackets.png)
### Vitamins
| Qty | Module call | BOM entry |
| ---:|:--- |:---|
| 2 | `extrusion(E2020, 20.3)` | Extrusion E2020 x 20.3mm |
| 1 | `extrusion(E2020, 28)` | Extrusion E2020 x 28mm |
| 2 | `extrusion(E2020, 39.3)` | Extrusion E2020 x 39.3mm |
| 1 | `extrusion(E2020, 48)` | Extrusion E2020 x 48mm |
| 1 | `extrusion(E4040, 25.9)` | Extrusion E4040 x 25.9mm |
| 1 | `extrusion(E4040, 40)` | Extrusion E4040 x 40mm |
| 1 | `extrusion(E4040, 58.9)` | Extrusion E4040 x 58.9mm |
| 1 | `extrusion(E4040, 80)` | Extrusion E4040 x 80mm |
| 2 | `extrusion_corner_bracket(E20_corner_bracket)` | Extrusion corner bracket 20mm for E2020 |
| 2 | `extrusion_corner_bracket(E40_corner_bracket)` | Extrusion corner bracket 35mm for E4040 |
| 4 | `extrusion_inner_corner_bracket(E20_inner_corner_bracket)` | Extrusion inner corner bracket for E2020 |
| 2 | `extrusion_inner_corner_bracket(E40_inner_corner_bracket)` | Extrusion inner corner bracket for E4040 |
| 2 | `extrusion(E2020t, 20.5)` | Extrusion E2020t x 20.5mm |
| 1 | `extrusion(E2020t, 28)` | Extrusion E2020t x 28mm |
| 2 | `extrusion(E2020t, 39.5)` | Extrusion E2020t x 39.5mm |
| 1 | `extrusion(E2020t, 48)` | Extrusion E2020t x 48mm |
| 1 | `extrusion(E4040t, 27.4, cornerHole = true)` | Extrusion E4040t x 27.4mm |
| 1 | `extrusion(E4040t, 40, cornerHole = true)` | Extrusion E4040t x 40mm |
| 1 | `extrusion(E4040t, 60.4, cornerHole = true)` | Extrusion E4040t x 60.4mm |
| 1 | `extrusion(E4040t, 80, cornerHole = true)` | Extrusion E4040t x 80mm |
| 2 | `extrusion_corner_bracket(E20_corner_bracket)` | Extrusion corner bracket 20mm for E2020t |
| 2 | `extrusion_corner_bracket(E40_corner_bracket)` | Extrusion corner bracket 35mm for E4040t |
| 4 | `extrusion_inner_corner_bracket(E20_inner_corner_bracket)` | Extrusion inner corner bracket for E2020t |
| 2 | `extrusion_inner_corner_bracket(E40_inner_corner_bracket)` | Extrusion inner corner bracket for E4040t |
| 4 | `sliding_t_nut(M4_sliding_t_nut)` | Nut M4 sliding T |
| 4 | `sliding_t_nut(M8_sliding_ball_t_nut)` | Nut M8 sliding T with spring loaded ball |
| 4 | `screw(M4_cap_screw, 8)` | Screw M4 cap x 8mm |
| 4 | `screw(M8_cap_screw, 16)` | Screw M8 cap x 16mm |
| 4 | `screw(M8_cap_screw, 12)` | Screw M8 cap x 12mm |
| 4 | `washer(M4_washer)` | Washer M4 x 9mm x 0.8mm |
| 4 | `washer(M8_washer)` | Washer M8 x 17mm x 1.6mm |
@ -1022,17 +1022,25 @@ Aluminium extrusion.
### Properties
| Function | Description |
|:--- |:--- |
| `extrusion_center_hole(type)` | Diameter of center hole |
| `extrusion_center_square(type)` | Size of center square |
| `extrusion_center_hole_wd(type)` | Diameter of center hole if -ve or square side if +ve |
| `extrusion_center_square_wd(type)` | Size of center square if +ve or tube diameter if -ve |
| `extrusion_channel_recess(type)` | Channel recess width and depth or false in none |
| `extrusion_channel_width(type)` | Channel width |
| `extrusion_channel_width_internal(type)` | Internal channel width |
| `extrusion_corner_hole(type)` | Diameter of corner hole |
| `extrusion_corner_hole_wd(type)` | Diameter of corner hole if -ve or square side if +ve |
| `extrusion_fillet(type)` | Radius of corner fillet |
| `extrusion_height(type)` | Height of extrusion |
| `extrusion_spar_thickness(type)` | Spar thickness |
| `extrusion_tab_thickness(type)` | Tab thickness |
| `extrusion_width(type)` | Width of extrusion |
### Functions
| Function | Description |
|:--- |:--- |
| `extrusion_center_hole(type)` | Diameter of center hole or side if square |
| `extrusion_center_square(type)` | Size of center square or tube |
| `extrusion_corner_hole(type)` | Diameter of corner hole or side if square |
### Modules
| Module | Description |
|:--- |:--- |
@ -1045,12 +1053,14 @@ Aluminium extrusion.
| ---:|:--- |:---|
| 1 | `extrusion(E1515, 80)` | Extrusion E1515 x 80mm |
| 1 | `extrusion(E2020, 80)` | Extrusion E2020 x 80mm |
| 1 | `extrusion(E2020t, 80)` | Extrusion E2020t x 80mm |
| 1 | `extrusion(E2040, 80)` | Extrusion E2040 x 80mm |
| 1 | `extrusion(E2060, 80)` | Extrusion E2060 x 80mm |
| 1 | `extrusion(E2080, 80)` | Extrusion E2080 x 80mm |
| 1 | `extrusion(E3030, 80, cornerHole = true)` | Extrusion E3030 x 80mm |
| 1 | `extrusion(E3060, 80, cornerHole = true)` | Extrusion E3060 x 80mm |
| 1 | `extrusion(E4040, 80, cornerHole = true)` | Extrusion E4040 x 80mm |
| 1 | `extrusion(E4040t, 80, cornerHole = true)` | Extrusion E4040t x 80mm |
| 1 | `extrusion(E4080, 80, cornerHole = true)` | Extrusion E4080 x 80mm |

View File

@ -23,8 +23,9 @@ include <../vitamins/extrusion_brackets.scad>
include <../vitamins/washers.scad>
include <../vitamins/nuts.scad>
module inner_bracket_test(bracket, extrusion, backwards = false)
module inner_bracket_test(bracket, backwards = false)
rotate([90, 0, 180]) {
extrusion = extrusion_inner_corner_bracket_extrusion(bracket);
eWidth = extrusion_width(extrusion);
size = extrusion_inner_corner_bracket_size(bracket);
tnut = extrusion_inner_corner_bracket_tnut(bracket);
@ -34,16 +35,17 @@ module inner_bracket_test(bracket, extrusion, backwards = false)
translate([-eWidth / 2, 0])
rotate([-90, 0, 0])
extrusion(extrusion, size.x - nut_thickness(tnut) - extrusion_tab_thickness(extrusion), false);
extrusion(extrusion, size.x - nut_thickness(tnut) - extrusion_tab_thickness(extrusion), false, cornerHole = eWidth > 20);
translate([-eWidth, -eWidth / 2])
rotate([0, 90, 0])
extrusion(extrusion, eWidth + size.y - nut_thickness(tnut) - extrusion_tab_thickness(extrusion), false);
extrusion(extrusion, eWidth + size.y - nut_thickness(tnut) - extrusion_tab_thickness(extrusion), false, cornerHole = eWidth > 20);
}
module bracket_test(bracket, extrusion)
module bracket_test(bracket)
rotate([90, 0, 180]) {
extrusion = extrusion_corner_bracket_extrusion(bracket);
eWidth = extrusion_width(extrusion);
size = extrusion_corner_bracket_size(bracket);
@ -51,11 +53,11 @@ module bracket_test(bracket, extrusion)
translate([-eWidth / 2, 0])
rotate([-90, 0, 0])
extrusion(extrusion, size.y, false);
extrusion(extrusion, size.y, false, cornerHole = eWidth > 20);
translate([-eWidth, -eWidth / 2])
rotate([0, 90, 0])
extrusion(extrusion, eWidth + size.x, false);
extrusion(extrusion, eWidth + size.x, false, cornerHole = eWidth > 20);
}
@ -76,19 +78,19 @@ module extrusion_brackets(examples = false) {
if(examples) {
translate([20, 50, 10])
inner_bracket_test(E20_inner_corner_bracket, E2020, true);
inner_bracket_test(E20_inner_corner_bracket, true);
translate([20, 80, 10])
inner_bracket_test(E20_inner_corner_bracket, E2020);
inner_bracket_test(E20_inner_corner_bracket);
translate([20, 120, 10])
bracket_test(E20_corner_bracket, E2020);
bracket_test(E20_corner_bracket);
translate([100, 70, 10])
inner_bracket_test(E40_inner_corner_bracket, E4040);
inner_bracket_test(E40_inner_corner_bracket);
translate([100, 130, 10])
bracket_test(E40_corner_bracket, E4040);
bracket_test(E40_corner_bracket);
}
}

View File

@ -21,9 +21,24 @@ use <../utils/layout.scad>
include <../vitamins/extrusions.scad>
gap = 10;
module extrusions()
layout([for(e = extrusions) extrusion_width(e)], 10)
extrusion(extrusions[$i], 80, cornerHole = extrusion_width(extrusions[$i]) > 20);
layout([for(e = extrusions) is_list(e[0]) ? extrusion_width(e[0]) : extrusion_width(e)], gap)
let(e = extrusions[$i])
if(is_list(e[0])) {
list = e;
heights = [for(e = list) extrusion_height(e)];
l = len(heights) - 1;
offset = (heights * [for(i = [0 : l]) 1] + l * gap) / 2;
translate([0, -offset])
rotate(90)
layout(heights, gap)
rotate(-90)
extrusion(list[$i], 80, cornerHole = extrusion_width(list[$i]) > 20);
}
else
extrusion(e, 80, cornerHole = extrusion_width(e) > 20);
if ($preview)
extrusions();

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 KiB

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 47 KiB

View File

@ -21,101 +21,116 @@
//
include <../utils/core/core.scad>
function extrusion_width(type) = type[1]; //! Width of extrusion
function extrusion_height(type) = type[2]; //! Height of extrusion
function extrusion_center_hole(type) = type[3]; //! Diameter of center hole
function extrusion_corner_hole(type) = type[4]; //! Diameter of corner hole
function extrusion_center_square(type) = type[5]; //! Size of center square
function extrusion_channel_width(type) = type[6]; //! Channel width
function extrusion_channel_width_internal(type) = type[7]; //! Internal channel width
function extrusion_tab_thickness(type) = type[8]; //! Tab thickness
function extrusion_spar_thickness(type) = type[9]; //! Spar thickness
function extrusion_fillet(type) = type[10]; //! Radius of corner fillet
function extrusion_width(type) = type[1]; //! Width of extrusion
function extrusion_height(type) = type[2]; //! Height of extrusion
function extrusion_center_hole_wd(type) = type[3]; //! Diameter of center hole if -ve or square side if +ve
function extrusion_corner_hole_wd(type) = type[4]; //! Diameter of corner hole if -ve or square side if +ve
function extrusion_center_square_wd(type) = type[5]; //! Size of center square if +ve or tube diameter if -ve
function extrusion_channel_width(type) = type[6]; //! Channel width
function extrusion_channel_width_internal(type) = type[7]; //! Internal channel width
function extrusion_tab_thickness(type) = type[8]; //! Tab thickness
function extrusion_spar_thickness(type) = type[9]; //! Spar thickness
function extrusion_fillet(type) = type[10]; //! Radius of corner fillet
function extrusion_channel_recess(type) = type[11]; //! Channel recess width and depth or false in none
function extrusion_center_hole(type) = abs(extrusion_center_hole_wd(type)); //! Diameter of center hole or side if square
function extrusion_corner_hole(type) = abs(extrusion_corner_hole_wd(type)); //! Diameter of corner hole or side if square
function extrusion_center_square(type) = abs(extrusion_center_square_wd(type)); //! Size of center square or tube
module extrusion_cross_section(type, cornerHole) {
width = extrusion_width(type);
height = extrusion_height(type);
centerSquare = extrusion_center_square(type);
tabThickness = extrusion_tab_thickness(type);
sparThickness = extrusion_spar_thickness(type);
channelWidth = extrusion_channel_width(type);
recess = extrusion_channel_recess(type);
cornerSquare = (width - extrusion_channel_width_internal(type)) / 2;
module squircle(d) // Draw a square if positive else a circle
if(d > 0)
square([d, d], center = true);
else
if(d < 0)
circle(d = -d);
module extrusion_corner(type, cornerHole) {
width = extrusion_width(type);
tabThickness = extrusion_tab_thickness(type);
sparThickness = extrusion_spar_thickness(type);
centerSquare = extrusion_center_square(type);
channelWidth = extrusion_channel_width(type);
fillet = extrusion_fillet(type);
cornerSize = (width-channelWidth)/2;
cornerSquare = (width-extrusion_channel_width_internal(type))/2;
cornerHoleDiameter = extrusion_corner_hole(type);
cornerSize = (width - channelWidth) / 2;
cornerHoleDiameter = abs(extrusion_corner_hole(type));
translate([-width/2,-width/2]) {
translate([-width / 2, -width / 2]) {
difference() {
union() {
translate([fillet,0])
square([cornerSize-fillet,tabThickness]);
translate([0,fillet])
square([tabThickness,cornerSize-fillet]);
translate([fillet,fillet])
translate([fillet, 0])
square([cornerSize - fillet, tabThickness]);
translate([0, fillet])
square([tabThickness, cornerSize - fillet]);
translate([fillet, fillet])
circle(fillet);
translate([fillet,fillet])
square([cornerSquare-fillet,cornerSquare-fillet]);
translate([fillet, fillet])
square([cornerSquare - fillet, cornerSquare - fillet]);
}
if(cornerHole && cornerHoleDiameter > 0)
translate([cornerSquare/2,cornerSquare/2])
circle(d=cornerHoleDiameter);
}
if(cornerHole)
translate([cornerSquare / 2, cornerSquare / 2])
squircle(extrusion_corner_hole_wd(type));
}
}
rotate(-135) translate([centerSquare/2,-sparThickness/2]) square([sqrt(2)*(width-centerSquare-cornerSquare)/2,sparThickness]);
}
module extrusion_center_section(type) {
width = extrusion_width(type);
tabThickness = extrusion_tab_thickness(type);
sparThickness = extrusion_spar_thickness(type);
centerSquare = extrusion_center_square(type);
channelWidth = extrusion_channel_width(type);
for(side = [-1, 1]) {
translate([side * (width / 2 - tabThickness / 2), 0])
square([tabThickness, width - channelWidth], center = true);
translate([0,width/2])
for(angle=[225,315])
rotate(angle)
translate([centerSquare/2,-sparThickness/2])
square([sqrt(2)*(width-centerSquare)/2,sparThickness]);
translate([0,-width/2])
for(angle=[45,135])
rotate(angle)
translate([centerSquare/2,-sparThickness/2])
square([sqrt(2)*(width-centerSquare)/2,sparThickness]);
centerHeight = width-channelWidth;
translate([-width/2,-centerHeight/2])
square([tabThickness,centerHeight]);
translate([width/2-tabThickness,-centerHeight/2])
square([tabThickness,centerHeight]);
l = cornerSquare + sparThickness * tan(22.5) - sparThickness / sqrt(2);
for(end = [-1, 1])
translate([side * (width / 2 - l / 2), end * (cornerSquare - sparThickness / 2)])
square([l, sparThickness], center = true);
}
}
centerSquare = extrusion_center_square(type);
count = height / width - 1;
width = extrusion_width(type);
height = extrusion_height(type);
count = (height-width)/width;
difference() {
union() {
for(i = [0 : count])
translate([0, i * width + (width - height) / 2]) {
difference() {
union() {
squircle(extrusion_center_square_wd(type));
for(i=[0:count])
translate([0,i*width+(width-height)/2])
difference() {
square([centerSquare,centerSquare],center=true);
if(extrusion_center_hole(type)>0)
circle(d=extrusion_center_hole(type));
}
translate([0,(width-height)/2])
for(angle=[0,90])
rotate(angle)
extrusion_corner(type, cornerHole);
translate([0,-(width-height)/2])
for(angle=[180,270])
rotate(angle)
extrusion_corner(type, cornerHole);
if(count>=1)
for(i=[1:count])
translate([0,i*width-height/2])
extrusion_center_section(type);
for(j = [0 : 3])
rotate(45 + 90 * j)
translate([centerSquare / 2 - sparThickness / 2, -sparThickness / 2])
square([width / sqrt(2) - cornerSquare * sqrt(2) - centerSquare / 2 + sparThickness *(1 + tan(22.5)), sparThickness]);
}
squircle(d = extrusion_center_hole_wd(type));
}
}
for(side = [-1, 1])
translate([0, side * (width - height) / 2])
for(angle = [0, 90])
rotate(angle + (side < 0 ? 180 : 0))
extrusion_corner(type, cornerHole);
if(count >= 1)
for(i = [1 : count])
translate([0, i * width - height / 2])
extrusion_center_section(type);
}
if(recess)
for(i = [0 : count], j = [0 : 3])
translate([0, i * width + (width - height) / 2])
rotate(j * 90)
translate([width / 2, 0])
square([recess.y * 2, recess.x], center = true);
}
}
module extrusion(type, length, center = true, cornerHole = false) { //! Draw the specified extrusion

View File

@ -27,8 +27,8 @@ function extrusion_inner_corner_bracket_tnut(type) = type[2]; //! The
function extrusion_inner_corner_bracket_extrusion(type) = type[3]; //! Default extrusion this bracket is for
function extrusion_inner_corner_bracket_screw_offsets(type) = type[4]; //! Screw offsets from the ends
module extrusion_inner_corner_bracket(type, grub_screws = true, backwards = false) { //! Inner corner bracket for extrusion
extrusion = extrusion_inner_corner_bracket_extrusion(type);
module extrusion_inner_corner_bracket(type, grub_screws = true, backwards = false, extrusion = undef) { //! Inner corner bracket for extrusion
extrusion = is_undef(extrusion) ? extrusion_inner_corner_bracket_extrusion(type) : extrusion;
vitamin(str("extrusion_inner_corner_bracket(", type[0], "): Extrusion inner corner bracket for ", extrusion[0]));
size = extrusion_inner_corner_bracket_size(type);
@ -140,9 +140,9 @@ module extrusion_corner_bracket_hole_positions(type) { //! Place children at hol
children();
}
module extrusion_corner_bracket_assembly(type, part_thickness = undef, screw_type = undef, nut_type = undef, max_screw_depth = undef) { //! Assembly with fasteners in place
module extrusion_corner_bracket_assembly(type, part_thickness = undef, screw_type = undef, nut_type = undef, max_screw_depth = undef, extrusion = undef) { //! Assembly with fasteners in place
extrusion_corner_bracket(type);
extrusion = extrusion_corner_bracket_extrusion(type);
extrusion = is_undef(extrusion) ? extrusion_corner_bracket_extrusion(type) : extrusion;
nut = is_undef(nut_type) ? extrusion_corner_bracket_tnut(type) : nut_type;
screw = is_undef(screw_type) ? find_screw(hs_cap, nut_size(nut)) : screw_type;

View File

@ -20,11 +20,11 @@
// Extrusion brackets
//
E20_inner_corner_bracket = [ "E20_inner_corner_bracket", [26, 25, 4.7], M4_sliding_t_nut, E2020, [7, 6]];
E40_inner_corner_bracket = [ "E40_inner_corner_bracket", [38, 31, 8.5], M6_sliding_t_nut, E4040, [13, 10]];
E20_inner_corner_bracket = [ "E20_inner_corner_bracket", [26, 25, 4.7], M4_sliding_t_nut, E2020t, [7, 6]];
E40_inner_corner_bracket = [ "E40_inner_corner_bracket", [38, 31, 8.5], M6_sliding_t_nut, E4040t, [13, 10]];
E20_corner_bracket = [ "E20_corner_bracket", [28, 28, 20], 2, 3, 19.5, M4_sliding_t_nut, E2020];
E40_corner_bracket = [ "E40_corner_bracket", [40, 40, 35], 2, 3, 19.5, M8_sliding_ball_t_nut, E4040];
E20_corner_bracket = [ "E20_corner_bracket", [28, 28, 20], 2, 3, 19.5, M4_sliding_t_nut, E2020t];
E40_corner_bracket = [ "E40_corner_bracket", [40, 40, 35], 2, 3, 19.5, M8_sliding_ball_t_nut, E4040t];
use <extrusion_bracket.scad>

View File

@ -19,18 +19,19 @@
//
// Extrusion
//
// W H d1 d2 s cw cwi t st f
E1515 = [ "E1515", 15, 15, 2.5, 0,5.7,3.4, 5.7, 1.1,1.1, 0.5 ];
E2020 = [ "E2020", 20, 20, 4.2, 3, 8, 6, 12.0, 2, 2, 1 ];
E2040 = [ "E2040", 20, 40, 4.2, 3, 8, 6, 12.0, 2, 2, 1 ];
E2060 = [ "E2060", 20, 60, 4.2, 3, 8, 6, 12.0, 2, 2, 1 ];
E2080 = [ "E2080", 20, 80, 4.2, 3, 8, 6, 12.0, 2, 2, 1 ];
E3030 = [ "E3030", 30, 30, 6.8, 4.2, 12, 8, 16.5, 2, 2, 1 ];
E3060 = [ "E3060", 30, 60, 6.8, 4.2, 12, 8, 16.5, 2, 2, 1 ];
E4040 = [ "E4040", 40, 40, 10.5, 6.0, 15, 10, 20.0, 5.5, 3, 1 ];
E4080 = [ "E4080", 40, 80, 10.5, 6.0, 15, 10, 20.0, 5.5, 3, 1 ];
// W H d1 d2 sq cw cwi t st f recess
E1515 = [ "E1515", 15, 15, -2.5, 0, 5.7, 3.4, 5.7, 1.1, 1.1, 0.5, false ];
E2020 = [ "E2020", 20, 20, -4.2, -3, 8, 6, 12.0, 2, 2, 1, false ];
E2020t = [ "E2020t",20, 20, -5.0, -3, 7.8, 6.2, 11.0, 1.8, 1.5, 1.5, [7.2, 0.5] ];
E2040 = [ "E2040", 20, 40, -4.2, -3, 8, 6, 12.0, 2, 2, 1, false ];
E2060 = [ "E2060", 20, 60, -4.2, -3, 8, 6, 12.0, 2, 2, 1, false ];
E2080 = [ "E2080", 20, 80, -4.2, -3, 8, 6, 12.0, 2, 2, 1, false ];
E3030 = [ "E3030", 30, 30, -6.8, -4.2, 12, 8, 16.5, 2, 2, 1, false ];
E3060 = [ "E3060", 30, 60, -6.8, -4.2, 12, 8, 16.5, 2, 2, 1, false ];
E4040 = [ "E4040", 40, 40, -10.5, -6.0, 15, 10, 20.0, 5.5, 3, 1, false ];
E4040t = [ "E4040t",40, 40, -10, 6.8, -16, 10, 20.0, 4.0, 2.4, 1.5, [12, 1] ];
E4080 = [ "E4080", 40, 80, -10.5, -6.0, 15, 10, 20.0, 5.5, 3, 1, false ];
extrusions = [E1515,E2020,E2040,E2060,E2080,E3030,E3060,E4040,E4080];
extrusions = [E1515, [E2020t, E2020], E2040, E2060, E2080, E3030, E3060, [E4040t, E4040], E4080];
use <extrusion.scad>

View File

@ -143,11 +143,12 @@ module sliding_ball_t_nut(size, w, h, r) {
rad = 0.5;
stem = size.z - h;
ball_d = 4;
offset = 12;
module shape()
rotate([90, 0, 90])
translate_z(r)
linear_extrude(size.x, center = true) {
translate_z(-offset)
linear_extrude(size.x) {
hull() {
translate([0, h - size.y / 2])
semi_circle(d = size.y);
@ -165,7 +166,7 @@ module sliding_ball_t_nut(size, w, h, r) {
cylinder(r = r, h = 100, center = true);
}
translate([size.x / 2 + r - ball_d, 0, h - 0.5])
translate([-offset + ball_d, 0, h - 0.4])
sphere(d = ball_d);
if(show_threads)
@ -239,13 +240,14 @@ module extrusionSlidingNut(size, tabSizeY1, tabSizeY2, tabSizeZ, holeRadius, hol
}
else {
cubeZ = 1;
dy = (tabSizeY1 - tabSizeY2) / 2;
cubeZ = tabSizeZ - dy;
translate([-size.x / 2, tabSizeY2 / 2])
cube([size.x, (tabSizeY1 - tabSizeY2) / 2, cubeZ]);
translate([0, tabSizeY2 / 2, cubeZ])
rotate([0, -90, 0])
right_triangle(tabSizeZ - cubeZ, (tabSizeY1 - tabSizeY2) / 2, size.x, center = true);
right_triangle(tabSizeZ - cubeZ, dy, size.x, center = true);
}
}

View File

@ -56,7 +56,7 @@ M4_sliding_t_nut = ["M4_sliding_t_nut", 4, 6, 3.7, 4.7, false, 0,
M5_sliding_t_nut = ["M5_sliding_t_nut", 5, 6, 3.7, 4.7, false, 0, 11, 10, 7, false];
M6_sliding_t_nut = ["M6_sliding_t_nut", 6, 8, 6.6, 8.5, false, 0, 16, 18.6,8,2, false];
M8_sliding_ball_t_nut = ["M8_sliding_ball_t_nut",
8, 9.5, 6.5, 7.5, false, 0, 22, 13, 0, false];
8, 8, 6.7, 7.6, false, 0, 22, 13.5, 0, false];
M3_hammer_nut = ["M3_hammer_nut", 3, 6, 2.75,4.0, false, 0, 5.5, 10, 6, true];
M4_hammer_nut = ["M4_hammer_nut", 4, 6, 3.25,4.5, false, 0, 5.5, 10, 6, true];