Commit Graph

65 Commits

Author SHA1 Message Date
Uwe
b74425b441 [PD] revolve: remove unused code
- also come code style unification
2023-03-22 17:46:03 +01:00
wmayer
2a0e52e71e clang: fix -Wunused-but-set-variable 2023-03-12 15:05:21 +01:00
wmayer
a122aa01a7 PD: move to new style connect() 2023-01-15 14:27:33 +01:00
berniev
47ac049e14 Mod: use emplace_back 2022-08-05 10:36:16 +02:00
wmayer
a93082bc06 PD: [skip ci] Fix several clazy issues:
* Maybe you meant to call base method instead [-Wclazy-skipped-base-method]
* Missing reference in range-for with non trivial type [-Wclazy-range-loop-reference]
* Mixing iterators with const_iterators [-Wclazy-strict-iterators]
* Unused QByteArray [-Wclazy-unused-non-trivial-variable]
* C++11 range-loop might detach Qt container (QList) [-Wclazy-range-loop-detach]
2022-07-25 13:40:19 +02:00
wmayer
7acdcbd031 PD: Fix several coverity issues:
* CID 350558: Uninitialized pointer field
* CID 350554: Uninitialized pointer field
* CID 350589: Uninitialized pointer field
* CID 350608: Uninitialized pointer field
* CID 350544: Uncaught exception
* CID 350568: Uncaught exception
* CID 350603: Uncaught exception
* CID 350562: Unchecked dynamic_cast
* CID 350591: Unchecked dynamic_cast
* CID 350583: Unchecked dynamic_cast
* CID 350598: Unchecked dynamic_cast
2022-03-13 16:32:19 +01:00
Uwe
037b2796b3 [PD] Hole, Pipe and Revolution: remove unused includes 2022-02-19 18:47:26 +01:00
0penBrain
73f2c1434a Modernize signal/slot connection for real :) 2022-02-08 17:51:36 +01:00
wmayer
13234d7e63 PD: fix small inconsistence, use forwared declaration 2022-01-14 12:22:16 +01:00
Ajinkya Dahale
9c4c40856f [PD] Use buttonToggled signal in PD pipe
Combines other button toggle methods/signals/slots involved.
2022-01-13 22:31:05 -05:00
Ajinkya Dahale
fd0be8bccd [PD] Use Gui::ButtonGroup in TaskDlgPipeParameters 2022-01-13 22:31:05 -05:00
wmayer
a6838cf58f Gui: rename methods of SelectionObserver to clarify intention in client code 2021-12-07 14:17:07 +01:00
wmayer
8424c9323b PD: enable selection only on request and disable it after selecting an object 2021-12-07 13:06:48 +01:00
Uwe
c302582823 [PD] allow to move sweep sections
Now that we have the feature that sweeps can have vertices as end or begin of a sweep, there is the need for the feature to move sections. For example vertices may only be the last section.
2021-11-29 00:13:23 +01:00
Ajinkya Dahale
6f5159180b [PD] Use PropertyLinkSubList for loft and sweep sections
This change is necessary since we restrict part-design features to only use
other features from the same body.
2021-11-20 21:37:14 +01:00
Uwe
5a2f962b05 [PD] TaskDlgPipeParameters - refactor comments
update/refactor comments after today's changes
2021-11-12 00:44:35 +01:00
wmayer
e6fcfc47fb PD: make sure to switch off Profile and Section highlighting when closing sweep dialog 2021-11-11 20:33:27 +01:00
wmayer
308a5e4c63 PD: change visibility handling of sweep to support undo/redo 2021-11-11 20:21:47 +01:00
Uwe
7bea9e5bc5 [PD] fix sweep visibility bug
Currently:

    only sweep path is toggled correctly in its visibility, the profile is never shown
    the sections are always shown

