1
0
mirror of https://github.com/nophead/NopSCADlib.git synced 2025-08-09 08:56:29 +02:00

replaced the nut diameter with the actual nut from the vitamin list

This commit is contained in:
Alex Verschoot
2025-07-19 00:50:43 +02:00
parent 4e443fc742
commit 89c4b96525
3 changed files with 13 additions and 11 deletions

View File

@@ -48,7 +48,7 @@ translate([220,0,0])
corner_connector(with_profiles, corner_3d_connector_4040, E4040);
}
$show_threads=true;
$show_threads=false;
corner_connectors();
translate ([0,100,0])
corner_connectors(true);

View File

@@ -28,8 +28,8 @@
//
include <NopSCADlib/core.scad>
include <NopSCADlib/utils/thread.scad>
include <NopSCADlib/vitamins/screws.scad>
include <../utils/thread.scad>
//include <NopSCADlib/vitamins/screws.scad>
@@ -39,7 +39,7 @@ function corner_3d_connector_outer_height(type) = type[2]; //! The height of the
function corner_3d_connector_inner_side_length(type)= type[3]; //! The length of the dip in the cuboid sides
function corner_3d_connector_inner_height(type) = type[4]; //! The depth offset of the dip in the cuboid
function corner_3d_connector_nut_screw_dia(type) = type[5]; //! The diameter of the screw
function corner_3d_connector_nut_screw(type) = type[5]; //! The screw (most likely Mx_grub_screw from <NopSCADlib/vitamins/screws.scad>)
function corner_3d_connector_nut_dia(type) = type[6]; //! The width of bottom part of the nut
function corner_3d_connector_nut_thickness(type) = type[7]; //! The thickness of the top part of the nut
function corner_3d_connector_nut_nyloc_thickness(type) = type[8]; //! The total thickness of the nut
@@ -58,7 +58,7 @@ function corner_3d_connector_get_x_rot(type) = [0,90,0]; //! helper function to
module corner_3d_connector (type, grub_screws = true) { //! draw the specified corner_3d_connector
nut_screw_dia = corner_3d_connector_nut_screw_dia(type);
nut_screw_dia = screw_radius(corner_3d_connector_nut_screw(type)*2);
nut_dia = corner_3d_connector_nut_dia(type);
nut_thickness = corner_3d_connector_nut_thickness(type);
nut_nyloc_thickness = corner_3d_connector_nut_nyloc_thickness(type);
@@ -81,7 +81,7 @@ module corner_3d_connector (type, grub_screws = true) { //! draw the specified c
[0, -nut_dia/2]
];
grub_screw = nut_screw_dia == 3 ? M3_grub_screw:nut_screw_dia == 4 ? M4_grub_screw:nut_screw_dia == 5 ? M5_grub_screw:M6_grub_screw;
grub_screw = corner_3d_connector_nut_screw(type);
outer_side_length = corner_3d_connector_outer_side_length(type);
outer_height = corner_3d_connector_outer_height(type);
@@ -105,7 +105,7 @@ module corner_3d_connector (type, grub_screws = true) { //! draw the specified c
//offset so everything is centered for easy attachment to extrusion
translate([-outer_side_length/2,-outer_side_length/2, -outer_height]){
color("lightgray")
color("silver")
union() {
//create the base
difference () {

View File

@@ -16,15 +16,17 @@
// You should have received a copy of the GNU General Public License along with NopSCADlib.
// If not, see <https://www.gnu.org/licenses/>.
//
include <../core.scad>
include <screws.scad>
//sh is horizontal positions of the screw holes, expressed in %/100 of the nut arm
//sv is vertical positions of the screw holes, expressed in %/100 of the nut arm
// sdia nd nt nnt nsx nty1 nty2 sh sv
corner_3d_connector_2020 = ["corner_3d_connector_2020", 20, 5, 13, 2.5, 4, 6, 3.5,5, 15.5,10, 6, [0.5], [0.5]];
corner_3d_connector_3030 = ["corner_3d_connector_3030", 29.6,6.2, 22, 2.5, 6, 8, 4.2,6.2,24.9,16, 11, [0.25,0.75], [0.65]];
corner_3d_connector_4040 = ["corner_3d_connector_4040", 40,9.5, 25, 2.5, 6, 8, 5, 9.5,34.0,19.5, 14, [0.25,0.75], [0.65]];
// screw nd nt nnt nsx nty1 nty2 sh sv
corner_3d_connector_2020 = ["corner_3d_connector_2020", 20, 5, 13, 2.5, M4_grub_screw, 6, 3.5,5, 15.5,10, 6, [0.5], [0.5]];
corner_3d_connector_3030 = ["corner_3d_connector_3030", 29.6,6.2, 22, 2.5, M6_grub_screw, 8, 4.2,6.2,24.9,16, 11, [0.25,0.75], [0.65]];
corner_3d_connector_4040 = ["corner_3d_connector_4040", 40,9.5, 25, 2.5, M6_grub_screw, 8, 5, 9.5,34.0,19.5, 14, [0.25,0.75], [0.65]];
corner_3d_connectors = [corner_3d_connector_2020,corner_3d_connector_3030,corner_3d_connector_4040];