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
* 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>
- 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
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.
- 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
- 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
- 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
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.
- 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 fix annoying variable naming - different variables representing different types should not have the same name
also update a comment according to depending PRs
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
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
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
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.
- 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"
- 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