[PD] make threaded holes norm-conform

- the diameters of holes for threaded holes were only norm-conform for metric fine
- add missing UNC/F/EF sizes
- add a clearance diameter
This commit is contained in:
donovaly
2020-11-29 03:40:12 +01:00
committed by wwmayer
parent a8da70e7ff
commit 5637c6a7a5
2 changed files with 154 additions and 102 deletions

View File

@@ -94,46 +94,49 @@ const Hole::ThreadDescription Hole::threadDescription[][171] =
},
/* ISO metric regular */
/* ISO metric threaded core hole diameters according to ISO 2306 */
// {name, thread diameter, thread pitch, cole hole diameter}
{
{ "M1", 1.0, 0.25 },
{ "M1.1", 1.1, 0.25 },
{ "M1.2", 1.2, 0.25 },
{ "M1.4", 1.4, 0.30 },
{ "M1.6", 1.6, 0.35 },
{ "M1.8", 1.8, 0.35 },
{ "M2", 2.0, 0.40 },
{ "M2.2", 2.2, 0.45 },
{ "M2.5", 2.5, 0.45 },
{ "M3", 3.0, 0.50 },
{ "M3.5", 3.5, 0.60 },
{ "M4", 4.0, 0.70 },
{ "M4.5", 4.5, 0.75 },
{ "M5", 5.0, 0.80 },
{ "M6", 6.0, 1.00 },
{ "M7", 7.0, 1.00 },
{ "M8", 8.0, 1.25 },
{ "M9", 9.0, 1.25 },
{ "M10", 10.0, 1.50 },
{ "M11", 11.0, 1.50 },
{ "M12", 12.0, 1.75 },
{ "M14", 14.0, 2.00 },
{ "M16", 16.0, 2.00 },
{ "M18", 18.0, 2.50 },
{ "M20", 20.0, 2.50 },
{ "M22", 22.0, 2.50 },
{ "M24", 24.0, 3.00 },
{ "M27", 27.0, 3.00 },
{ "M30", 30.0, 3.50 },
{ "M36", 36.0, 4.00 },
{ "M39", 39.0, 4.00 },
{ "M42", 42.0, 4.50 },
{ "M45", 45.0, 4.50 },
{ "M48", 48.0, 5.00 },
{ "M52", 52.0, 5.00 },
{ "M56", 56.0, 5.50 },
{ "M60", 60.0, 5.50 },
{ "M64", 64.0, 6.00 },
{ "M68", 68.0, 6.00 },
{ "M1", 1.0, 0.25, 0.75 },
{ "M1.1", 1.1, 0.25, 0.85 },
{ "M1.2", 1.2, 0.25, 0.95 },
{ "M1.4", 1.4, 0.30, 1.10 },
{ "M1.6", 1.6, 0.35, 1.25 },
{ "M1.8", 1.8, 0.35, 1.45 },
{ "M2", 2.0, 0.40, 1.60 },
{ "M2.2", 2.2, 0.45, 1.75 },
{ "M2.5", 2.5, 0.45, 2.05 },
{ "M3", 3.0, 0.50, 2.50 },
{ "M3.5", 3.5, 0.60, 2.90 },
{ "M4", 4.0, 0.70, 3.30 },
{ "M4.5", 4.5, 0.75, 3.70 },
{ "M5", 5.0, 0.80, 4.20 },
{ "M6", 6.0, 1.00, 5.00 },
{ "M7", 7.0, 1.00, 6.00 },
{ "M8", 8.0, 1.25, 6.80 },
{ "M9", 9.0, 1.25, 7.80 },
{ "M10", 10.0, 1.50, 8.50 },
{ "M11", 11.0, 1.50, 9.50 },
{ "M12", 12.0, 1.75, 10.20 },
{ "M14", 14.0, 2.00, 12.00 },
{ "M16", 16.0, 2.00, 14.00 },
{ "M18", 18.0, 2.50, 15.50 },
{ "M20", 20.0, 2.50, 17.50 },
{ "M22", 22.0, 2.50, 19.50 },
{ "M24", 24.0, 3.00, 21.00 },
{ "M27", 27.0, 3.00, 24.00 },
{ "M30", 30.0, 3.50, 26.50 },
{ "M33", 33.0, 3.50, 29.50 },
{ "M36", 36.0, 4.00, 32.00 },
{ "M39", 39.0, 4.00, 35.00 },
{ "M42", 42.0, 4.50, 37.50 },
{ "M45", 45.0, 4.50, 40.50 },
{ "M48", 48.0, 5.00, 43.00 },
{ "M52", 52.0, 5.00, 47.00 },
{ "M56", 56.0, 5.50, 50.50 },
{ "M60", 60.0, 5.50, 54.50 },
{ "M64", 64.0, 6.00, 58.00 },
{ "M68", 68.0, 6.00, 62.00 },
},
/* ISO metric fine */
{
@@ -311,69 +314,100 @@ const Hole::ThreadDescription Hole::threadDescription[][171] =
},
/* UNC */
{
{ "#1", 1.8542, 0.3969 },
{ "#2", 2.1844, 0.4536 },
{ "#3", 2.5146, 0.5292 },
{ "#4", 2.8448, 0.6350 },
{ "#5", 3.1750, 0.6350 },
{ "#6", 3.5052, 0.7938 },
{ "#8", 4.1656, 0.7938 },
{ "#10", 4.8260, 1.0583 },
{ "#12", 5.4864, 1.0583 },
{ "1/4", 6.3500, 1.2700 },
{ "5/16", 7.9375, 1.4111 },
{ "3/8", 9.5250, 1.5875 },
{ "7/16", 11.1125, 1.8143 },
{ "1/2", 12.7000, 1.9538 },
{ "9/16", 14.2875, 2.1167 },
{ "5/8", 15.8750, 2.3091 },
{ "3/4", 19.0500, 2.5400 },
{ "7/8", 22.2250, 2.8222 },
{ "1", 25.4000, 3.1750 },
{ "#1", 1.854, 0.397, 1.50 },
{ "#2", 2.184, 0.454, 1.85 },
{ "#3", 2.515, 0.529, 2.10 },
{ "#4", 2.845, 0.635, 2.35 },
{ "#5", 3.175, 0.635, 2.65 },
{ "#6", 3.505, 0.794, 2.85 },
{ "#8", 4.166, 0.794, 3.50 },
{ "#10", 4.826, 1.058, 3.90 },
{ "#12", 5.486, 1.058, 4.50 },
{ "1/4", 6.350, 1.270, 5.10 },
{ "5/16", 7.938, 1.411, 6.60 },
{ "3/8", 9.525, 1.588, 8.00 },
{ "7/16", 11.113, 1.814, 9.40 },
{ "1/2", 12.700, 1.954, 10.80 },
{ "9/16", 14.288, 2.117, 12.20 },
{ "5/8", 15.875, 2.309, 13.50 },
{ "3/4", 19.050, 2.540, 16.50 },
{ "7/8", 22.225, 2.822, 19.50 },
{ "1", 25.400, 3.175, 22.25 },
{ "1 1/8", 28.575, 3.628, 25.00 },
{ "1 1/4", 31.750, 3.628, 28.00 },
{ "1 3/8", 34.925, 4.233, 30.75 },
{ "1 1/2", 38.100, 4.233, 34.00 },
{ "1 3/4", 44.450, 5.080, 39.50 },
{ "2", 50.800, 5.644, 45.00 },
{ "2 1/4", 57.150, 5.644, 51.50 },
{ "2 1/2", 63.500, 6.350, 57.00 },
{ "2 3/4", 69.850, 6.350, 63.50 },
{ "3", 76.200, 6.350, 70.00 },
{ "3 1/4", 82.550, 6.350, 76.50 },
{ "3 1/2", 88.900, 6.350, 83.00 },
{ "3 3/4", 95.250, 6.350, 89.00 },
{ "4", 101.600, 6.350, 95.50 },
},
/* UNF */
{
{ "#0", 1.5240, 0.3175 },
{ "#1", 1.8542, 0.3528 },
{ "#2", 2.1844, 0.3969 },
{ "#3", 2.5146, 0.4536 },
{ "#4", 2.8448, 0.5292 },
{ "#5", 3.1750, 0.5773 },
{ "#6", 3.5052, 0.6350 },
{ "#8", 4.1656, 0.7056 },
{ "#10", 4.8260, 0.7938 },
{ "#12", 5.4864, 0.9071 },
{ "1/4", 6.3500, 0.9071 },
{ "5/16", 7.9375, 1.0583 },
{ "3/8", 9.5250, 1.0583 },
{ "7/16", 11.1125, 1.2700 },
{ "1/2", 12.7000, 1.2700 },
{ "9/16", 14.2875, 1.4111 },
{ "5/8", 15.8750, 1.4111 },
{ "3/4", 19.0500, 1.5875 },
{ "7/8", 22.2250, 1.8143 },
{ "1", 25.4000, 2.1167 },
{ "#0", 1.524, 0.317, 1.20 },
{ "#1", 1.854, 0.353, 1.55 },
{ "#2", 2.184, 0.397, 1.85 },
{ "#3", 2.515, 0.454, 2.10 },
{ "#4", 2.845, 0.529, 2.40 },
{ "#5", 3.175, 0.577, 2.70 },
{ "#6", 3.505, 0.635, 2.95 },
{ "#8", 4.166, 0.706, 3.50 },
{ "#10", 4.826, 0.794, 4.10 },
{ "#12", 5.486, 0.907, 4.70 },
{ "1/4", 6.350, 0.907, 5.50 },
{ "5/16", 7.938, 1.058, 6.90 },
{ "3/8", 9.525, 1.058, 8.50 },
{ "7/16", 11.113, 1.270, 9.90 },
{ "1/2", 12.700, 1.270, 11.50 },
{ "9/16", 14.288, 1.411, 12.90 },
{ "5/8", 15.875, 1.411, 14.50 },
{ "3/4", 19.050, 1.588, 17.50 },
{ "7/8", 22.225, 1.814, 20.40 },
{ "1", 25.400, 2.117, 23.25 },
{ "1 1/8", 28.575, 2.117, 26.50 },
{ "1 1/4", 31.750, 2.117, 29.50 },
{ "1 3/8", 34.925, 2.117, 32.75 },
{ "1 1/2", 38.100, 2.117, 36.00 },
} ,
/* UNEF */
{
{ "#12", 5.4864, 0.7938 },
{ "1/4", 6.3500, 0.7938 },
{ "5/16", 7.9375, 0.7938 },
{ "3/8", 9.5250, 0.7938 },
{ "7/16", 11.1125, 0.9071 },
{ "1/2", 12.7000, 0.9071 },
{ "9/16", 14.2875, 1.0583 },
{ "5/8", 15.8750, 1.0583 },
{ "3/4", 19.0500, 1.2700 },
{ "7/8", 22.2250, 1.2700 },
{ "1", 25.4000, 1.2700 },
{ "#12", 5.486, 0.794, 4.80 },
{ "1/4", 6.350, 0.794, 5.70 },
{ "5/16", 7.938, 0.794, 7.25 },
{ "3/8", 9.525, 0.794, 8.85 },
{ "7/16", 11.113, 0.907, 10.35 },
{ "1/2", 12.700, 0.907, 11.80 },
{ "9/16", 14.288, 1.058, 13.40 },
{ "5/8", 15.875, 1.058, 15.00 },
{ "11/16", 17.462, 1.058, 16.60 },
{ "3/4", 19.050, 1.270, 18.00 },
{ "13/16", 20.638, 1.270, 19.60 },
{ "7/8", 22.225, 1.270, 21.15 },
{ "15/16", 23.812, 1.270, 22.70 },
{ "1", 25.400, 1.270, 24.30 },
{ "1 1/16", 26.988, 1.411, 25.80 },
{ "1 1/8", 28.575, 1.411, 27.35 },
{ "1 1/4", 31.750, 1.411, 30.55 },
{ "1 5/16", 33.338, 1.411, 32.10 },
{ "1 3/8", 34.925, 1.411, 33.70 },
{ "1 7/16", 36.512, 1.411, 35.30 },
{ "1 1/2", 38.100, 1.411, 36.90 },
{ "1 9/16", 39.688, 1.411, 38.55 },
{ "1 5/8", 41.275, 1.411, 40.10 },
{ "1 11/16", 42.862, 1.411, 41.60 },
}
};
const double Hole::metricHoleDiameters[35][4] =
const double Hole::metricHoleDiameters[36][4] =
{
/* ISO metric according to ISO 273 */
/* ISO metric clearance hole diameters according to ISO 273 */
// {screw diameter, close, standard, coarse}
{ 1.0, 1.1, 1.2, 1.3},
{ 1.2, 1.3, 1.4, 1.5},
@@ -400,6 +434,7 @@ const double Hole::metricHoleDiameters[35][4] =
{ 24.0, 25.0, 26.0, 28.0},
{ 27.0, 28.0, 30.0, 32.0},
{ 30.0, 31.0, 33.0, 35.0},
{ 33.0, 34.0, 36.0, 38.0},
{ 36.0, 37.0, 39.0, 42.0},
{ 39.0, 40.0, 42.0, 45.0},
{ 42.0, 43.0, 45.0, 48.0},
@@ -477,22 +512,29 @@ const char* Hole::ThreadClass_ISOmetricfine_Enums[] = { "4G", "4H", "5G", "5H",
const char* Hole::HoleCutType_UNC_Enums[] = { "None", "Counterbore", "Countersink", NULL};
const char* Hole::ThreadSize_UNC_Enums[] = { "#1", "#2", "#3", "#4", "#5", "#6",
"#8", "#10", "#12",
"1/4", "5/16", "3/8", "7/16", "1/2",
"9/16", "5/8", "3/4", "7/8", "1", NULL };
"1/4", "5/16", "3/8", "7/16", "1/2", "9/16",
"5/8", "3/4", "7/8", "1", "1 1/8", "1 1/4",
"1 3/8", "1 1/2", "1 3/4", "2", "2 1/4",
"2 1/2", "2 3/4", "3", "3 1/4", "3 1/2",
"3 3/4", "4", NULL };
const char* Hole::ThreadClass_UNC_Enums[] = { "1B", "2B", "3B", NULL };
/* UTS fine */
const char* Hole::HoleCutType_UNF_Enums[] = { "None", "Counterbore", "Countersink", NULL};
const char* Hole::ThreadSize_UNF_Enums[] = { "#1", "#2", "#3", "#4", "#5", "#6",
const char* Hole::ThreadSize_UNF_Enums[] = { "#0", "#1", "#2", "#3", "#4", "#5", "#6",
"#8", "#10", "#12",
"1/4", "5/16", "3/8", "7/16", "1/2",
"9/16", "5/8", "3/4", "7/8", "1", NULL };
"1/4", "5/16", "3/8", "7/16", "1/2", "9/16",
"5/8", "3/4", "7/8", "1", "1 1/8", "1 1/4",
"1 3/8", "1 1/2", NULL };
const char* Hole::ThreadClass_UNF_Enums[] = { "1B", "2B", "3B", NULL };
/* UTS extrafine */
const char* Hole::HoleCutType_UNEF_Enums[] = { "None", "Counterbore", "Countersink", NULL};
const char* Hole::ThreadSize_UNEF_Enums[] = { "#12", "1/4", "5/16", "3/8", "7/16", "1/2",
"9/16", "5/8", "3/4", "7/8", "1", NULL };
"9/16", "5/8", "11/16", "3/4", "13/16", "7/8",
"15/16", "1", "1 1/16", "1 1/8", "1 1/4",
"1 5/16", "1 3/8", "1 7/16", "1 1/2", "1 9/16",
"1 5/8", "1 11/16", NULL };
const char* Hole::ThreadClass_UNEF_Enums[] = { "1B", "2B", "3B", NULL };
const char* Hole::ThreadDirectionEnums[] = { "Right", "Left", NULL};
@@ -733,10 +775,19 @@ void Hole::updateDiameterParam()
pitch = ThreadPitch.getValue();
}
/* Use thread tap diameter, normal D - pitch */
diameter = diameter - pitch;
// use normed diameters if possible
std::string threadType = ThreadType.getValueAsString();
if (threadType == "ISOMetricProfile" || threadType == "UNC"
|| threadType == "UNF" || threadType == "UNEF") {
diameter = threadDescription[ThreadType.getValue()][ThreadSize.getValue()].CoreHole;
}
// if nothing available, we must calculate
else {
// this fits exactly the definition for ISO metric fine
diameter = diameter - pitch;
}
}
else {
else { // we have a clearance hole
bool found = false;
int MatrixRowSize = sizeof(metricHoleDiameters) / sizeof(metricHoleDiameters[0]);
switch ( ThreadFit.getValue() ) {
@@ -749,7 +800,7 @@ void Hole::updateDiameterParam()
break;
}
}
// if nothing was found, we must calculate
// if nothing was found (e.g. if not metric), we must calculate
if (!found) {
diameter = (5 * ((int)((diameter * 110) / 5))) / 100.0;
}

View File

@@ -83,10 +83,11 @@ public:
const char * designation;
double diameter;
double pitch;
double CoreHole;
} ThreadDescription;
static const ThreadDescription threadDescription[][171];
static const double metricHoleDiameters[35][4];
static const double metricHoleDiameters[36][4];
virtual void Restore(Base::XMLReader & reader);