From 89c4b96525c0bdd1cd73756fd7a12f2c8144a6fd Mon Sep 17 00:00:00 2001 From: Alex Verschoot Date: Sat, 19 Jul 2025 00:50:43 +0200 Subject: [PATCH] replaced the nut diameter with the actual nut from the vitamin list --- tests/corner_3d_connectors.scad | 2 +- vitamins/corner_3d_connector.scad | 12 ++++++------ vitamins/corner_3d_connectors.scad | 10 ++++++---- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/tests/corner_3d_connectors.scad b/tests/corner_3d_connectors.scad index 668ee0d..f9f5dba 100644 --- a/tests/corner_3d_connectors.scad +++ b/tests/corner_3d_connectors.scad @@ -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); diff --git a/vitamins/corner_3d_connector.scad b/vitamins/corner_3d_connector.scad index f320997..b2f423d 100644 --- a/vitamins/corner_3d_connector.scad +++ b/vitamins/corner_3d_connector.scad @@ -28,8 +28,8 @@ // include -include -include +include <../utils/thread.scad> +//include @@ -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 ) 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 () { diff --git a/vitamins/corner_3d_connectors.scad b/vitamins/corner_3d_connectors.scad index e36dafd..80db261 100644 --- a/vitamins/corner_3d_connectors.scad +++ b/vitamins/corner_3d_connectors.scad @@ -16,15 +16,17 @@ // You should have received a copy of the GNU General Public License along with NopSCADlib. // If not, see . // +include <../core.scad> +include //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];