rynn wrote: ↑Tue Nov 10, 2020 7:20 am
I have no access to the norms, but there seems to be different norms for fine and regular threads:
DIN EN ISO 4762: Hexagon socket head cap screws
DIN EN ISO 12474: Hexagon socket head cap screws with metric fine pitch thread
On the other side DIN 912 (predecessor for ISO 4862) covers both coarse and fine threads, so head dimensions are probably identical.
Yes, I found here at work two M3 screws, one with a fine thread. The head size however is the same.
So my PR is right - the ISO difference on only about the thread, not the head dimensions and thus the norms can also be used for the fine profile.
If you put a json file into the approriate dir, with
you can define cut-types for screws with metric fine threads.
Yes, and this is what I did in the PR.
To clarify: I like your feature. It is an improvement to be able to select a norm and get the right values rather than to google around first (or looking into a book). I only want to polish the feature. Since I deal mostly with fine threads, I encountered the issues.
So if you agree with my PR, could you please leave there?
-------------------------
rynn wrote: ↑Tue Nov 10, 2020 12:16 pm
For a predefined cutting (screwtype), I think the user should be:
Code: Select all
| Type | able to change | able to change | able to change |
| | diameter | depth | angle |
|-------------+----------------+----------------+----------------|
| counterbore | not usefull | usefull | does not apply |
|-------------+----------------+----------------+----------------|
| countersink | not usefull | does not apply | not usefull |
|-------------+----------------+----------------+----------------|
I started this thread to discuss this and I thought we agreed to this:
Code: Select all
| Type | able to change | able to change | able to change |
| | diameter | depth | angle |
|-------------+----------------+----------------+----------------|
| counterbore | not useful | useful | does not apply |
|-------------+----------------+----------------+----------------|
| countersink | useful | useful | not useful |
|-------------+----------------+----------------+----------------|
For most of my real-life parts I have to sink a bit deeper, especially for countersinks. Therefore one must be able to increase the diameter a bit to get the screw head below the surrounding surface. Sinking a bit deeper is not violating the norms, since the norms only define the screw head dimensions.
I understood the outcome of the discussion here also so, that despite things are not useful for most cases, they should not be forbidden. For example I learned recently that it can be advantageous to have a strong for for a counterbore and thus mill with a smaller diameter. One uses this trick to ease the assembly in production - the people can put in the screw to the plastic part and because of the strong head fit the screw does not fall out.
-------------------------
nlohmann json is a 3rd-party library¹ I use to read json-files.
It is easly one of the best C++ json libraries:
This information as comment would have helped me. I found it by googling but it saves time when one can just look into the code and understand what it is doing and why.
Just comment some more - everything is obvious for the one who writes the code, but not necessarily for others. (I never had a complaint about too many comments ever
)
I also try to avoid short variable names like "f" and the like. Instead e.g. "DefinitionFile" is not more work but improves the readability. Everybody immediately gets the meaning if the variable. Just "f" becomes problematic to understand, when you don't have a perfect IDE and/or when the variable appears so far below its definition that you have to scroll around to get its meaning.