Commit Graph

1515 Commits

Author SHA1 Message Date
wmayer
6a3e76addb PD: [skip ci] fix typo in comment 2021-02-17 15:55:47 +01:00
wmayer
1955848194 PartDesign: [skip ci] make base object visible again if initial additive helix fails to recompute 2021-02-17 13:33:02 +01:00
David Osterberg
b0773e2b99 PartDesign: Helix: fix preview 2021-02-17 13:19:06 +01:00
David Osterberg
60c634c275 PartDesign: Subtractive Loft. Raise error when base is null.
Previously Subtractive loft would create a shape if there is no base
object. This is because the code is shared with Additive Loft, where
that is the right thing to do. Now we check for this, and return error
if there is nothing to subtract from.
2021-02-15 19:50:51 +01:00
David Osterberg
86f148175f PartDesign: Improve Helix parameter proposals
The previous initial proposed parameters could cause self intersection
when the user switches axis
2021-02-15 16:48:42 +01:00
wmayer
abed4bd421 PD: [skip ci] fixes #0004205: Bad behavior when entering manually PD/AdditivePipe path 2021-02-15 00:06:29 +01:00
David Osterberg
bff55def04 PartDesign: Fix hardcoded through all distance in ProfileBased
Before the throughall distance was 10 m, which is not enough for
many applications. The fix is to use the bounding box of the base shape
together with the sketch profile to calculate dynamically a large enough
length.
2021-02-12 18:37:56 +01:00
David Osterberg
ec51691a43 PartDesign: Fix broken outdated icon filenames
This fixes some cases that were missed in commit 1814270d53afd1c51c
2021-02-12 17:46:27 +01:00
wmayer
0df2105ad8 PD: [skip ci] fix ViewProviderPrimitive::getIcon() after renaming of icon files 2021-02-12 13:20:16 +01:00
donovaly
bcadbe3b1b [PD] rename icons to match Wiki files
For the What#s this feature we need to have a uniform naming of the features and its icons. For some PD icons this is not the case and since we are in feature freeze, this is the right time to address this.
(I see the same is already done for Mesh.)
2021-02-11 12:47:25 +01:00
Chris Hennes
6b16e12d7c [OTHER] Catch only Exception, not BaseException 2021-02-11 11:52:45 +01:00
Chris Hennes
e7e794753a [PD] Add missing ctor variable init (Coverity)
The "angle" variable was not being initialized in any of the
constructors for the CutDimensionSet, and nothing was being initialized
by the default constructor. This commit adds angle as an optional final
argument to the parameterized constructors, defaulting to 0.0, and adds
default values to the default constructor using the first of each enum
and 0.0 for the angle. The default constructor is required elsewhere in
the code so cannot be trivially removed. Issue identified by Coverity.
2021-02-09 20:19:38 +01:00
Yorik van Havre
97379e035a merged crowdin translations 2021-02-09 16:12:18 +01:00
Chris Hennes
40c99417bd [PD] Catch Python exceptions in dtors (Coverity)
In some PartDesign task dialogs, the destructors call functions that may
throw exceptions. If that occurs and the exception is uncaught, this
will ususally end up terminating the program. This commit adds try-catch
blocks around each instance of that (identified by Coverity) and handles
the Python exception in the normal reporting workflow.
2021-02-08 21:30:22 +01:00
David Osterberg
bad8257370 PartDesign: Fix sign error in Helix 2021-02-06 08:22:37 +01:00
David Osterberg
a819a89ede PartDesign: fix regression in Helix 2021-02-05 20:55:34 +01:00
David Osterberg
a45e6038b7 PartDesign: [Helix] Fix helix starting point bug 2021-02-05 19:17:00 +01:00
donovaly
b483fc0518 [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
David Osterberg
cb2da22e86 PartDesign: New features AdditiveHelix and SubtractiveHelix
These features, based on the code for the Pipe class, allow the user
to simply create a helical sweep within PartDesign workbench.

Sample application is threads, springs, coils, augers, etc.

Also, remove needless requirement for positive cone angle on helixes.

Thanks to @bitacovir for helping with the icons
Thanks to @chennes for review
Thanks to @vosk for review
Thanks to @wwmayer for review

Enforce that links stay within scope for ProfileBased features
This also ensures that the Body itself is not used for creating features within
the body, causing a "Graph not a DAG" error.
2021-02-04 13:01:12 +01:00
Pierre LeMoine
67aee7cd21 Transform patterns can be created from multiple base features
The infrastructure/piping seems to have been in place for a long while.
Not tested for all variations of pattern transforms.
The major enabler was removing the `break`.
Some extra piping added to let the code at call-site decide if to select multiple features or not.
2021-02-04 11:58:47 +01:00
David Osterberg
c19341b866 PartDesign: Allow selection of sketch plane by double click in picker dialog
Thanks to @0penBrain for solving a tricky segmentation fault
2021-02-03 16:46:47 +01:00
donovaly
09385d9d00 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
2a6d30da27 [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
c5fe2589d5 [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
19605200a1 [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
69f2f3b9e1 [PD] fix typo in iso7046.json
This mistake was introduced by me in commit 51c9640f
2021-02-03 15:08:30 +01:00
wmayer
8adf2aac25 [PD] [skip ci] fix alignment in pad dialog
just a minor UI issue: when you decrease the width of the pad dialog (e.g. because you have a small screen), the alignment of the widgets is lost. This fixes it by grouping the widgets in a grid.
2021-01-31 16:26:22 +01:00
donovaly
a884ea703e [PD] fix alignment in pocket dialog
just a minor UI issue: when you decrease the width of the pocket dialog (e.g. because you have a small screen), the alignment of the widgets is lost. This PR fixes this by grouping the widgets in a grid.
2021-01-31 16:03:57 +01:00
donovaly
96cbb986e2 [PD] correct hole cut definitions
I was able to get the norms and could update the definitions accordingly.
For example in the ISO 10462, sizes smaller than M3 are not defined and your definition files should only contain what is really defined.
2021-01-31 13:45:57 +01:00
donovaly
d1071026e7 [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
Yorik van Havre
33c719a382 Merge pull request #4287 from bitacovir/PartDesign_Icons
[UI] Add SVG icons for three PartDesign commands
2021-01-21 13:33:41 +01:00
David Österberg
e6e77c7698 Update src/Mod/PartDesign/App/FeaturePipe.h
Co-authored-by: Benjamin Nauck <benjamin@nauck.se>
2021-01-18 17:38:15 +01:00
David Osterberg
de5c8574d3 PartDesign: Fix small bugs in the Pipe feature
- Previously a subtractive pipe on a body with no solids would create a solid. Now Pipe will generate an error.
- Fix incorrect property header. Previously Pipe was identifying itself as Pad (copy paste error)
2021-01-18 17:38:15 +01:00
bitacovir
154d510183 [UI] Add SVG icons for three PartDesign commands 2021-01-18 11:04:32 -03:00
vosk
d667dd7102 [PartDesign]: Fix refine boolean not being obeyed at multiple places
Related to issue #3927
2021-01-07 14:04:31 +01:00
Abdullah Tahiri
4facab0936 Gui: Colorful/Greyable overlay status in icons
===============================================

Before this implementation, specific status via former mergeOverlayIcon() was greyed out
with the visibility.

With this commit, the developer has two options:

a) override mergeGreyableOverlayIcons, in which case the overlay will
be greyed out when the item is greyed out as per former mergeOverlayIcon()

b) override mergeColorfulOverlayIcons, in which case the overlay will
be superimposed after the icon is greyed out as it is the case for stardard
error and recompute flags.
2021-01-06 13:54:00 +01:00
Yann Diorcet
ae68147d0b LinearPattern: Support 1 occurrence
When using linear pattern with expression, this can be usefull to have only one
occurence (the original one), which can't be done with the following
implemenation. This commit change this behaviour by allowing this value.
2020-12-30 14:49:54 +01:00
Mateusz Skowroński
98f63ba60f Fix build warnings from deprecated Boost headers (they are used internally by Boost). Thanks @wwmayer for the hint. 2020-12-29 10:20:53 +01:00
luz paz
f497f09238 Fix typos [skip ci]
Typos ffound via `codespell v2.1.dev0`  
Also includes fixes in deprecated code of `src/Mod/Assembly`
2020-12-28 23:14:04 +01:00
Yorik van Havre
22f7d5f3bc Merged crowdin translations 2020-12-23 15:13:05 +01:00
wmayer
ff69f7fba3 PartDesign: [skip ci] fix Hole feature
* by default ThreadDirection must be set read-only since Threaded by default is None
* use suitable values to initialize the class properties
2020-12-18 21:18:41 +01:00
wmayer
2db10d8236 PartDesign: [skip ci] fix order of controls so that by pressing TAB always the next control gets focus 2020-12-18 17:04:27 +01:00
M G Berberich
a2b1e6226a cleanup of hole dialog
* replaced widget with radiobuttons by button Group, to improve alignemt
  of DrillPointAngle with grid-layout

* made Thread Pitch/Angle/Cutoffs widgets wider
2020-12-18 16:38:46 +01:00
wmayer
d4bd0098c2 PartDesign: [skip ci] fix layout of Drill point controls 2020-12-18 16:28:35 +01:00
wmayer
b62aeaf6b7 PartDesign: [skip ci] make the spin box for the angle of the drill point wider 2020-12-17 17:10:42 +01:00
M G Berberich
f5be329c3f make the hole-cut-type dropdown-box wider
This drop-down box contains long names and did not use the space of
the dialog.
2020-12-17 16:59:26 +01:00
wmayer
0aa38c44f4 PD: [skip ci] in wizard shaft handle case where Plot module is not available 2020-12-11 16:09:01 +01:00
Chris Hennes
533814dd0f Silence Qt/Windows setGeometry Warning
Add the optional Qt::MSWindowsFixedSizeDialogHint parameter to all uses of the QInputDialog::getX static functions to silence a Qt/Windows debug mode warning about QWindowsWindow::setGeometry: Unable to set geometry. Increase the size of the unit calculator to eliminate the same warning. Finally, call adjustSize() on the "Unsaved Changes" dialog to silence the warning.
2020-12-11 09:58:09 +01:00
wmayer
c235b9fba9 PD: [skip ci] fix invalid strings 2020-12-09 16:59:34 +01:00
wmayer
eac5b9466f PartDesign: [skip ci] for PartDesign::Torus primitive use TopoShape::makeTorus 2020-12-03 15:06:22 +01:00