Commit Graph

1382 Commits

Author SHA1 Message Date
donovaly
d5787f9bda [PD] allow to change feature order in patterns
As discussed here: https://forum.freecadweb.org/viewtopic.php?f=27&t=48998#p420352
The pattern dialogs need a feature to change the order of the features to be patterned
2020-07-31 11:47:31 +02:00
wmayer
94ca4388e4 PartDesign: [skip ci] set dragDropMode of list widgets of Transform panels to 'InternalMove' 2020-07-30 14:54:43 +02:00
donovaly
c5e2aba15e [PD] allow multiselection on creation of pattern
- Since realthunder's contributions some months ago, the 4 pattern features (mirror, linear, polar, mulitransform) can handle several features at once.
This PR allows to select multiple features when creating a pattern.
(This speeds up the workflow because at the moment one has to create the pattern with one feature and subsequently add more.)

- fix dialog issue that Add and Remove button could be active the same time

- use the keyboardTracking feature to avoid unnecessary recomputes (e.g. currently 3 recomputes when inserting "12.5" to the length field of linear pattern)

- fix wrong <extends> statement in .ui files (automatically spotted and fixed by Qt's Designer)
2020-07-30 10:56:24 +02:00
wmayer
44f42a8e2c LGTM: [skip ci] fix: Declaration hides parameter
A local variable hides a parameter. This may be confusing. Consider renaming one of them.
2020-07-27 10:57:34 +02:00
wmayer
dc65b055e5 LGTM: [skip ci] fix: Empty branch of conditional
An empty block after a conditional can be a sign of an omission and can decrease maintainability of the code.
Such blocks should contain an explanatory comment to aid future maintainers.
2020-07-26 15:49:14 +02:00
luz paz
f20ab1765f Fix Crowdin typos + trim superfluous whitespace [skip-ci]
Some issues that this PR fixes (but not all listed):  
https://crowdin.com/translate/freecad/27911/en-en#6581578  
https://crowdin.com/translate/freecad/27911/en-en#6579080  
https://crowdin.com/translate/freecad/27911/en-en#6581580  
https://crowdin.com/translate/freecad/27911/en-en#6579086
2020-07-23 13:52:44 +02:00
wmayer
f32248997e Coverity: [skip ci] Dereference before null check
Remove logically dead code because 'pcActiveBody' cannot be null at this stage
2020-07-21 14:33:54 +02:00
wmayer
617668a7f2 Coverity: [skip ci] Bad use of null-like value 2020-07-21 12:23:10 +02:00
wmayer
b480a207c0 Coverity: Uncaught exception 2020-07-20 17:34:29 +02:00
wmayer
1a16cde1f5 Coverity: Structurally/Logically dead code 2020-07-20 17:34:28 +02:00
wmayer
4a494fec69 Coverity: Dereference null return value 2020-07-20 17:34:26 +02:00
luz paz
3dfae3ba46 Merged crowdin translations 2020-07-13 14:49:45 +02:00
Zheng, Lei
5666598a6b PartDesign: change SubShapeBinder make command
Allows making binder to another binder.
2020-07-12 19:43:23 +02:00
Zheng, Lei
010a14a6b5 PartGui: avoid code duplication for handing TaskAttacher
A better fix for #0004188

Delay calling setPreviewDisplayMode() in ViewProviderPrimitive::setEdit
also fixed issue of not turning off preview mode if the user cancels
editing because there is already a task dialog active.
2020-07-12 16:03:42 +02:00
Zheng, Lei
37caf53dfd Part: fix TaskAttacher::visibilityAutomation()
Rename Python variable 'tv' to avoid potential conflict with others
(PS. I can't reproduce error caused by this. But there is no harm doing
it either).

Handle editing attachment through an App::Link.
2020-07-12 16:03:42 +02:00
Zheng, Lei
896e774c41 PartDesign: fix DressUp SupportTransform
Skip multiple consequtive DressUp features when SupportTransform is
enabled.
2020-07-11 13:03:44 +02:00
Zheng, Lei
7fadfd0439 PartDesign: change feature DressUp behavior when used for pattern
Repurpose DressUp.SupportTransform property to define the following
behavior,

* When disabled (default), only the dressing will be used for patterning.

* When enabled, the additive/subtractive shape of the dressed base
  feature will be used for patterning. Any dressing that is not applied
  to the based feature will be ignored.

* If the dressing is applied to non-additive/subtractive feature, then
  only the dressing will be used for patterning.

New API FreatureAddSub::getAddSubShape() is added to account for the
fact that a dressing (e.g. a fillet) can be either additive or
subtractive, which means that a DressUP feature may contain both
additive and subtractive shapes.

FeatureTransformed is modified to perform both fusion and cut if
required.
2020-07-11 13:03:21 +02:00
Zheng, Lei
233e6f931a PartDesign: fix line ending in source code 2020-07-11 13:02:49 +02:00
wmayer
0441478d49 PartDesign: [skip ci] revert TabFocus policy for spinbox in Thickness panel
When clicking on the spinbox it won't get the focus and thus it's not possible to override the content with the keyboard.
The user has to actively press the Tab button in order to set the focus to the spinbox before he can override the content.
This is a very annoying behaviour and it's a regression caused by b01ebbc01
2020-07-06 14:47:21 +02:00
donovaly
062c115e6c [PD] disable keyboardTracking for dressup dialogs
- At the moment using e.g. the thickness dialog and change from the default "1.0" to e.g. "21.3" triggers 4 recomputes. This takes a lot of time and is unnecessary. Qt offers therefore to disable keyboardTracking (and we use it already in the TechDraw workbench).

- also change the default draft angle from 1.5° to more common 10° and the step to 1° so that one can quickly get usual angles for drafts
2020-07-04 07:00:00 +02:00
wmayer
76aac3a221 boost: [skip ci] fix for boost < 1.60 2020-06-15 21:33:56 +02:00
wmayer
f3b460e42e boost: fix for boost < 1.60 2020-06-15 19:38:39 +02:00
wmayer
1ee3d79d7c Qt5: 'int QFontMetrics::width' is deprecated since Qt 5.11: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations] 2020-06-12 17:51:33 +02:00
wmayer
4ec45b545e boost 1.73.0: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated 2020-06-12 17:51:33 +02:00
wmayer
c9480d7d1a PartDesign: [skip ci] fix -Wunused-variable 2020-06-10 12:52:52 +02:00
Abdullah Tahiri
11f5500716 PartDesign: closing task dialog when exiting edit mode for Primitives
=====================================================================

