-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add threads for PG electrical thread
- Loading branch information
Showing
5 changed files
with
99 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
function calculateThreadlibSpecs() { | ||
# Calculates threadlib specs for PG electrical threads. | ||
|
||
Designator = $1; | ||
TPI = $2; | ||
Pitch = $3; | ||
InnerDiam = $4; | ||
OuterDiam = $5; | ||
|
||
Pi = 3.141592; | ||
|
||
P = 25.4 / TPI; | ||
H = 0.595875 * P; | ||
|
||
RrotExt = InnerDiam / 2; | ||
DSupportExt = InnerDiam; | ||
drRootExt = 0; | ||
dzRootExt = cos(40*Pi/180)*H; | ||
drCrestExt = H; | ||
dzCrestExt = H*.1; | ||
|
||
RrotInt = -OuterDiam / 2; | ||
DSupportInt = OuterDiam; | ||
drRootInt = 0; | ||
dzRootInt = cos(40*Pi/180)*H; | ||
drCrestInt = H; | ||
dzCrestInt = H*.1; | ||
} | ||
|
||
BEGIN { | ||
FS = "\t"; | ||
} | ||
|
||
/^[^#]/ { | ||
calculateThreadlibSpecs(); | ||
|
||
# External thread: | ||
printf Designator "-ext," # designator | ||
printf Pitch "," # pitch | ||
printf "%f,", RrotExt # Rrot | ||
printf "%f,", DSupportExt # Dsupport | ||
printf drRootExt "," # r0 | ||
printf "%.4f,", -dzRootExt # z0 | ||
printf drRootExt "," # r1 | ||
printf "%.4f,", dzRootExt # z1 | ||
printf "%.4f,", drCrestExt # r2 | ||
printf "%.4f,", dzCrestExt # z2 | ||
printf "%.4f,", drCrestExt # r3 | ||
printf "%.4f\n", -dzCrestExt; # z3 | ||
|
||
# Internal thread: | ||
printf Designator "-int," # designator | ||
printf Pitch "," # pitch | ||
printf "%f,", RrotInt # Rrot | ||
printf "%f,", DSupportInt # Dsupport | ||
printf drRootInt "," # r0 | ||
printf "%.4f,", dzRootInt # z0 | ||
printf drRootInt "," # r1 | ||
printf "%.4f,", -dzRootInt # z1 | ||
printf "%.4f,", drCrestInt # r2 | ||
printf "%.4f,", -dzCrestInt # z2 | ||
printf "%.4f,", drCrestInt # r3 | ||
printf "%.4f\n", dzCrestInt; # z3 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# designator tpi pitch inner_diam major_diam | ||
PG7 20 1.27 11.28 12.5 | ||
PG9 18 1.4112 13.86 15.2 | ||
PG11 18 1.4112 17.26 18.6 | ||
PG13.5 18 1.4112 19.06 20.4 | ||
PG16 18 1.4112 21.16 22.5 | ||
PG21 16 1.5875 26.78 28.3 | ||
PG29 16 1.5875 35.48 37.0 | ||
PG36 16 1.5875 45.48 47.0 | ||
PG42 16 1.5875 52.48 54.0 | ||
PG48 16 1.5875 57.78 59.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters