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

adding weld nuts, m4 and m6 for now

This commit is contained in:
alex
2024-08-13 12:13:58 -05:00
committed by texas
parent 90fb9eb01f
commit ba45f85580
2 changed files with 36 additions and 1 deletions

View File

@@ -245,6 +245,39 @@ module sliding_t_nut(type) { //! Draw a sliding T nut, T nut with a spring loade
extrusionSlidingNut(size, tab[0], tab[1], tabSizeZ, holeRadius, 0, hammerNut); extrusionSlidingNut(size, tab[0], tab[1], tabSizeZ, holeRadius, 0, hammerNut);
} }
module weld_nut(type) {
thread_d = nut_size(type);
hole_rad = thread_d / 2;
nut_neck_rad = nut_radius(type);
// top_rad = type[4] / 2;
thickness = nut_thickness(type);
base_rad = type[7]/2;
base_thickness= type[8];
vitamin(str("weld nut(", type[0], "): Weld Nut M", nut_size(type)));
colour = silver;
explode(10) {
color(colour) {
rotate_extrude()
polygon([
[hole_rad, -base_thickness],
[base_rad, -base_thickness],
[base_rad, 0],
[hole_rad, 0],
[nut_neck_rad, 0],
[nut_neck_rad, thickness],
[hole_rad, thickness]
]);
}
if(show_threads)
female_metric_thread(thread_d, metric_coarse_pitch(thread_d), thickness, center = false, colour = colour);
}
}
module extrusionSlidingNut(size, tabSizeY1, tabSizeY2, tabSizeZ, holeRadius, holeOffset = 0, hammerNut = false) { module extrusionSlidingNut(size, tabSizeY1, tabSizeY2, tabSizeZ, holeRadius, holeOffset = 0, hammerNut = false) {
// center section // center section
stem_h = size.z - tabSizeZ; stem_h = size.z - tabSizeZ;

View File

@@ -49,7 +49,9 @@ M6_half_nut = ["M6_half_nut", 6, 11.5, 3, 8, M6_washer, 3,
M8_nut = ["M8_nut", 8, 15, 6.5, 8, M8_washer, M8_nut_depth, 0, [15, 11.35]]; M8_nut = ["M8_nut", 8, 15, 6.5, 8, M8_washer, M8_nut_depth, 0, [15, 11.35]];
toggle_nut = ["toggle_nut", 6.1, 9.2, 1.5, 1.5, M6_washer, 1.5, inch(1/40)]; toggle_nut = ["toggle_nut", 6.1, 9.2, 1.5, 1.5, M6_washer, 1.5, inch(1/40)];
M4_wingnut = ["M4_wingnut", 4, 10, 3.75,8, M4_washer, 0, 22, 10, 6, 3]; M4_wingnut = ["M4_wingnut", 4, 10, 3.75,8, M4_washer, 0, 22, 10, 6, 3];
M4_weld_nut = ["M4_weld_nut", 4, 5.3, 6.3, 8, M4_washer, 0, 18, 0.8, 6, 3];
M6_weld_nut = ["M6_weld_nut", 6, 7.7, 7.9, 8, M6_washer, 0, 19.1, 1.2, 6, 3];
// sx ty1 ty2 hammer // sx ty1 ty2 hammer
M3_sliding_t_nut = ["M3_sliding_t_nut", 3, 6, 3.0, 4.0, false, 0, 10, 10, 6, false]; M3_sliding_t_nut = ["M3_sliding_t_nut", 3, 6, 3.0, 4.0, false, 0, 10, 10, 6, false];
M4_sliding_t_nut = ["M4_sliding_t_nut", 4, 6, 3.7, 4.7, false, 0, 11, 10, 6, false]; M4_sliding_t_nut = ["M4_sliding_t_nut", 4, 6, 3.7, 4.7, false, 0, 11, 10, 6, false];