Commit Graph

1646 Commits

Author SHA1 Message Date
wmayer
0484592835 Fix accessibility of some group commands
Several group commands are active but require an active document to work. This PR overrides the method isActive() to
disable the commands if no active document exists.

The affected commands are:
* Std_ViewGroup
* Std_LinkActions
* PartDesign_CompDatums
* PartDesign_CompSketches
2024-05-23 10:14:46 +02:00
Chris Hennes
74db404039 Merge pull request #14074 from NomAnor/pd-icons
Change PartDesign Pad and Revolution tree icons
2024-05-20 11:45:16 -05:00
Max Wilfinger
dd012f366a Update Part Design toolbars.
Command group for datum. Removed ShapeBinder. Added CheckGeometry.
2024-05-20 10:39:32 -05:00
André Althaus
458d53c027 Use Body toolbar icon for the tree 2024-05-19 12:17:16 +02:00
André Althaus
428b8ba0bc Remove unused icons 2024-05-19 12:16:56 +02:00
André Althaus
9b4c4ce60c Replace the yellow Part primitive toolbar icons with the blue tree icons 2024-05-19 12:12:48 +02:00
André Althaus
86a865e7e0 Make "Sketch" in Pad icon red
In other icons the support geometry is red and this mirrors the other icons
2024-05-19 12:12:48 +02:00
André Althaus
f662357537 Change PartDesign Pad and Revolution tree icons
Use the same icons as the toolbar buttons.
2024-05-17 09:09:46 +02:00
Chris Hennes
e703615603 Update translations 2024-05-12 17:06:56 -05:00
Chris Hennes
a2b0941540 Update translations
Also removes Web from translation scripts.
2024-05-06 18:17:53 +02:00
hlorus
7ff4da5a27 [Part/PD] Remove measure tools 2024-04-29 09:27:22 -04:00
Chris Hennes
1ec93fdbc2 Update translations
Note: Web and Start omitted
2024-04-24 13:58:21 -05:00
Chris Hennes
6d504a0351 Update translations. 2024-04-17 16:50:38 -05:00
wmayer
780481f6ed PD: fix shape appearance of datum features, shape binder and sub-shape binder 2024-04-09 22:15:51 +02:00
wmayer
14ed89f903 Material: add workbench manipulator
Implement a workbench manipulator to inject Std_Material and Std_Appearance to (context) menu.
2024-04-05 10:08:06 +02:00
David Carter
495a96a0f5 Material: Material appearance
Uses new material system for appearance

Each feature object now has a property called ShapeMaterial that
describes its physical properties. If it has a shape, it has a
material.

The ShapeColor attribute is replaced by a ShapeAppearance attribute.
This is a material list that describes all appearance properties, not
just diffuse color. As a list in can be used for all elements of a
shape, such as edges and faces.

