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

used the show_threads variable instead of parameter

This commit is contained in:
Alex Verschoot
2025-07-18 21:00:26 +02:00
parent f032bb76db
commit 4e443fc742
2 changed files with 8 additions and 5 deletions

View File

@@ -21,7 +21,7 @@ include <../vitamins/extrusions.scad>
module corner_connector(with_profiles = false, corner_connector_type, extrusion_type) {
extrusion_length = 40;
corner_3d_connector(corner_connector_type);
corner_3d_connector(corner_connector_type, grub_screws=true);
if(with_profiles){
translate([0,0,extrusion_length/2])
extrusion(extrusion_type, extrusion_length);
@@ -48,6 +48,8 @@ translate([220,0,0])
corner_connector(with_profiles, corner_3d_connector_4040, E4040);
}
$show_threads=true;
corner_connectors();
translate ([0,100,0])
corner_connectors(true);
corner_connectors(true);

View File

@@ -56,7 +56,8 @@ function corner_3d_connector_get_x_offset(type) = [corner_3d_connector_outer_sid
function corner_3d_connector_get_x_rot(type) = [0,90,0]; //! helper function to rotate the y beam
module corner_3d_connector (type, thread = false, grub_screws = true) { //! draw the specified corner_3d_connector
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_dia = corner_3d_connector_nut_dia(type);
nut_thickness = corner_3d_connector_nut_thickness(type);
@@ -125,7 +126,7 @@ module corner_3d_connector (type, thread = false, grub_screws = true) { //! draw
rotate([0,90,0])
difference() {
cylinder(h = nut_nyloc_thickness+0.02, d=nut_screw_dia, center = false);
if(thread) {
if(show_threads ) {
female_metric_thread(nut_screw_dia, metric_coarse_pitch(nut_screw_dia), nut_nyloc_thickness, center = false);
}
@@ -149,7 +150,7 @@ module corner_3d_connector (type, thread = false, grub_screws = true) { //! draw
rotate([0,90,0])
difference() {
cylinder(h = nut_nyloc_thickness+0.02, d=nut_screw_dia, center = false);
if(thread) {
if(show_threads ) {
female_metric_thread(nut_screw_dia, metric_coarse_pitch(nut_screw_dia), nut_nyloc_thickness, center = false);
}
}