Commit Graph

73 Commits

Author SHA1 Message Date
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
donovaly
45dd1a7f60 fix issue reported by @chennes
also fix annoying variable naming - different variables representing different types should not have the same name

also update a comment according to depending PRs
2021-02-03 16:24:01 +01:00
donovaly
1c58c3b677 [PD] hole fix custom cut handling
This PR is based on PR #4344 and a spin-off of PR #4337. It fixes:

We have normed screw head cuts. These values can be overridden but we must store the info about the overriding. Why? - because when you have e.g. made a custom change to a normed countersink and then change to another countersink norm, you would either not get the values defined in the norm or you get these values but loose e.g. your depth settings
2021-02-03 16:23:28 +01:00
donovaly
c676c07316 [PD] fix UTS clearance holes
This PR is based on PR #4343 and a spin-off of PR #4337. It fixes:

- the bug that we did not use the normed clearance hole diameters for UTS holes
- missing recompute when changing existing hole from Metric to UTS type
2021-02-03 16:19:24 +01:00
donovaly
7eb9b5ed42 [PD] hole dialog UI fixes
This PR is the first in a series of probably 3 PRs to fix known hole dialog bugs.

This one fixes:

- the .ui file issues
- readonly status issues of some widgets/properties (e.g. when the hole is through all, disable drill point settings)
- the bug that updateHoleCutParams() overwrote the previously correctly determined hole diameter
- just a trifle: change a function name to fit into the naming scheme
2021-02-03 16:14:36 +01:00
donovaly
7306ed28b0 [PD] fix blind hole depth handling
as reported in https://tracker.freecadweb.org/view.php?id=3818
we treat the blind hole depth not according to the conventions. The size of the drill point due to the angle is normally not taken into account but FC does this in any case.

This PR adds therefore an option, that is by default off, to take the drill point size into account.
Without the option, (the new default) the depth is calculated according to the conventions.

The PR also removes unused widgets and restored the tab order in the .ui file. The thread parameters were never used. In case we made in future the decision to carve into holes real (modeled) threads, we need a special UI for that solution anyway so having the dead code in is not helpful at all.
2021-01-25 01:10:23 +01:00
donovaly
371c23a584 [PD] more hole fixes
- there is the ISO 273 describing clearance holes, so we need to take these values. Only if we have a size not defined in the norm, we calculate
- add the coarse (wide) type for clearance holes from ISO 273
- add all screw thread sizes defined in DIN 13/ISO 261
- rearrange thread dialog to make it more compact
- change name "fit" to "clearance" as discussed
- add tooltips to the dialog
- fix issue with TaperedAngle dialog field
- change a size name because the norms define "M1" not "M1.0"
2020-11-18 14:45:14 +01:00
donovaly
d5767cd3ba [PD] Hole countersink angle work
- fix bug that custom angles were overwritten
- the norms only define screw heads, not the cut for them, so also a custom angle is possible to sink a metric screw
- use better step in UI since one changes the presets only in fractions of a millimeter (otherwise it would be a different hole size)
- handle case of no cut
- calculate change in diameter when adding depth to countersinks
2020-11-14 19:24:32 +01:00
wmayer
b7d763a1c4 PartDesign: [skip ci] make cut type modes of hole feature translatable 2020-11-13 17:51:41 +01:00