Commit Graph

1761 Commits

Author SHA1 Message Date
wmayer
a3fda6f9ed PD: [skip ci] fixes for pipe task panel
+ Add/Remove are checkable buttons so if user unchecks it then disable highlighting of spine
+ Avoid superfluous char* -> QString conversion
2020-09-17 14:04:36 +02:00
wmayer
2b676020d2 PD: fixes for pipe task panel
+ fix Qt4 build failure
+ fix handling of adding items to spine/auxiliary spine/sections to allow to remove them again
+ QListWidget::takeItem() returns a pointer to the removed item. So a previous call of QListWidget::item() is superfluous
2020-09-17 11:35:41 +02:00
donovaly
5d96f01cf7 [PD] add context menus to sweep Dialog
- elements in the list of edges/spines/sections can now be deleted by pressing DEL and there is a context menu for this action

see https://forum.freecadweb.org/viewtopic.php?f=19&t=50222&p=431021#p431021
2020-09-17 00:45:43 +02:00
wmayer
a028ea94cc PartDesign: [skip ci] hide base feature of pad after it successful recompute 2020-09-16 17:18:49 +02:00
wmayer
53a500ecf5 PartDesign: make sure to remove selection gate when closing task panel 2020-09-16 12:15:19 +02:00
donovaly
5abb45f7cf [PD] fix wording for skew prisms
the UI and the property is not consistent. In the dialog we use the term angle upon user feedback while the property still has the name "skew" in it.
I simply forgot this change in my PR that implemented skew prisms.

This is now corrected by this PR.
2020-09-15 22:13:26 +02:00
wmayer
42d643c8f7 PD: whitespace improvements 2020-09-15 14:20:24 +02:00
wmayer
5635f87d0e PD: do not use active document in task dialogs because this is error-prone
and optimize string creation in TaskSketchBasedParameters::getFaceReference
2020-09-15 14:13:23 +02:00
wmayer
1c730a7f00 PD: do not use active document in task dialogs because this is error-prone 2020-09-15 13:21:32 +02:00
mwganson
74e4a3e976 [Part Design] allow for preselecting loft sections and pipe spines prior to invoking command 2020-09-15 10:48:09 +02:00
wmayer
6199fbb25e Base: [skip ci] Coverity: Uncaught exception 2020-09-14 18:34:25 +02:00
wmayer
4cad62e315 PartDesign: [skip ci] fix L2 parameter in pad feature when using custom direction 2020-09-12 17:26:41 +02:00
donovaly
7cbc9cf5f0 [PD] allow to pad in any direction
It saves a lot of work if one can directly pad in any direction and OCC allows this.

This PR adds the possibility to define a custom vector for the padding direction.
2020-09-12 16:33:44 +02:00
donovaly
d4519d5aec [PD and Part] add possibility to create skew prisms 2020-09-12 13:28:00 +02:00
wmayer
30bc9fc6be [PartDesign] [skip ci] #fixes 4367: Thread size out of range using hole-feature 2020-08-24 17:36:48 +02:00
wmayer
666682d4e7 [PartDesign Hole] Restore value of reversed checkbox when opening dialog 2020-08-22 16:14:14 +02:00
mwganson
faed39ded2 [PartDesign Hole] Add reversed checkbox to dialog 2020-08-22 15:32:42 +02:00
wmayer
50aa73da9d PD: [skip ci] add missing forward declaration 2020-08-10 14:10:43 +02:00
donovaly
a8ea844e0b [PD] [skip ci] add Sketch top level menu 2020-08-10 14:00:06 +02:00
donovaly
acecdd8c57 [PD] allow expression for pocket offset
- also disable KeyboardTracking for some fields to avoid unnecessary and often time consuming recomputes while typing in
2020-08-10 13:39:50 +02:00
donovaly
940c27288b [PD] [skip ci] disable keyboardTracking for primitives and attachment
When modifying primitives in complex geometries having a recompute for every keystroke can be annoying. Disabling keyboardTracking fixes this but keeps the immediate preview when using the spin buttons.
2020-08-10 10:14:17 +02:00
wmayer
278219b7cd PartDesign: [skip ci] fix broken tooltip of Pad property 2020-08-08 13:08:27 +02:00
donovaly
81a98a4476 [PD] bind expression to pad offset
It is strangely not possible to use an expression for a pad offset, but this works fine, see the forum for an example.

Thus allow this.
2020-08-08 13:04:34 +02:00
luz paz
59e3ea096e Crowdin: Merge new translations [skip-ci] 2020-08-07 17:17:35 +02:00
donovaly
4ce85d39d3 [PD] patterning UI: avoid whitespace
- also have a uniform list height in all patterning dialogs
2020-08-06 17:05:48 +02:00
wmayer
c516bb06d3 PartDesign: [skip ci] add text of sub-menus to translation system 2020-08-06 12:22:56 +02:00
donovaly
80a88470b6 [PD] rework menu
The menu was too long for smaller screens. Therefore pack some of its items to subitems.
2020-08-06 12:14:27 +02:00
Zheng, Lei
4a5cca3359 PartDesign: fix pattern transformation 2020-07-31 14:46:33 +02:00
wmayer
a9af418698 PartDesign: [skip ci] move indexesMoved() to base class TaskTransformedParameters to avoid code duplication 2020-07-31 13:16:44 +02:00
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