From 58344a5904602bd8b6ae70d5edf01584f72a3547 Mon Sep 17 00:00:00 2001 From: Alfredo Monclus Date: Sat, 14 Dec 2024 09:52:01 -0300 Subject: [PATCH] refactor(PD): rename CoreHole to TapDrill using a drill and cutting tap is not the only method to create a thread, and this sizes should be optional. i would prefer using the minor diameter of threads, leaving full thread depth and let the user adjust according to their needs using the custom clearance --- src/Mod/PartDesign/App/FeatureHole.cpp | 10 +++++----- src/Mod/PartDesign/App/FeatureHole.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Mod/PartDesign/App/FeatureHole.cpp b/src/Mod/PartDesign/App/FeatureHole.cpp index 06770a4baf..d4329b4a31 100644 --- a/src/Mod/PartDesign/App/FeatureHole.cpp +++ b/src/Mod/PartDesign/App/FeatureHole.cpp @@ -92,8 +92,8 @@ const Hole::ThreadDescription Hole::threadDescription[][171] = }, /* ISO metric regular */ - /* ISO metric threaded core hole diameters according to ISO 2306 */ - // {name, thread diameter, thread pitch, core hole diameter} + /* ISO metric threaded Tap-Drill diameters according to ISO 2306 */ + // {name, thread diameter, thread pitch, Tap-Drill diameter} { { "M1", 1.0, 0.25, 0.75 }, { "M1.1", 1.1, 0.25, 0.85 }, @@ -136,7 +136,7 @@ const Hole::ThreadDescription Hole::threadDescription[][171] = { "M64", 64.0, 6.00, 58.00 }, { "M68", 68.0, 6.00, 62.00 }, }, - /* ISO metric fine (core hole entry is calculated exactly by diameter - pitch) */ + /* ISO metric fine (drill = diameter - pitch) */ { { "M1x0.2", 1.0, 0.20, 0.80 }, { "M1.1x0.2", 1.1, 0.20, 0.90 }, @@ -1275,8 +1275,8 @@ std::optional Hole::determineDiameter() const // use normed diameters if possible std::string threadTypeStr = ThreadType.getValueAsString(); - if (threadDescription[threadType][threadSize].CoreHole > 0) { - diameter = threadDescription[threadType][threadSize].CoreHole + clearance; + if (threadDescription[threadType][threadSize].TapDrill > 0) { + diameter = threadDescription[threadType][threadSize].TapDrill + clearance; } // if nothing is available, we must calculate else if ( threadTypeStr == "BSP" diff --git a/src/Mod/PartDesign/App/FeatureHole.h b/src/Mod/PartDesign/App/FeatureHole.h index 8164c9a7dc..b239f44e1b 100644 --- a/src/Mod/PartDesign/App/FeatureHole.h +++ b/src/Mod/PartDesign/App/FeatureHole.h @@ -90,7 +90,7 @@ public: const char * designation; double diameter; double pitch; - double CoreHole; + double TapDrill; }; static const ThreadDescription threadDescription[][171];