1
0
mirror of https://github.com/nophead/NopSCADlib.git synced 2025-08-31 19:13:33 +02:00

Added screw_length() to calculuate screw lengths includin washers, inserts and nuts.

This commit is contained in:
Chris Palmer
2021-01-15 18:12:37 +00:00
parent c33876530e
commit 93b260b7b9
28 changed files with 62 additions and 88 deletions

View File

@@ -65,10 +65,8 @@ function pbox_insert(type) = screw_insert(pbox_screw(type)); //! The insert for
function pbox_washer(type) = screw_washer(pbox_screw(type)); //! The washer for the base screws
function pbox_screw_length(type, panel_thickness = 0) = //! Length of the base screw
let(foot = pbox_foot(type))
screw_shorter_than(pbox_base(type) + washer_thickness(pbox_washer(type))
+ insert_length(pbox_insert(type))
+ (foot ? foot_thickness(foot) : panel_thickness));
let(foot = pbox_foot(type), screw = pbox_screw(type))
screw_length(screw, pbox_base(type) + (foot ? foot_thickness(foot) : panel_thickness), 1, true);
function pbox_mid_offset(type) = pbox_ridges(type).y + pbox_wall(type) / 2; // Offset to wall midpoint