Commit Graph

38 Commits

Author SHA1 Message Date
Ajinkya Dahale
28d8d808a8 PartDesign: Add new need active body dialog with option to choose body (#4949)
* [PD] Add new need active body dialog

Intended for use wherever an active body is needed but none exists. The dialog
contains a list with the bodies present in the document, with an extra option to
make a new body. Custom text can be provided if needed.

This commit also replaces the warnings used by "new sketch" and "primitive"
command with this new dialog.

Addresses issue #4288.
2021-09-16 12:27:46 -05:00
wmayer
2565ef5f69 PD: in setEdit() helper function make sure that recorded macro is handled as Gui command 2021-03-28 18:39:44 +02:00
wmayer
da90fa3ba7 PD: [skip ci] drop some superfluous static_cast 2021-02-18 22:51:15 +01:00
Chris Hennes
da7c6d9172 [PD] Fix isFeatureMovable() to check null status of property
As reported by @donovaly, if you try to move a pipe that does not have
an auxilliary spine, the code segfaults. This commit adds a check to ensure
that not only does the property exist (which in this case it always does), but
also that it does not contain a null. That is a valid value for the property
to have, but cannot be itself interrogated for moveability by the isFeatureMovable
recursive call. This fix is also applied to the other similar conditions in that
function to ensure they never yield the same segmentation fault.

Forums topic: https://forum.freecadweb.org/viewtopic.php?p=479388#p479388
2021-02-18 22:44:13 +01:00
wmayer
b1dd1e61a7 force strict ISO C++ (-Wpedantic)
for Fem, Import, PartDesign, Robot, Sketcher, TechDraw
2019-09-18 14:18:07 +02:00
Zheng, Lei
cd2b7e297c PartDesign changes
* Mostly for supporting in-place editing

* Add new SubShapeBinder that support cross coordinate system,
  external, and sub-object binding
2019-08-17 15:15:47 +02:00
wmayer
c3763479da activate/create 3d view when setting or getting active objects 2019-07-05 18:53:35 +02:00
wmayer
00de5bb7ad Replace Base::Exception with appropriate subclass 2018-11-14 19:28:00 +01:00
luz.paz
360e581672 Misc. typo and whitespace fixes
ref: https://forum.freecadweb.org/viewtopic.php?f=3&t=30988#p256964
along with other misc. fixes
2018-09-19 17:26:03 +02:00
wmayer
ef42cfb5d6 add method to activate 3d view when setting active object list 2018-09-12 15:38:28 +02:00
wmayer
57732f7441 add option to getBodyFor to suppress dialog to set workflow style to modern 2018-01-03 21:35:03 +01:00
luzpaz
0bafb04924 PartDesign: typos 2017-12-25 11:04:43 +01:00
Peter Lama
033334474c Rename superPlacement property to AttachmentOffset
The name Attachment Offset gives a better picture of what the
property does.
2017-11-05 16:41:25 +01:00
wmayer
d563e50632 do not auto activate single body in document when opening context-menu 2017-09-21 15:59:32 +02:00
wmayer
fde42545ba fix various coverity issues 2017-09-15 11:48:38 +02:00
Kurt Kremitzki
82391b9460 PDN: Automatically activate body if document has only 1 2017-08-12 14:45:28 +02:00
Ian Rees
3f9aead061 Make Body object on creation of Sketch/Primitive 2017-04-06 19:26:19 +02:00
Stefan Tröger
22c26d043a PartDesign: Adopt python interface to body group 2017-01-04 16:01:58 +01:00
Stefan Tröger
526d895a5d PartDesign: Port body to be a origin group 2017-01-04 16:01:58 +01:00
Stefan Tröger
c0a6b2ab11 PartDesign: Primitives are attachable directly
With the recently introduced AttachExtension the PartDesign primitives can be attachable by themself and don't need anymore the helping coordinate system datum. This simplyfies the code and the TreeView largely
2016-12-07 06:41:40 +01:00
Stefan Tröger
67d76b309c Port Attacher codde to the extension framework
AttachableObjects are desired in multiple occasions, and the current AttachableObject is not flexible enough to handle all cases. Hence the code is portet to an extension, which gives the needed flexibility.
2016-12-07 06:41:40 +01:00
Stefan Tröger
0ae9346b3c Extenions: Drop virtual inheritance
Due to problems onthe windows platform the virtual inheritance approach must be dropped. NExt to the already reimplemented proeprty interface the Type interface is reimplemented too. This change allows to revert some earlier changes.
2016-10-08 12:48:34 +02:00
Stefan Tröger
6fa964c53f Extensions: Introduce classes and port App groups 2016-10-08 12:48:34 +02:00
wmayer
9e4bed2983 fix whitespaces 2016-08-25 12:27:08 +02:00
Sergo
8df9f9603e fix relinkToOrigin, remove source body from list, etc 2016-08-24 19:11:26 +02:00
Sergo
52bf940110 PD MoveFeature:Check if feature has dependencies in source body 2016-08-24 19:11:26 +02:00
Sergo
bb78c1fd8f PartDesignGui: move feature with its dependencies 2016-08-24 19:11:26 +02:00
wmayer
17de4e2efa fix Coverity issues 2016-08-22 15:02:18 +02:00
DeepSOIC
92ccefa1d2 Attacher: use getModeName() instead of eMapModeStrings[]
getModeName() does range checking. eMapModeStrings[] will crash if out
of range.
2016-05-07 11:24:41 +02:00
wmayer
d1bc34441d + fix various gcc & clang warnings 2016-04-24 16:21:19 +02:00
Mateusz Skowroński
a8d37dabbe QString::fromAscii() is obsolete in Qt5. Replace it with fromLatin1().
This change is Qt4/Qt5 neutral.
2016-04-15 11:55:12 +02:00
wmayer
ab43e18b00 + remove 'using namespace Attacher' inside header file 2016-04-13 15:57:49 +02:00
Alexander Golubev
3ed51ac4bd PartDesign: add Origin to the Body and unstrap the module from the Parts 2016-04-12 18:12:18 +02:00
Alexander Golubev
d72a919384 OriginGroup: add new abstraction layer between the Part and the GeoFeatureGroup 2016-04-12 18:12:18 +02:00
Alexander Golubev
067530c168 PartDesign/Gui: Make partDesign's add sketch command Workflow-aware 2016-04-12 18:12:17 +02:00
Alexander Golubev
ddd0ecafa9 PartDesign/Gui: initial migration command implementation 2016-04-12 18:12:17 +02:00
Alexander Golubev
771c2b2fce PartDesign/Gui: rename some fonctions in ReferenceSelection.cpp
e.g. getPythonStr -> buildLinkListPythonStr etc
2016-04-12 18:12:17 +02:00
Alexander Golubev
9347f66a9e PartDesign/Gui: Move various utility stuff from Workbench to a separate file
Also do some header cleanup.
2016-04-12 18:12:17 +02:00