Hole dialog discussion

About the development of the Part Design module/workbench. PLEASE DO NOT POST HELP REQUESTS HERE!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
rynn
Posts: 471
Joined: Tue Jul 31, 2018 7:00 am

Re: Hole dialog discussion

Post by rynn »

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    |
|-------------+----------------+----------------+----------------|
My approch to this was:
If the user selects a cutting-definition, the values are read-only.
If the user then changes to counterbore the values stay unchanged and get read-write.
Last edited by rynn on Tue Nov 10, 2020 12:59 pm, edited 2 times in total.
rynn
Posts: 471
Joined: Tue Jul 31, 2018 7:00 am

Re: Hole dialog discussion

Post by rynn »

JulianStirling wrote: Tue Nov 10, 2020 11:54 am There are CPP changes and I don't have a nice dev environment set up to test this. Once this is merged and ends up in the the freecad-daily PPA, I am happy to go through and add some more JSON definitions.
It is merged and as far as I know it is in the 0.19_pre AppImages https://github.com/FreeCAD/FreeCAD/rele ... g/0.19_pre
JulianStirling
Posts: 61
Joined: Sun May 29, 2016 2:19 pm
Contact:

Re: Hole dialog discussion

Post by JulianStirling »

Great. I will try to find some time this weekend.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: Hole dialog discussion

Post by uwestoehr »

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

Code: Select all

"thread_type": "metricfine",
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 :lol: )

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.
Last edited by uwestoehr on Tue Nov 10, 2020 6:10 pm, edited 2 times in total.
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Hole dialog discussion

Post by GeneFC »

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 am not a coder, but I am a metal worker. Every one of these boxes should be "useful".

Gene
chrisb
Veteran
Posts: 54302
Joined: Tue Mar 17, 2015 9:14 am

Re: Hole dialog discussion

Post by chrisb »

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    |
|-------------+----------------+----------------+----------------|
From a users point of view all of these - except the angle for counterbore which would be a new type - are sensible. But as these aren't changed on a daily basis I think it is fully acceptable if only one possibilty is accepted as member in the json files, for things that can be derived from the others, so for countersink diameter and depth could be given and the angle is derived, or diameter and angle is given and the depth is derived. (I would prefer the latter, because it avoids a discussion what depth is meant).
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: Hole dialog discussion

Post by uwestoehr »

GeneFC wrote: Tue Nov 10, 2020 3:41 pm I am not a coder, but I am a metal worker. Every one of these boxes should be "useful".
As a plastic worker ;) I agree, but as I wrote, "not useful" does not mean "not allowed".
Therefore when my PR is merged, this would be possible.
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Hole dialog discussion

Post by GeneFC »

chrisb wrote: Tue Nov 10, 2020 5:35 pm except the angle for counterbore
Yes, I agree. I was a bit too brief. My reaction was to items like the depth and angle of a countersink. Some countries do not use ISO exclusively. :shock:

Gene
rynn
Posts: 471
Joined: Tue Jul 31, 2018 7:00 am

Re: Hole dialog discussion

Post by rynn »

uwestoehr wrote: Tue Nov 10, 2020 2:54 am I added with the PR 3 files with values for ISO fine type.
That’s not working. You gave the profiles the same name as the coarse versions but the names must be unique.
As far as I can see ISO 7462 has no fine threads that’s ISO 12474.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: Hole dialog discussion

Post by uwestoehr »

rynn wrote: Tue Nov 10, 2020 9:06 pm That’s not working. You gave the profiles the same name as the coarse versions but the names must be unique.
As far as I can see ISO 7462 has no fine threads that’s ISO 12474.
Why must this be unique? As stated, the screw head dimensions are not different, only the thread pitch. When creating a hole cut there is no influence of the thread at all. So I can make a cut for screws defined in ISO 7462 and then use it for a screw with fine thread according to DIN 912. From the UI perspective that works correctly (my PR has been already merged). Here is a screenshot:
FreeCAD_2OZm1VhMZ5.png
FreeCAD_2OZm1VhMZ5.png (21.56 KiB) Viewed 1368 times
Post Reply