A new widget is provided to allow the user to select materials in a
consistent fashion. It can also launch the material editor with its
more advanced capabilities.
2024-04-04 07:39:58 -05:00
wmayer
3b39c0885b PD: Fixes 12673: Transforming of sub-shape binder fails
The problem is caused by conflicting values of the anonymous enum of ViewProviderSubShapeBinder. The solution is to set a higher value than the highest value of EditMode
2024-04-02 08:18:46 +02:00
wmayer
a7470332f7 PD: replace static_cast with dynamic_cast
The use of static_cast here could cause undefined behaviour because at this point it's not guaranteed that findBodyOf()
really returns a PartDesign::Body
2024-04-02 08:17:45 +02:00
Max Wilfinger
eaf1e7ecee adjust Part Design icons incl. WB icon 2024-04-01 11:15:33 -05:00
André
3604e57d6d Allow adding subfeatures to MultiTransform if there is no active Body (#12538)
* Allow adding subfeatures to MultiTransform if there is no active Body

Previously the active Body would be checked and used to add new
subfeatures.
This would either do nothing, when no Body was active,
causing confusion for users becaues than can edit other features without
an active Body.
Or it would add the subfeature to the wrong Body if another Body than the
one of the MultiTransform was active.

Now the Body of the MultiTransform is checked and used.

# Conflicts:
#	src/Mod/PartDesign/Gui/TaskMultiTransformParameters.cpp

* Change getTopTransformedObject() to protected

This needs to be called from the MultiTransform.

* Fix typo
2024-04-01 10:40:17 -05:00
ppphp
da7ee06d67 fix: c++20 deprecate [=] 2024-03-31 10:47:32 +02:00
Max Wilfinger
6ca8b2daae update hardcoded XPMs to .svg files. Updated .svg icons for clarity. 2024-03-30 11:25:13 +01:00
Chris Hennes
49451b3c7f Merge pull request #13154 from chennes/translations20240325
Update translations and fix script
2024-03-28 13:51:39 -05:00
Max Wilfinger
c3409fa424 add missing commands to tree context menu to be consistent with other WBs 2024-03-28 13:02:18 +01:00
Chris Hennes
af131413c5 Update translations 2024-03-25 18:08:22 -05:00
Chris Hennes
47df83c4db Translation update: move Path to CAM 2024-03-25 17:32:59 -05:00
Zheng, Lei
105c3363b8 Toponaming/Part: Move missed attacher code into place 2024-03-21 16:27:23 +01:00
wmayer
41de357e8f Issue #11989: Segfault on "Move Object to Other Body"
The reason of the crash is a static_cast of an unknown type that causes undefined behaviour. The feature AdditiveLoft has the
property Section of type PropertyLinkSubList but the function does a static_cast to PropertyLinkList.

The solution is to use a dynamic_cast that returns null if the cast fails.
2024-03-20 18:06:23 +01:00
André Althaus
af0f263179 Fix regression in pattern reference selection
Reference selection in the GUI was accidentially changed to only
allow specific types of objects, preventing e.g. selection of a DatumPlane
for mirroring.

This restores the previous functionality.
2024-03-18 18:31:12 +01:00
Chris Hennes
9dac8385f6 Fix missing translations in task panel (#12738)
* Draft: Add missing translation to task panel

* PD: Add missing translation to task panel
2024-03-11 18:10:42 +01:00
Yorik van Havre
1e164f24c0 Translations (#12748)
* Updated ts files

* Merged crowdin translations

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-03-05 08:54:36 -06:00
Josh Coalson
a8ae56e06a Part: Rename AttachExtension::Support property to AttachmentSupport, to avoid name conflict with base features. Fixes #7052 2024-03-04 18:22:43 +01:00
Chris Hennes
b6c8f8d460 Update translations 2024-02-29 17:25:46 -06:00
Florian Foinant-Willig
677cadee5e PD: Use SuppressibleExtension 2024-02-29 18:24:27 +01:00
Chris Hennes
a878b81495 Merge pull request #12474 from NomAnor/pd-pattern-tasks
Refactoring and cleanup of PD Pattern task panels
2024-02-28 15:10:37 -06:00
Chris Hennes
dac2fb4d3d PD: Correct typo in pattern parameters 2024-02-28 13:56:16 -06:00
André Althaus
a76aead05e Fix reference selection code
PolarPattern was missing some classes. The code is now more consistent
between the patterns.
2024-02-28 17:29:59 +01:00
André Althaus
0bdd72e7e7 Use the isDerived<>() Template function 2024-02-28 17:29:59 +01:00
André Althaus
b1f9e9f805 Fix linter hints 2024-02-28 17:29:59 +01:00
LemonBoy
74dc66f6f2 PD: Make datum points highlightable/selectable (#12439)
* PD: Make datum points highlightable/selectable

Give the user some feedback by changing the color of the datum point
marker as the user selects or hovers over it.

Closes #9540
2024-02-26 13:55:36 -03:00
Chris Hennes
7f8d6e2bb1 Update translations (#12557)
* Update translations

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-02-24 21:38:37 -06:00
André Althaus
b301816889 Refactor the apply function to be virtual public 2024-02-21 15:04:38 +01:00
André Althaus
7bbca2f00d Fix crash when canceling the MultiTransform panel while a newly cretated subfeature is edited
Before calling the closeSubTask() function from the dialog reject()
function, the slotDeletedObject() is called from the transaction being
aborted. This causes the subFeature pointer to be nullptr and subsequent
apply() functions from the SpinBox widgets to crash.

Before calling apply check if the subFeature is still there.
2024-02-21 14:56:23 +01:00
LemonBoy
1c8ca27f28 Preserve object order when moving them
Remove and re-insert the selected objects at the specified point in the
tree while preserving their relative order.

The code used to insert them in reverse order.

Closes #12287
2024-02-19 11:16:08 -06:00
André Althaus
bb25074076 Reformat files with clang-format 2024-02-17 17:13:14 +01:00
André Althaus
fd4bea24b7 Fix apply() method not called consistently
The python console commands where not consistenly reported because
the apply function was not called or not implemented.

The function is now called from the base class and also when
a subfeature is closed in MultiTransform.

Some missing properties are also added.
2024-02-17 17:13:14 +01:00
André Althaus
48d9a8da86 Refactor: optimize member access specifiers
After refactoring many members have unnecessarily open access specifiers.
This changes as many members as possible to private or protected.
2024-02-17 17:12:59 +01:00
André Althaus
77bcd7e50f Refactor: remove unused functions 2024-02-17 17:12:59 +01:00
André Althaus
4ae184706d Refactor: add default member initializers 2024-02-17 17:12:59 +01:00
André Althaus
ab7dd607a5 Refactor: replace enum with enum class 2024-02-17 17:12:59 +01:00