Commit Graph

81 Commits

Author SHA1 Message Date
theo-vt
774ec2cc93 PartDesign: Center holes on sketch points as well as circles and arcs (#20583)
Co-authored-by: Kacper Donat <kadet1090@gmail.com>
2025-04-21 23:30:57 +02:00
Alfredo Monclus
70007a28c1 refactor: add disambiguation to clearance hole names and use names from the standard (#19869)
* PD: refactor: threadFit use standard naming and add disambiguation

* PD: fix: do not use variables for tr
2025-04-21 09:54:23 -05:00
karliss
f0fe00e16a PartDesign: Update counterbore min size in reaction to diameter changes (#20217)
Can't rely purely on `TaskHoleParameters::threadDiameterChanged` to update it since the signal is intentionally blocked while syncing state to GUI.

Closes #19744
2025-03-24 21:18:40 +00:00
Chris Hennes
c962dbbeb6 Merge pull request #19167 from alfrix/hole_new_taskpanel
feat(PD): hole taskpanel: new image based cut panel
2025-02-11 17:22:16 -06:00
Alfredo Monclus
da4f584a50 PD(hole taskpanel): apply review suggestions
* refactor: change to ternary op
* refactor: apply recommendations to widgets
* refactor: use QSignalBlocker
* refactor: address some compiler complaints
* refactor: add namespace Gui to new widgets
2025-02-11 12:23:13 -06:00
Alfredo Monclus
3202dde7ca PD(hole taskpanel): Add custom widget for font-scaled SVGs
* feat: add custom widget for font scaled svgs
* refactor(PD): hole taskpanel svg tweaks
* fix(PD): build link on windows
2025-02-11 11:31:38 -06:00
Alfredo Monclus
de7a237a8a PD(hole taskpanel): Include depth on diagram
feat(PD): hole diagram add include depth
refactor(PD): hole taskpanel: images add background
2025-02-11 11:31:38 -06:00
Alfredo Monclus
be3ce13a7c PD(hole taskpanel): Add image-based hole cut panel
* feat(PD): hole taskpanel: new image based cut panel
* fix(PD): hole taskpanel fix dynamic cut types
* refactor(PD): hole taskpanel: renames and vlayouts to keep labels closer
* fix(PD): hole diagram tweaks
2025-02-11 11:31:17 -06:00
Alfredo Monclus
dc53d3dba2 feat(PD): guess closest thread designation
fixes metric to metric-fine not working when switching threadtype from cli and property panel and the cases when changing from metric to inch based types and vice-versa
2025-02-10 10:32:52 -06:00
tritao
65466d580b Gui: Reorganize the selection files into a top Selection folder. 2025-02-03 17:56:57 +01:00
Alfredo Monclus
4dae03a994 feat(PD): hole taskpanel ui hide thread options if profile is none 2025-01-13 18:24:07 -03:00
Alfredo Monclus
4e5f5c4481 feat(PD): hole taskpanel ui hide hole cut options if not cut 2025-01-13 16:59:28 -03:00
Alfredo Monclus
36682bcee8 refactor(PD): remove the ui file connections, this are handled in the task code 2025-01-13 16:59:28 -03:00
Alfredo Monclus
6077317d12 feat(PD): hole taskpanel ui hide thread group if not threaded hide threadFit if threaded 2025-01-13 16:22:21 -03:00
Alfredo Monclus
5e8e2224d1 feat(PD): hole taskpanel ui hide thread model options if not applicable 2025-01-13 16:22:21 -03:00
Alfredo Monclus
32820ac425 feat(PD): hole taskpanel: hide drill point options if not applicable 2025-01-13 08:45:43 -03:00
Chris Hennes
173ff4da1e Merge pull request #15744 from alfrix/threads
feature: add more thread types: BSP NPT  and tapered
2024-12-20 12:22:38 -05:00
Alfredo Monclus
ca3cb78ad5 fix(PD): size should be enabled if profile is not none 2024-12-20 12:03:18 -05:00
Alfredo Monclus
ce91285e4d feat(PD): BSF threads 2024-12-20 07:51:34 -03:00
Alfredo Monclus
edb565046d feat(PD): BSW threads 2024-12-20 07:51:34 -03:00
Alfredo Monclus
588f4c3b00 feat(PD): ANSI pipe threads 2024-12-20 07:51:33 -03:00
Alfredo Monclus
acf04c7f1e feat(PD): BSP - British standard pipe threads 2024-12-20 07:51:33 -03:00
Alfredo Monclus
f99db90986 fix(PD): initialization of thread class and fit 2024-11-11 18:18:30 +01:00
wwmayer
e98ffc3060 PartDesign: Prepare for clang-format (#16048)
* PartDesign: Prepare for clang-format

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-02 17:48:26 +02:00
wmayer
5731a27609 PD: Add template helper functions to safely access feature or view provider
In subclasses of TaskFeatureParameters use the new helper functions and check for null pointer. This fixes #15453
2024-07-18 13:40:08 +02:00
wmayer
351397e088 PD: Replace helper functions in subclasses of TaskDlgFeatureParameters with a template function 2024-07-18 00:02:07 +02:00
wmayer
cf6d8da448 PD: Make blockUpdate private class member 2024-07-17 20:09:53 +02:00
Syres916
44e8f91085 [PartDesign] Fix thread depth level not enabled unless clicked 3 times 2024-06-24 11:19:06 -05:00
wmayer
ca1cb21498 PD: modernize C++: use equals default 2023-08-22 13:31:17 +02:00
wmayer
d150fa7164 modernize C++: avoid bind
In many cases std::bind() is kept because the code is much simpler
2023-08-08 21:10:16 +02:00
wmayer
68d22d864b modernize C++: move from boost::bind to std::bind 2023-08-08 17:36:13 +02:00
Uwe
d27e69bdc9 [PD] add tooltip for Hole feature
- tooltip makes clear what the depth means for countersinks
- add comment why a calculation cannot be performed
- shorten some long lines
2023-03-10 05:14:24 +01:00
wmayer
12ed13ddbe PD: move to new style connect() 2023-01-15 14:27:33 +01:00
Uwe
978642d03e [PD] remove deprecated holes
- as discussed in https://github.com/FreeCAD/FreeCAD/pull/7642 the backwards compatibility for deprecated holes was already lost since FC 0.19
- this PR removes the deprecated types and transform holes created with FC 0.19 or 0.20 to the corresponding countersinks/counterbores.

- also add Counterdrill for translations
2022-10-27 14:24:32 +02:00
Stefan Klug
60d7b1d834 PartDesign: Add HoleCuteType "Counterdrill" 2022-10-24 15:19:24 +02:00
Stefan Klug
cbd1963142 [Bugfix] PartDesign: Fix HoleCutDepth not being recalculated correctly
HoleCutDepth is reset to 0 to force a recalculation of te depth when
HoleCutType is set to a new value.
But the line
	pcHole->HoleCutCustomValues.setValue(false)
also forces a recalculation. So the depth was recalculated with the old
value in HoleCutType which was not expected behaviour.
2022-10-23 04:10:18 +02:00
Uwe
35f75064a0 [PD] remove superfluous nullptr checks 2022-07-17 18:12:41 +02:00
wmayer
7db925d991 App: fix memory leaks in Enumeration class and simplify code 2022-06-25 18:18:57 +02:00
Uwe
360b4282f7 [PD] Hole dialog fixes
- when there is no profile the change of the hole cut type was not handled
- for the deprecated hole cut types it must also be possible to use custom values
2022-06-25 03:31:27 +02:00
wmayer
1ca7429705 Gui: Optimize includes to reduce compile time 2022-03-07 20:29:18 +01:00
Uwe
7c8031d356 [PD] Hole, Pipe and Revolution: remove unused includes 2022-02-19 18:47:26 +01:00
Uwe
9a8e055cc6 [PD] Hole: fix angle constraints
- all 3 angles cannot be >= 180°
- also add missing minimum in UI for taper angle
2022-01-07 20:38:05 +01:00
Uwe
a6b01fa1f0 [PD] Hole: some coding style fixes
all done by MSVC
2022-01-06 16:18:25 +01:00
Uwe
8df64b7426 [PD] add missing hole constraint
- add missing constraint for hole diameter
- add missing sets of angle constraints in the task dialog
2022-01-06 15:39:13 +01:00
Uwe
c5f87d8ea8 [PD] hole dialog improvements
- no keyboard tracking
- don't disable labels since we don't do this for the other dialog labels
- avoid a doubled word in subsequent labels
- further UI file changes are by Qt's Designer
2021-12-22 02:46:07 +01:00
Uwe
9770449be7 [PD] fix several hole thread issues
- actually use specified thread depth, fixes issue reported here: https://github.com/FreeCAD/FreeCAD/pull/4274#issuecomment-997787744
- 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
2021-12-22 01:09:06 +01:00
David Osterberg
c7c420ca1d PartDesign: Hole. Address Donovaly bugs 7 and 8
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.
2021-02-28 20:13:14 +01:00
David Osterberg
1eeefeb8ae PartDesign: Hole: Always update view if modelthread is disabled
Also: Check the Update View checkbox and disable it, when turning off
model thread.
2021-02-28 20:13:14 +01:00
David Osterberg
d3ddbe8549 PartDesign: Add true threads to Hole
- 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
2021-02-28 20:13:14 +01:00
donovaly
2ac84872ec [PD] make pointers to the UI std::unique_ptr
Same as PR #4293, just for PartDesign

as noted in https://github.com/FreeCAD/FreeCAD/pull/4271#discussion_r554673632
the pointer to the UI should be a unique pointer.

This PR does this for all PartDesign dialogs that don't already use a unique_ptr.
2021-02-05 18:01:57 +01:00