mirror of
https://github.com/adrianschlatter/threadlib.git
synced 2025-04-21 05:02:09 +02:00
PCF-33P-1 thread
+++++++++++++++++ Added external PCF-33P-1 thread based on proposal by dholth in #24 but - changed order of points in profile - flipped so that load-side of thread is on top - changed pitch from 6.35 mm to 3.18 mm Added internal PCF-33P-1 thread to sensibly match external thread (spec defines only external thread, not internal thread). Added unit tests checking slopes on load and non-load sides.
This commit is contained in:
parent
7e30d8e824
commit
97a6e11667
1
Makefile
1
Makefile
@ -4,6 +4,7 @@ design: clean
|
||||
cat design/BSPP_thread.csv | awk -f design/BSPP_thread.awk >> design/THREAD_TABLE.csv
|
||||
cat design/metric_thread.csv | awk -f design/metric_thread.awk >> design/THREAD_TABLE.csv
|
||||
cat design/PCO_thread.csv | awk -f design/PCO_thread.awk >> design/THREAD_TABLE.csv
|
||||
cat design/PCF_thread.csv | awk -f design/PCF_thread.awk >> design/THREAD_TABLE.csv
|
||||
cat design/THREAD_TABLE.csv | awk -f design/autogenerate.awk > THREAD_TABLE.scad
|
||||
|
||||
.PHONY: test
|
||||
|
@ -1045,4 +1045,6 @@ THREAD_TABLE = [["G1/16-ext", [0.907, 3.1631, 6.3625, [[0, -0.4252], [0, 0.4252]
|
||||
["M600x6-int", [6, -300.6700, 600.6700, [[0, 2.9434], [0, -2.9434], [3.7150, -0.7985], [3.7150, 0.7985]]]],
|
||||
["PCO-1881-ext", [2.7, 11.52381, 24.2, [[0, -0.987894698], [0, 0.987894698], [2.17619, 0.604173686], [2.17619, -0.195826314]]]],
|
||||
["PCO-1881-int", [2.7, -14.406, 27.66, [[0, 1.212894698], [0, -0.762894698], [1.656, -0.470897218], [1.656, 0.610159990]]]],
|
||||
["PCF-33P-1-ext", [3.18, 14.74, 29.49, [[0, -0.76], [0, 0.76], [1.195, 0.549], [1.195, -0.07]]]],
|
||||
["PCF-33P-1-int", [3.18, -16.2, 32.2, [[0, 0.6], [0, -1.03], [1.3, -0.8], [1.3, -0.15]]]],
|
||||
];
|
||||
|
4
design/PCF_thread.awk
Normal file
4
design/PCF_thread.awk
Normal file
@ -0,0 +1,4 @@
|
||||
/^[^#]/ {
|
||||
print $0;
|
||||
}
|
||||
|
3
design/PCF_thread.csv
Normal file
3
design/PCF_thread.csv
Normal file
@ -0,0 +1,3 @@
|
||||
# Designator,Pitch,Rrot,Dsupport,r0,z0,r1,z1,r2,z2,r3,z3
|
||||
PCF-33P-1-ext,3.18,14.74,29.49,0,-0.76,0,0.76,1.195,0.549,1.195,-0.07
|
||||
PCF-33P-1-int,3.18,-16.2,32.2,0,0.6,0,-1.03,1.3,-0.8,1.3,-0.15
|
|
@ -37,6 +37,7 @@ BEGIN {
|
||||
pi = atan2(0, -1);
|
||||
deg = pi / 180;
|
||||
dphi = 0.1;
|
||||
dx = 0.001;
|
||||
|
||||
PASS = 1;
|
||||
NR_OF_TESTS = 0;
|
||||
@ -60,6 +61,7 @@ BEGIN {
|
||||
PASS = 0;
|
||||
}
|
||||
NR_OF_TESTS += 2;
|
||||
NR_OF_THREADS += 1;
|
||||
}
|
||||
|
||||
/"[^,]+-int/ {
|
||||
@ -75,6 +77,7 @@ BEGIN {
|
||||
PASS = 0;
|
||||
}
|
||||
NR_OF_TESTS += 2;
|
||||
NR_OF_THREADS += 1;
|
||||
}
|
||||
|
||||
/M[0-9.x-]+-ext/ {
|
||||
@ -169,15 +172,36 @@ BEGIN {
|
||||
NR_OF_TESTS += 2;
|
||||
}
|
||||
|
||||
/[^,]+-(int|ext)/ {
|
||||
# final match-all (designators) rule: test wether all lines have been
|
||||
# tested
|
||||
if (tested == 0) {
|
||||
parse();
|
||||
print designator " FAIL: not tested";
|
||||
/PCF.+-ext/ {
|
||||
# PCF-33P-1 threads have slopes of -80 deg (on the load side) and 60 deg
|
||||
# (on the other side) + horizontal crest / valley
|
||||
parse();
|
||||
m1 = slope(v0, v3) / deg;
|
||||
m2 = slope(v2, v1) / deg;
|
||||
if (m1 > 60 + dphi || m1 < 60 - dphi \
|
||||
|| m2 < -80 - dphi || m2 > -80 + dphi) {
|
||||
print designator " FAIL: " m1 ", " m2 " deg";
|
||||
PASS = 0;
|
||||
};
|
||||
NR_OF_THREADS += 1;
|
||||
}
|
||||
test_horizontal();
|
||||
tested = 1;
|
||||
NR_OF_TESTS += 2;
|
||||
}
|
||||
|
||||
/PCF.+-int/ {
|
||||
# PCF-33P-1 threads have slopes of 80 deg (on the load side) and -60 deg
|
||||
# (on the other side) + horizontal crest / valley
|
||||
parse();
|
||||
m1 = slope(v3, v0) / deg;
|
||||
m2 = slope(v1, v2) / deg;
|
||||
if (m1 > -60 + dphi || m1 < -60 - dphi \
|
||||
|| m2 < 80 - dphi || m2 > 80 + dphi) {
|
||||
print designator " FAIL: " m1 ", " m2 " deg";
|
||||
PASS = 0;
|
||||
}
|
||||
test_horizontal();
|
||||
tested = 1;
|
||||
NR_OF_TESTS += 2;
|
||||
}
|
||||
|
||||
END {
|
||||
|
@ -9,7 +9,7 @@ Create threads easily.
|
||||
:License: 3-Clause BSD. See LICENSE.
|
||||
*/
|
||||
|
||||
function __THREADLIB_VERSION() = 0.2;
|
||||
function __THREADLIB_VERSION() = "0.2-inRev";
|
||||
|
||||
use <thread_profile.scad>
|
||||
include <THREAD_TABLE.scad>
|
||||
|
Loading…
x
Reference in New Issue
Block a user