-
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
101 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,66 @@ | ||
function calculateThreadlibSpecs() { | ||
# Calculates threadlib specs for PG electrical threads. | ||
|
||
Designator = $1; | ||
TPI = $2; | ||
Pitch = $3; | ||
MinorDiam = $4; | ||
MajorDiam = $5; | ||
PitchDiam = $6; | ||
|
||
Pi = 3.141592; | ||
|
||
P = 25.4 / TPI; | ||
H = 0.595875 * P; | ||
R = 0.107 * P; | ||
|
||
DSupportExt = PitchDiam - H - R/2; | ||
RrotExt = DSupportExt / 2; | ||
drRootExt = -0.0001; | ||
dzRootExt = cos(40*Pi/180) * H*1.1; | ||
drCrestExt = H*.9; | ||
dzCrestExt = cos(40*Pi/180) * H*.1; | ||
|
||
DSupportInt = MinorDiam + H*.9*2 + R/2; | ||
RrotInt = -DSupportInt / 2; | ||
drRootInt = 0; | ||
dzRootInt = cos(40*Pi/180)*H*1.1; | ||
drCrestInt = H*.9; | ||
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 minor_diam major_diam pitch_diam | ||
PG7 20 1.27 11.28 12.5 11.89 | ||
PG9 18 1.411 13.86 15.2 14.53 | ||
PG11 18 1.411 17.26 18.6 17.93 | ||
PG13.5 18 1.411 19.06 20.4 19.73 | ||
PG16 18 1.411 21.16 22.5 21.83 | ||
PG21 16 1.588 26.78 28.3 27.54 | ||
PG29 16 1.588 35.48 37.0 36.24 | ||
PG36 16 1.588 45.48 47.0 46.24 | ||
PG42 16 1.588 52.48 54.0 53.24 | ||
PG48 16 1.588 57.78 59.3 58.54 |
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