Commit Graph

2302 Commits

Author SHA1 Message Date
wmayer
ede1ccc191 PD: refactor Mirrored::getTransformations 2024-03-31 17:32:27 +02: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
Florian Foinant-Willig
c7d85ff9d9 [PartDesign] Still a helix fix (#12977)
* [PartDesign] Still a helix fix

If we don't break the helix path at each turns we get a vaild path for
MakePipe (solid) even with an angle.

* Decrease helix tests requirements
2024-03-25 18:31:20 +01: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
Chris Hennes
e91c16aae1 PD: Translate shaft end types
Adds support for menu items having 'user data' that is the untranslated string. It would be better if these were enumerations, but that's a much larger refactoring process.
2024-03-11 18:05:29 +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
wmayer
8173e4474b Tests: use the correct value as reference 2024-02-27 08:47:47 -06: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
Florian Foinant-Willig
d7a95b4e90 PartDesign_Helix: use computed wires
use the wires of the computed face instead of the selected ones.
2024-02-26 17:41:21 +01: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
wmayer
53b512da1c MSVC: fix compiler warnings 2024-02-25 00:12:34 +01: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
André Althaus
24c138373c Move duplicated code to the base class
All pattern sublcasses contain the same code for handling the
feature list. This code is now moved into the base class that handles
the common ui.

The subclasses now only need to call the setupUI/setupParameterUI function
in their constructors and implement the setupParameterUI function
to create their parameter ui into the specified widget.

The MultiTransform also handles it's common ui and the subclasses
can reuse setupParameterUI without code duplication.
2024-02-17 17:12:32 +01:00
André Althaus
5139182dbe Refactor PD Pattern Tasks ui files
All files contain the same add/remove buttons and a feature list.

These common elements are moved into the TaskTransformedParameters.ui file.
The same goes for the common OK Button that is used in a MultiTransform.

The ui files for the patterns only contain their distinctive
parameters. And the common ui files contain an empy widget that will
be filled with the respective parameter widgets from the patterns.
2024-02-17 17:11:57 +01:00
Florian Foinant-Willig
74c52c9063 PD: handle null pointer in Feature::getBaseShape (#12385) 2024-02-13 17:41:25 -03:00
Yorik van Havre
638e398bec Crowdin translations (#12313)
* 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-02-12 11:59:08 -06:00
wmayer
df7e783513 Mod: fix several compiler warnings:
* fix -Wsometimes-uninitialized
* fix -Wunused-parameter
* fix -Wunused-variable
* fix -Winconsistent-missing-override
* fix -Wsign-compare
* fix -Wreorder-ctor
* fix -Wtautological-overlap-compare
2024-02-12 11:39:32 -06:00
Florian Foinant-Willig
1eb0444bd5 Part & PartDesign Cone: allow equal radii (#12219)
* PartDesign_Cone: allow equal radii

* fix R2 < R1

* Part_Cone: allow equal radii
2024-02-12 14:21:53 -03:00
Zolko-123
51f546f1f6 Update Mod/PartDesign/Gui/ViewProviderDatumCS.cpp
This is a small harmless visual improvement of the LCS representation in the 3D window: it leaves a small empty gap at the origin of the LCS which allows to select the point/vertex on which the LCS is attached
2024-02-12 11:20:20 -06:00
Florian Foinant-Willig
86e75037d9 Set Suppressed false if no shape 2024-02-12 17:55:51 +01:00
Florian Foinant-Willig
4d929d3301 [PD] Add a Suppressed property to disable a feature 2024-02-12 17:55:51 +01:00
Adrian Insaurralde Avalos
963652c6a7 Avoid sending unescaped quotes to python console 2024-02-04 16:44:25 -06:00
Ulices
fa0702956c PartDesign: Update Length/Offset when Occurrences changes (#12069)
* Add 'HACK:'/`NOTE:` tags to get special highlightning

* [PD] Bugfix: Update Length/Offset when Occurrences changes

Fix #12068
2024-01-21 18:52:34 -06:00
Syres916
a0331f2c80 [PartDesign] Revert #11357
See https://github.com/FreeCAD/FreeCAD/issues/11961#issuecomment-1889721739
2024-01-12 18:37:24 -06:00
wwmayer
d3049deaa9 PD: Add test for helix (#11601)
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2024-01-10 07:26:18 -06:00
sliptonic
ca7b867ae3 Merge pull request #11840 from maxwxyz/precise-toggle-command-description
Change the description of the default 'Toggle active object' command
2024-01-08 11:29:01 -06:00