Fixed indentation in screws.scad

This commit is contained in:
Revar Desmera 2020-06-11 21:40:52 -07:00
parent 620a536dbc
commit 314c40bd65
2 changed files with 105 additions and 104 deletions

View file

@ -252,7 +252,7 @@ function _screw_info_english(diam, threadcount, head, thread, drive) =
) concat([["head","none"]], drive_dims) :
head=="hex" ? let(
UTS_hex = [
// flat to flat width, height
// flat to flat width, height
["#2", [ 1/8, 1/16]],
["#4", [ 3/16, 1/16]],
["#6", [ 1/4, 3/32]],
@ -550,19 +550,19 @@ function _screw_info_metric(diam, pitch, head, thread, drive) =
metric_setscrew =
[
[1.4, [0.7]],
[1.6, [0.7]],
[1.8, [0.7]],
[2, [0.9]],
[2.5, [1.3]],
[3, [1.5, 6, 0.77]],
[4, [2, 8, 1.05]],
[5, [2.5, 10, 1.24]],
[6, [3, 15, 1.74]],
[8, [4, 25, 2.24]],
[10, [5, 40, 2.97]],
[12, [6, 45, 3.48]],
[16, [8, 55, 5.15]],
[20, [10, undef, undef]],
[1.6, [0.7]],
[1.8, [0.7]],
[2, [0.9]],
[2.5, [1.3]],
[3, [1.5, 6, 0.77]],
[4, [2, 8, 1.05]],
[5, [2.5, 10, 1.24]],
[6, [3, 15, 1.74]],
[8, [4, 25, 2.24]],
[10, [5, 40, 2.97]],
[12, [6, 45, 3.48]],
[16, [8, 55, 5.15]],
[20, [10, undef, undef]],
],
entry = struct_val(metric_setscrew, diam),
drive_dim = drive=="hex" ? [["drive_size", entry[0]], ["drive_depth", diam/2]] :
@ -572,17 +572,17 @@ function _screw_info_metric(diam, pitch, head, thread, drive) =
head=="hex" ? let(
metric_hex = [
// flat to flat width, height
[5, [8, 3.5]],
[6, [10,4]],
[8, [13, 5.3]],
[10, [17, 6.4]],
[12, [19, 7.5]],
[14, [22, 8.8]],
[16, [24, 10]],
[18, [27,11.5]],
[20, [30, 12.5]],
[24, [36, 15]],
[30, [46, 18.7]],
[5, [8, 3.5]],
[6, [10,4]],
[8, [13, 5.3]],
[10, [17, 6.4]],
[12, [19, 7.5]],
[14, [22, 8.8]],
[16, [24, 10]],
[18, [27,11.5]],
[20, [30, 12.5]],
[24, [36, 15]],
[30, [46, 18.7]],
],
entry = struct_val(metric_hex, diam)
)
@ -591,31 +591,31 @@ function _screw_info_metric(diam, pitch, head, thread, drive) =
metric_socket = [ // height = screw diameter
//diam, hex
[1.4, [2.5, 1.3]],
[1.6, [3, 1.5]],
[2, [3.8, 1.5, 6, 0.77]],
[2.5, [4.5, 2, 8, 1.05]],
[2.6, [5, 2, 8, 1.05]],
[3, [5.5, 2.5, 10, 1.24]],
[3.5, [6.2, 2.5]],
[4, [7, 3, 25, 1.76]],
[5, [8.5, 4, 27, 2.24]],
[6, [10, 5, 30, 2.47]],
[7, [12, 6]],
[8, [13, 6, 45, 3.48]],
[10, [16, 8, 50, 3.93]],
[12, [18, 10, 55, 5.15]],
[14, [21, 12]],
[16, [24, 14, 70, 7.39]],
[18, [27, 14]],
[20, [30, 17, 90, 9.67]],
[22, [33, 17]],
[24, [36, 19, 100, 10.79]],
[27, [40, 19]],
[30, [45, 22]],
[33, [50, 24]],
[36, [54, 27]],
[42, [63, 32]],
[48, [72, 36]],
[1.6, [3, 1.5]],
[2, [3.8, 1.5, 6, 0.77]],
[2.5, [4.5, 2, 8, 1.05]],
[2.6, [5, 2, 8, 1.05]],
[3, [5.5, 2.5, 10, 1.24]],
[3.5, [6.2, 2.5]],
[4, [7, 3, 25, 1.76]],
[5, [8.5, 4, 27, 2.24]],
[6, [10, 5, 30, 2.47]],
[7, [12, 6]],
[8, [13, 6, 45, 3.48]],
[10, [16, 8, 50, 3.93]],
[12, [18, 10, 55, 5.15]],
[14, [21, 12]],
[16, [24, 14, 70, 7.39]],
[18, [27, 14]],
[20, [30, 17, 90, 9.67]],
[22, [33, 17]],
[24, [36, 19, 100, 10.79]],
[27, [40, 19]],
[30, [45, 22]],
[33, [50, 24]],
[36, [54, 27]],
[42, [63, 32]],
[48, [72, 36]],
],
entry = struct_val(metric_socket, diam),
drive_size = drive=="hex" ? [["drive_size",entry[1]],["drive_depth",diam/2]] :
@ -626,16 +626,16 @@ function _screw_info_metric(diam, pitch, head, thread, drive) =
starts_with(head,"pan") ? let (
metric_pan = [ // pan head for phillips or slotted
// diam, slotted diam, phillips diam, phillips depth, ph width, slot width,slot depth
[1.6,[3.2, 1 , 1.3, 0, undef,undef,undef, 0.4, 0.35]],
[2, [4, 1.3, 1.6, 1, 1.82, 1.19, 0.48, 0.5, 0.5]],
[2.5,[5, 1.5, 2, 1, 2.68, 1.53, 0.70, 0.6, 0.6]],
[3, [5.6, 1.8, 2.4, 1, 2.90, 1.76, 0.74, 0.8, 0.7]],
[3.5,[7, 2.1, 3.1, 2, 3.92, 1.95, 0.87, 1.0, 0.8]],
[4, [8, 2.4 , 3.1, 2, 4.40, 2.45, 0.93, 1.2, 1.0]],
[5, [9.5, 3, 3.8, 2, 4.90, 2.95, 1.00, 1.2, 1.2]],
[6, [12, 3.6, 4.6, 3, 6.92, 3.81, 1.14, 1.6, 1.4]],
[8, [16, 4.8, 6, 4, 9.02, 4.88, 1.69, 2.0, 1.9]],
[10, [20, 6.0, 7.5, 4, 10.18, 5.09, 1.84,2.5, 2.4]],
[1.6,[3.2, 1 , 1.3, 0, undef,undef,undef, 0.4, 0.35]],
[2, [4, 1.3, 1.6, 1, 1.82, 1.19, 0.48, 0.5, 0.5]],
[2.5,[5, 1.5, 2, 1, 2.68, 1.53, 0.70, 0.6, 0.6]],
[3, [5.6, 1.8, 2.4, 1, 2.90, 1.76, 0.74, 0.8, 0.7]],
[3.5,[7, 2.1, 3.1, 2, 3.92, 1.95, 0.87, 1.0, 0.8]],
[4, [8, 2.4 , 3.1, 2, 4.40, 2.45, 0.93, 1.2, 1.0]],
[5, [9.5, 3, 3.8, 2, 4.90, 2.95, 1.00, 1.2, 1.2]],
[6, [12, 3.6, 4.6, 3, 6.92, 3.81, 1.14, 1.6, 1.4]],
[8, [16, 4.8, 6, 4, 9.02, 4.88, 1.69, 2.0, 1.9]],
[10, [20, 6.0, 7.5, 4, 10.18, 5.09, 1.84,2.5, 2.4]],
],
type = head=="pan" ? (drive=="slot" ? "pan flat" : "pan round") : head,
htind = drive=="slot" ? 1 : 2,
@ -648,34 +648,34 @@ function _screw_info_metric(diam, pitch, head, thread, drive) =
metric_button = [ // button, hex drive
// head diam, height, hex, phillips, hex drive depth
[1.6, [2.9, 0.8, 0.9, undef, 0.55]], // These four cases,
[2, [3.5, 1.3, 1.3, undef, 0.69]], // extrapolated hex depth
[2.2, [3.8, 0.9, 1.3, undef, 0.76]], //
[2.5, [4.6, 1.5, 1.5, undef, 0.87]], //
[3, [5.7, 1.65, 2, undef, 1.04, 8, 0.81]],
[3.5, [5.7, 1.65, 2, undef, 1.21]], // interpolated hex depth
[4, [7.6, 2.2, 2.5, undef, 1.30, 15, 1.3]],
[5, [9.5, 2.75, 3, undef, 1.56, 25, 1.56]],
[6, [10.5,3.3, 4, undef, 2.08, 27, 2.08]],
[8, [14, 4.4, 5, undef, 2.60, 40, 2.3]],
[10, [17.5,5.5, 6, undef, 3.21, 45, 2.69]],
[12, [21, 6.6, 8, undef, 4.16, 55, 4.02]],
[16, [28, 8.8, 10, undef, 5.55]], // interpolated hex depth
[2, [3.5, 1.3, 1.3, undef, 0.69]], // extrapolated hex depth
[2.2, [3.8, 0.9, 1.3, undef, 0.76]], //
[2.5, [4.6, 1.5, 1.5, undef, 0.87]], //
[3, [5.7, 1.65, 2, undef, 1.04, 8, 0.81]],
[3.5, [5.7, 1.65, 2, undef, 1.21]], // interpolated hex depth
[4, [7.6, 2.2, 2.5, undef, 1.30, 15, 1.3]],
[5, [9.5, 2.75, 3, undef, 1.56, 25, 1.56]],
[6, [10.5,3.3, 4, undef, 2.08, 27, 2.08]],
[8, [14, 4.4, 5, undef, 2.60, 40, 2.3]],
[10, [17.5,5.5, 6, undef, 3.21, 45, 2.69]],
[12, [21, 6.6, 8, undef, 4.16, 55, 4.02]],
[16, [28, 8.8, 10, undef, 5.55]], // interpolated hex depth
],
metric_cheese = [ // slotted, phillips ISO 1207, ISO 7048
// head diam, head height, hex drive, phillips drive, slot width, slight depth, ph diam
[1, [2, 0.7, undef, undef]],
[1.2, [2.3,0.8, undef, undef]],
[1.4, [2.6,0.9, undef, undef]],
[1.6, [3, 1, undef, undef, 0.4, 0.45]],
[2, [3.8,1.3, undef, 1 , 0.5, 0.6]],
[2.5, [4.5,1.6, undef, 1 , 0.6, 0.7, 2.7,1.2]],
[3, [5.5,2, undef, 2 , 0.8, 0.85, 3.5,0.86]],
[3.5, [6, 2.4, undef, 2 , 1.0, 1.0, 3.8, 1.15]],
[4, [7, 2.6, undef, 2 , 1.2, 1.1, 4.1, 1.45]],
[5, [8.5,3.3, undef, 2 , 1.2, 1.3, 4.8, 2.14]],
[6, [10, 3.9, undef, 3 , 1.6, 1.6, 6.2, 2.25]],
[8, [13, 5, undef, 3 , 2.0, 2.0, 7.7, 3.73]],
[10, [16, 6, undef, undef, 2.5, 2.4]]
// head diam, head height, hex drive, phillips drive, slot width, slight depth, ph diam
[1, [2, 0.7, undef, undef]],
[1.2, [2.3,0.8, undef, undef]],
[1.4, [2.6,0.9, undef, undef]],
[1.6, [3, 1, undef, undef, 0.4, 0.45]],
[2, [3.8,1.3, undef, 1 , 0.5, 0.6]],
[2.5, [4.5,1.6, undef, 1 , 0.6, 0.7, 2.7,1.2]],
[3, [5.5,2, undef, 2 , 0.8, 0.85, 3.5,0.86]],
[3.5, [6, 2.4, undef, 2 , 1.0, 1.0, 3.8, 1.15]],
[4, [7, 2.6, undef, 2 , 1.2, 1.1, 4.1, 1.45]],
[5, [8.5,3.3, undef, 2 , 1.2, 1.3, 4.8, 2.14]],
[6, [10, 3.9, undef, 3 , 1.6, 1.6, 6.2, 2.25]],
[8, [13, 5, undef, 3 , 2.0, 2.0, 7.7, 3.73]],
[10, [16, 6, undef, undef, 2.5, 2.4]]
],
entry = struct_val(head=="button" ? metric_button : metric_cheese, diam),
drive_index = drive=="phillips" ? 3 :
@ -693,28 +693,28 @@ function _screw_info_metric(diam, pitch, head, thread, drive) =
small = head == "flat small" || (head=="flat" && (drive!="hex" && drive!="torx")),
metric_flat_large = [ // for hex drive
[2, [4, 1.3,undef]],
[2.5,[5, 1.5, undef]],
[3, [6, 2 , 1.1, 10, 0.96]],
[4, [8, 2.5, 1.5, 20, 1.34]],
[5, [10, 3 , 1.9, 25, 1.54]],
[6, [12, 4 , 2.2, 30, 1.91]],
[8, [16, 5 , 3.0, 40, 2.3]],
[10, [20, 6 , 3.6, 50, 3.04]],
[12, [24, 8 ,undef]],
[14, [27, 10 ,undef]],
[16, [30, 10 ,undef]],
[18, [33, 12 ,undef]],
[20, [36, 12 ,undef]],
[2.5,[5, 1.5, undef]],
[3, [6, 2 , 1.1, 10, 0.96]],
[4, [8, 2.5, 1.5, 20, 1.34]],
[5, [10, 3 , 1.9, 25, 1.54]],
[6, [12, 4 , 2.2, 30, 1.91]],
[8, [16, 5 , 3.0, 40, 2.3]],
[10, [20, 6 , 3.6, 50, 3.04]],
[12, [24, 8 ,undef]],
[14, [27, 10 ,undef]],
[16, [30, 10 ,undef]],
[18, [33, 12 ,undef]],
[20, [36, 12 ,undef]],
],
metric_flat_small = [ // for phillips, slotted
// Phillips from ASME B18.6.7M (ISO 7046 gives different values),
// Slots from ISO 2009/DIN 963, which gives more values than ASME (and also inconsistent)
// diam, ph size, ph diam, ph depth, ph width, slot width, slot depth
[1.6, [1.9, 0,undef,undef,undef, 0.25, .2]],
[1.6, [2.3, 0,undef,undef,undef, 0.3, 0.25]],
[1.6, [2.6, 0,undef,undef,undef, 0.3, 0.28]],
[1.6, [3, 0,undef,undef,undef, 0.4, 0.32]],
[2, [3.8, 0, 2.14, 1.54, 0.53, 0.5, 0.4]],
[1.6, [1.9, 0,undef,undef,undef, 0.25, .2]],
[1.6, [2.3, 0,undef,undef,undef, 0.3, 0.25]],
[1.6, [2.6, 0,undef,undef,undef, 0.3, 0.28]],
[1.6, [3, 0,undef,undef,undef, 0.4, 0.32]],
[2, [3.8, 0, 2.14, 1.54, 0.53, 0.5, 0.4]],
[2.5, [4.7, 1, 2.80, 1.78, 0.74, 0.6, 0.5]],
[2.6, [4.7, 1, 2.80, 1.78, 0.74, 0.6, 0.5]],
[3, [5.6, 1, 3.10, 2.08, 0.79, 0.8, 0.6]],
@ -1397,3 +1397,4 @@ http://files.engineering.com/getfile.aspx?folder=76fb0d5e-1fff-4c49-87a5-0597947
// Default nut thickness
//
// vim: expandtab tabstop=4 shiftwidth=4 softtabstop=4 nowrap

View file

@ -8,7 +8,7 @@
//////////////////////////////////////////////////////////////////////
BOSL_VERSION = [2,0,333];
BOSL_VERSION = [2,0,334];
// Section: BOSL Library Version Functions