fixes #4241

Problem:

PartDesignGui::ViewProvider is responsible for closing the tasks for most of PD features when exiting edit mode
(i.e. unsetEdit()).

For primitives, PartDesignGui::ViewProviderPrimitive is responsible, and neither does it or relies on its parent
VP to do it when calling unsetEdit().

Solution:

Make PartDesignGui::ViewProviderPrimitive::unsetEdit() rely on parent PartDesignGui::ViewProvider to tidy up,
including closing the task dialog.

Reference:

This is the default stack call when closing a document while a PD task using PartDesignGui::Viewprovider is active:
2020-06-08 15:12:26 +02:00
wmayer
c8ce12832e PartDesign: [skip ci] fix typo 2020-06-08 00:59:46 +02:00
wmayer
1e117647ff [skip ci] include missing boost header 2020-06-07 20:58:45 +02:00
vocx-fc
0a445d9e5b PartDesign: replace unicode characters with simple hyphens 2020-06-03 14:51:01 +02:00
mwganson
11f9c249e7 [Part Design] fix refine feature in Hole feature 2020-06-02 17:44:20 +02:00
wmayer
8ac6b12ee5 PartDesign: [skip ci] fix wrong property values in UI file
set step size of angle property to 1.0
2020-05-24 12:18:19 +02:00
wmayer
00be985c97 PartDesign: [skip ci] set group name for chamfer properties 2020-05-24 11:25:15 +02:00
wmayer
53dbc5fc2d PartDesign: [skip ci] set minimum width of labels to align the spin boxes properly in the chamfer panel 2020-05-24 11:12:08 +02:00
wmayer
5bdb40d50e PartDesign: [skip ci] set an alias PartDesign_Body_Create_New.svg for PartDesign_Body.svg 2020-05-24 08:58:45 +02:00
Abdullah Tahiri
e4a5d8b862 PartDesign: Chamfer feature corrections and improvements
========================================================

- Correction to mustExecute() to account for the new properties
- Make properties not used by the mode as read-only.
- Gui: apply() only for construction mode valid features
2020-05-23 12:24:08 +02:00
Armandas Jarušauskas
e1240fb18d PartDesign: Chamfer direction flipping support 2020-05-23 12:24:08 +02:00
Armandas Jarušauskas
d2d26ab8d0 PartDesign: Chamfer icon art - flip icon 2020-05-23 12:24:08 +02:00
Armandas Jarušauskas
de02063f05 PartDesign: Chamfer - updated parameter validation code. 2020-05-23 12:24:08 +02:00
Armandas Jarušauskas
262841bb3c PartDesign: Chamfer with multiple creation modes 2020-05-23 12:24:08 +02:00
Zolko
fc4e83ad63 setting Datum Line size manually 2020-05-13 11:23:28 +02:00
wmayer
6b022b277a PartDesign: [skip ci] fix ambiguous widget name 2020-05-12 14:30:53 +02:00
Armandas Jarušauskas
4669b6c88d Fixed issues introduced in #3456
- Copy-paste error when setting angle dimensions.
- Max angle limit set to 180 degrees.
2020-05-12 14:29:28 +02:00
wmayer
618089d6d8 remove deprecated std::binary_function 2020-05-11 13:46:37 +02:00
Armandas Jarušauskas
cc82cf3e50 Added chamfer angle support to PartDesign. 2020-05-10 18:59:30 +02:00
lorenz
8be2c08141 partdesign: fix failing tapered hole test
The given parameters return an invalid shape. This fails with occt7.4 but doesn't with occt7.3. If the angle is 45 degree the cone is self-intersecting as Hole.Depth > Hole.Diameter/2. Changing the Hole.TaperedAngle to 60 degree solves this issue.
2020-05-03 17:49:13 +02:00
Yorik van Havre
28b51cf28a Merged crowdin translations 2020-04-29 16:08:23 +02:00
Abdullah Tahiri
0ec3cb16cb Remove hard-coded font families 2020-04-28 14:53:28 +02:00
Yorik van Havre
2ce452c650 Fixed bad conflict merge in PArtDesign 2020-04-20 13:34:38 +02:00
Adam Spontarelli
add624353d Converted class names from private to public, per feedback from pull request 2020-04-20 12:30:08 +02:00
Adam Spontarelli
1123e271a9 Converted class names from private to public and corrected docstring formatting, per feedback from pull request 2020-04-20 12:28:27 +02:00