This PR fixes this inconsistency reported here: https://forum.freecadweb.org/viewtopic.php?f=19&t=63544
2021-11-11 00:00:58 +01:00
Ajinkya Dahale
99bafa24e8 [PD] Clear other taskbox buttons in loft and pipe when one pressed 2021-11-10 17:59:45 +01:00
Ajinkya Dahale
854b547503 [PD] Fixed loft and sweep breaking on section deletion
Item removal in `onDeleteSection()` was also clearing subname details so if one
of the remaining sections was a face this caused a failure.
2021-11-09 23:05:29 +01:00
Ajinkya Dahale
9cade40755 [PD] Support adding solid faces for loft and pipe sections
With these changes, one face per solid can be added as either the first
"profile" or subsequent sections in loft and pipe.

This commit depends on `App::PropertyXLinkSubList` preserving the order in which
sections are added.

A minor change this also adds is that when a solid's face is selected that face
is mentioned in the fields instead of the solid (eg `Box:Face1` instead of
`Box`).
2021-11-09 23:05:29 +01:00
wmayer
b37354b28b PD: [skip ci] fix ambiguous shortcut overload in TaskDlgPipeParameters 2021-11-07 08:27:33 +01:00
wmayer
4b2a30312e PD: [skip ci] fixes #0004139: Macro - SubtractivePipe attached path object issues after macro executed 2021-03-29 10:43:08 +02:00
wmayer
abed4bd421 PD: [skip ci] fixes #0004205: Bad behavior when entering manually PD/AdditivePipe path 2021-02-15 00:06:29 +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
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
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
wmayer
c69612c748 PD: improve reference highlighting of a pipe
This change allows to highlight the spline, auxiliary spine, profile and sections of a pipe.
This gives the user a much better feedback of what external shapes are already used to build the pipe
2020-09-17 16:19:38 +02:00
wmayer
44b1a27cd4 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
8fa096f23b 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
329c763916 [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
dc7de6b195 PD: do not use active document in task dialogs because this is error-prone 2020-09-15 13:21:32 +02:00
mwganson
7d392d1209 [Part Design] allow for preselecting loft sections and pipe spines prior to invoking command 2020-09-15 10:48:09 +02:00
wmayer
9b2a6edeb0 Coverity: Uncaught exception 2020-07-20 17:34:29 +02:00
wmayer
7683bb2b4f Fix usage of Reference dialog:
+ fix memory leak by using QDialog on the stack
+ open a transaction where needed when making a copy to avoid mess with undo/redo
+ set proper title and use main window as parent
+ replace class name Dialog with PartDesignGui::DlgReference
2018-12-03 17:54:05 +01:00
wmayer
00de5bb7ad Replace Base::Exception with appropriate subclass 2018-11-14 19:28:00 +01:00
wmayer
0b8ff8de0b clean-up work in TaskPipeOrientation 2018-09-20 17:47:36 +02:00
wmayer
149262a7cc fixes #0003599: PartDesign Additive and Subtractive Pipe features don't allow changing sections after creation 2018-09-20 17:17:41 +02:00
wmayer
525a44905a issue #0003599: PartDesign Additive and Subtractive Pipe features don't allow changing sections after creation 2018-09-20 15:14:33 +02:00
wmayer
0e4a3d2dba fix possible crash in pipe/scaling task panels 2018-03-10 16:53:14 +01:00
Unknown
31a32b9931 Doxygen Typos
+ doxy whitespace formatting
+ added more misc. typos
+ grammar fixes
[skip ci]
2017-10-15 16:27:42 +02:00
wmayer
14f6de974b fix typos 2017-09-25 22:36:31 +02:00
Kurt Kremitzki
79a6f66b35 Check PartDesign::AdditivePipe's auxiliary spine for existence before deciding its externality 2017-07-01 19:30:49 -05:00
Kunda
9410e751e9 source typo fixes pt4 (only on py3 merged code) 2017-03-02 13:47:21 +01:00
wmayer
7b782e595f fix crash when pressing cancel on pipe task panel 2017-01-24 15:00:41 +01:00
Stefan Tröger
526d895a5d PartDesign: Port body to be a origin group 2017-01-04 16:01:58 +01:00
wmayer
dd7c91ddcf fix -Wextra in PartDesign 2016-09-22 18:34:56 +02:00
wmayer
9e4bed2983 fix whitespaces 2016-08-25 12:27:08 +02:00
wmayer
17de4e2efa fix Coverity issues 2016-08-22 15:02:18 +02:00