-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[0.20] PartDesign: Add true threads to the Hole feature #4274
Conversation
18db5cc
to
8c0f640
Compare
We just had the discussion few weeks ago if the hole dialog should have an option to get real threads. It is good to see it just to be done, however, we must be careful:
A bit off-topic: What we need is that TechDraw recognizes threaded holes as such. However, I insist that we should now come to an end with FC 0.19 instead of continuing with new features so I won't work on that in TD for now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some remarks after a first look
A general note: before this PR would committed, the pending PR #4134 should go in as basis for the hole dialog that is further changed by this PR. |
552fec8
to
af1255c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry that I insist on more documenting:
a951393
to
6cb7698
Compare
I added a new feature:
|
I have further remarks:
Except of the last point, this dialog would fix the issues: |
Another issue: what is the additional clearance about (what's the usecase)? I see that you allow negative value but what screw should then fit? So shouldn't it be restricted to positive values? |
I tested the feature and there are some bugs that needs to be fixed: A:
B:
C:
|
The main use case is 3D printing threads. 3D printers are not precise enough to respect the Standard thread class tolerance limits. Therefore additional clearance is needed. It could be restricted to positive values without loosing much, and it would perhaps relieve the user from having to worry about the sign convention used. |
Thanks for the Dialog, I have been working on something similar, with the Thread Model options grouped together. I did not know about the hiding guideline. I think your dialog looks pretty good. Also I will add the thread depth, as I think it is a necessary parameter. My thought was to add it just below the Hole depth, and change the label "Depth" to "Hole depth". Also thanks for the bug reports. Very valuable. Some of them are fixed already in in my offline branch, and some I was unaware of. The performance is certainly an issue. One that I am not certain of how to attack. But I have not looked at how the feature is doing the pattern of the prototype negative hole. I have only added my code to the "prototype hole". I suspect that it is the pattern and the cut that takes time. |
OK, then the value must not be restricted. I have resins leading to smaller holes than designed while other resins lead to wider ones. |
I am known as the (annoying ;-) ) "dialog guy" because I made so many PRs for dialogs. The point is that FC gets a wider audience and things like touch-screen handling but also smaller screens become more popular. I use smaller screens myself and it annoyed me that the dialogs were often not as compact as they can be. Width was for most an issue and when several dialogs are stacked upon each other also height.
Then a groupbox would make sense. A groupbox can be made clickable and this would then made a hole threaded and activate all settings inside the groupbox. So if you like my dialog, take it as basis and put in the thread depth setting. I would then volunteer :-) to make a proposal for a compacts dialog design using groupboxes. |
Having focus on the user experience is not being annoying. I agree fully, and I am well aware that the UX/UI is the weakest part of this PR so far. That is why the linked forum thread is posted in the UX/UI subforum. I will work on incorporating your requests. I do think that the dialog could use a general overhaul. For me the central choice of the dialog should be Threaded hole or Clearance hole. I also think it could be more compact. I would welcome a PR from you on this. |
Please make sure that the use of clearance hole does not violate the engineering fit nomenclature. Clearance hole, implies a hole with a clearance fit. |
Bored hole and tapped hole are well established unofficial jargon |
@vosk, my point is that Threaded = unchecked, does not mean bored hole, with suitable clearance fit to a certain bolt size. But this is what the dialog currently assumes that the user understands. |
I have adapted your dialog. There are 3 issues: Note three issues
For reference this is the dialog in the AppImage, that suffers from the same problems. OS: Ubuntu 20.10 (KDE/plasma) |
6cb7698
to
061be2e
Compare
Thanks.
Yes, this is done by Qt Designer and cannot be avoided. However, the order has no effect so it can be ignored. |
What do you mean with "in the AppImage"? For reference this is how the hole dialog looks in current master: OS: Windows 10 Version 2009 |
- Thread runout according to DIN 76-1 - Through all length updated to be calculated based on bounding box - New properties: ModelThread, ThreadDepthType, ThreadDepth, UseCustomThreadClearance, CustomThreadClearance - Rename Old but unused parameters related to thread modeling. - Functionality exposed in UI
Also: Check the Update View checkbox and disable it, when turning off model thread.
bug 7: the update view checkbox should be enabled/disabled based on Model thread. the checked state should not change bug 8: the Thread depth options should be disabled when Model thread is unchecked. because they don't do anything in the model it is confusing if they are enabled.
c097bad
to
6877f44
Compare
Ok, I have fixed @donovaly bugs 7 and 8. Personally I feel this PR can be merged now. For me everything works ok. The discussion in this PR is too long and is starting to deviate into issues with TechDraw etc Those issues are best fixed in separate PRs. @abdullahtahiriyo what do you think? |
Thank you. I would like to test your latest changes but can first do this the night to Monday. |
Is there a relation between the two property sets (ThreadAngle, ThreadCutOffInner, ThreadCutOffOuter) and (ThreadDepth, CustomThreadClearance)? If yes then it would be good to implement a conversion from the old to the new properties. And it should also handle ModelActualThread -> ModelThread |
@wwmayer , the discussion is very long so I do not expect that you have read all the previous comments. The question about the removed properties was discussed above. This was my rationale for removing them without any conversion: The removed and renamed properties were not used before, they were clearly inteded for the model thread feature, that was not implemented. Therefore no existing model could reasonably rely on them. I have tested opening an older file that contained a hole feature, and FreeCAD happily opens it (ignoring the properties that it does not understand). I therefore concluded that there is no legacy to consider, so I took the opportunity to remove these old properties, as they otherwise will be confusing for the user looking at the properties view. By the way the mentioned properties are not related to the ThreadDepth. But they are related to the thread profile. |
No, I didn't. More than 140 comments is a bit too much to go through :)
OK, this is fine for me.
No, not needed. I will have a look at this PR again later today and if works I will merge it. Hint for the future: if you ever have to support older projects because of changed properties then have a look at the methods:
In the current code base you will find examples how to implement them. |
If we were to document this? Where would we do so? |
I did not check the new changes, but the old code was codewise fine for me. As wmayer will review it, he will let you know if he requires any change. Sorry, it took more time than you expected. |
There are several examples in the codebase where that mechanism is used (it is not something "new"). Sure it could go somewhere in the wiki. Basically it is used when a property gets renamed or the type of a property changes. In those cases, when an older file is read, the old property is read and the data migrated to the new property in those functions. This way, even if the property changed name or type, backwards compatibility is provided for those files. Of course, if afterwards the file is saved, it will be saved with the new property (name and type), so there is no forward compatibility with versions not knowing about the new property. In this case, it is not necessary to do this because those "older" properties were present, but not used at all. There is no expectation from a user of opening an "older" file and getting a specific behaviour. |
What? And I thought that would be a lot of fun. And now I am sad we did not make it to 150 ;-) |
@davidosterberg I created now the Release note for the next version: https://wiki.freecadweb.org/Release_notes_0.20 so that you can add the new thread feature there |
Thanks a lot for implementing this! This is a must have for a CAD program. Please see the pictures... But there is a Bug with Thread depth: Dimension |
@lual better to post in the help forum following the guidelines in the red banner there, and better if you post screenshots of the software in english so it's easier to understand for everyone |
As already written, please report this to the forum. But please post the link to your forum thread here too. I think we can fix the issue quickly. |
thx, here the link to the forum-post |
- actually use specified thread depth, fixes issue reported here: FreeCAD#4274 (comment) - fixes 2 UI enabling issues - the thread depth cannot be longer than the hole depth - the hole cannot be deeper than the through-all depth
- actually use specified thread depth, fixes issue reported here: FreeCAD#4274 (comment) - fixes 2 UI enabling issues - the thread depth cannot be longer than the hole depth - the hole cannot be deeper than the through-all depth
- actually use specified thread depth, fixes issue reported here: FreeCAD#4274 (comment) - fixes 2 UI enabling issues - the thread depth cannot be longer than the hole depth - the hole cannot be deeper than the through-all depth
- actually use specified thread depth, fixes issue reported here: #4274 (comment) - fixes 2 UI enabling issues - the thread depth cannot be longer than the hole depth - the hole cannot be deeper than the through-all depth
I tried the new tool to make threaded holes and it is a great addition! |
Thanks. Can you please open a new issue for this feature request. We will try to implement this for FreeCAD 1.0. |
This PR adds possibility to make true threaded holes with the Hole feature (possible to e.g 3D print).
Forum discussion:
https://forum.freecadweb.org/viewtopic.php?f=34&t=54240
It should work for all supported thread types
Todo