Commit Graph

1401 Commits

Author SHA1 Message Date
wmayer
033e4d900b Base: [skip ci] Coverity: Uncaught exception 2020-09-14 18:34:25 +02:00
wmayer
308baeaeab PartDesign: [skip ci] fix L2 parameter in pad feature when using custom direction 2020-09-12 17:26:41 +02:00
donovaly
91ef59fdbe [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
6bbab49723 [PD and Part] add possibility to create skew prisms 2020-09-12 13:28:00 +02:00
wmayer
a507a533f3 [PartDesign] [skip ci] #fixes 4367: Thread size out of range using hole-feature 2020-08-24 17:36:48 +02:00
wmayer
cd7a6a237a [PartDesign Hole] Restore value of reversed checkbox when opening dialog 2020-08-22 16:14:14 +02:00
mwganson
95ef4f40f7 [PartDesign Hole] Add reversed checkbox to dialog 2020-08-22 15:32:42 +02:00
wmayer
e3bb32146e PD: [skip ci] add missing forward declaration 2020-08-10 14:10:43 +02:00
donovaly
5fcc109e5a [PD] [skip ci] add Sketch top level menu 2020-08-10 14:00:06 +02:00
donovaly
5978435a27 [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
5c96cec1c7 [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
8076c3394d PartDesign: [skip ci] fix broken tooltip of Pad property 2020-08-08 13:08:27 +02:00
donovaly
ca03e64776 [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
f0d823eb51 Crowdin: Merge new translations [skip-ci] 2020-08-07 17:17:35 +02:00
donovaly
f8e18ee2e7 [PD] patterning UI: avoid whitespace
- also have a uniform list height in all patterning dialogs
2020-08-06 17:05:48 +02:00
wmayer
e0b02f39ff PartDesign: [skip ci] add text of sub-menus to translation system 2020-08-06 12:22:56 +02:00
donovaly
7f71cd3ef2 [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
35007e30e5 PartDesign: fix pattern transformation 2020-07-31 14:46:33 +02:00
wmayer
87e7a3762b PartDesign: [skip ci] move indexesMoved() to base class TaskTransformedParameters to avoid code duplication 2020-07-31 13:16:44 +02:00
donovaly
ccd0f58e60 [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
292eed4ecb PartDesign: [skip ci] set dragDropMode of list widgets of Transform panels to 'InternalMove' 2020-07-30 14:54:43 +02:00
donovaly
003c2d5b62 [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
45e0673645 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
e9ce75d544 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
e82f7f74f4 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
0eb7967c40 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
b3d292865f Coverity: [skip ci] Bad use of null-like value 2020-07-21 12:23:10 +02:00
wmayer
9b2a6edeb0 Coverity: Uncaught exception 2020-07-20 17:34:29 +02:00
wmayer
2453a50aba Coverity: Structurally/Logically dead code 2020-07-20 17:34:28 +02:00
wmayer
ba683bf241 Coverity: Dereference null return value 2020-07-20 17:34:26 +02:00
luz paz
e4f6689e0a Merged crowdin translations 2020-07-13 14:49:45 +02:00
Zheng, Lei
397e0b8a4f PartDesign: change SubShapeBinder make command
Allows making binder to another binder.
2020-07-12 19:43:23 +02:00
Zheng, Lei
4dad08eff6 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
147b00f2cb 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
da4ee7e526 PartDesign: fix DressUp SupportTransform
Skip multiple consequtive DressUp features when SupportTransform is
enabled.
2020-07-11 13:03:44 +02:00
Zheng, Lei
a045f58a85 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
8b23d814f8 PartDesign: fix line ending in source code 2020-07-11 13:02:49 +02:00
wmayer
47e1827753 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 dda3141d1
2020-07-06 14:47:21 +02:00
donovaly
d94394bfc2 [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
acf3b5a256 boost: [skip ci] fix for boost < 1.60 2020-06-15 21:33:56 +02:00
wmayer
d6169d6478 boost: fix for boost < 1.60 2020-06-15 19:38:39 +02:00
wmayer
8dbe26a95f Qt5: 'int QFontMetrics::width' is deprecated since Qt 5.11: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations] 2020-06-12 17:51:33 +02:00
wmayer
730154a684 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
b5c2befaec PartDesign: [skip ci] fix -Wunused-variable 2020-06-10 12:52:52 +02:00
Abdullah Tahiri
4fba18a5d1 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
a9743b3471 PartDesign: [skip ci] fix typo 2020-06-08 00:59:46 +02:00
wmayer
7e71c8ecc5 [skip ci] include missing boost header 2020-06-07 20:58:45 +02:00
vocx-fc
b8dd14b01d PartDesign: replace unicode characters with simple hyphens 2020-06-03 14:51:01 +02:00
mwganson
6883f4687a [Part Design] fix refine feature in Hole feature 2020-06-02 17:44:20 +02:00
wmayer
e3a2f7f76d 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