Full and short designators

List metric threads not only with their short
designator but also with full designator as
proposed by @uDude.
This commit is contained in:
Adrian Schlatter
2021-10-08 22:51:52 +02:00
parent dfe2266f44
commit 91eb1b0121
3 changed files with 1035 additions and 25 deletions

View File

@@ -194,6 +194,7 @@ for addition to threadlib!
Change Log
===========================
- 0.3.x: List metric threads under short designator and full designator
- 0.3: Unified Inch Screw Threads (UNC, UNF, UNEF, 4-UN, 6-UN, 8-UN, 12-UN,
16-UN, 20-UN, 28-UN, and 32-UN. Fixed problem with PCO-1881-int. Fixed problem
with G-ext threads . New build system.

File diff suppressed because it is too large Load Diff

View File

@@ -9,6 +9,7 @@ function min(x, y) {
function calculateThreadlibSpecs() {
Designator = $3;
DesignatorLong = $2;
P = $4;
H = P / 2 / tan(phi / 2);
DPitchExt = ($8 + $9) / 2;
@@ -30,18 +31,7 @@ function calculateThreadlibSpecs() {
ZCrestInt = (DCrestInt - DPitchInt + H) / 2 * tan(phi / 2);
}
BEGIN {
FS = "\t";
pi = atan2(0, -1);
deg = pi / 180;
phi = 60 * deg;
}
/^[^#]/ {
calculateThreadlibSpecs();
# External thread:
printf Designator "-ext," # designator
function printExternalThreadSpecs() {
printf P "," # pitch
printf "%.4f,", DValleyExt / 2 # Rrot
printf "%.4f,", DSupportExt # Dsupport
@@ -53,9 +43,9 @@ BEGIN {
printf "%.4f,", +ZCrestExt # z2
printf "%.4f,", (DCrestExt - DValleyExt) / 2 # r3
printf "%.4f\n", -ZCrestExt; # z3
}
# Internal thread:
printf Designator "-int," # designator
function printInternalThreadSpecs() {
printf P "," # pitch
printf "%.4f,", -DValleyInt / 2 # Rrot
printf "%.4f,", DSupportInt # Dsupport
@@ -69,3 +59,28 @@ BEGIN {
printf "%.4f\n", +ZCrestInt; # z3
}
BEGIN {
FS = "\t";
pi = atan2(0, -1);
deg = pi / 180;
phi = 60 * deg;
}
/^[^#]/ {
calculateThreadlibSpecs();
# External thread:
printf Designator "-ext," # designator such as "M4-ext"
printExternalThreadSpecs();
printf DesignatorLong "-ext," # designator such as "M4x0.7-ext"
printExternalThreadSpecs();
# Internal thread:
printf Designator "-int," # designator such as "M4-int"
printInternalThreadSpecs();
printf DesignatorLong "-int," # designator such as "M4x0.7-int"
printInternalThreadSpecs();
}