Commit Graph

2291 Commits

Author SHA1 Message Date
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
Ajinkya Dahale
56278633ce [PD] Fix reference axis selection in revolve/groove
Fixes #11713.
2024-01-08 14:19:57 -03:00
Syres916
8cadc2294d [PartDesign] Hole, ignore duplicate circle/curve centers (#11773)
* [PartDesign] Hole, ignore duplicate circle/curve centers

* [PartDesign] Hole correct log output

* [PartDesign] Hole changes based on feedback
2024-01-08 13:55:16 -03:00
sliptonic
07c664665b Merge pull request #11750 from realthunder/FixActiveBody
Fix object path in active object when creating new body in App::Part
2024-01-08 10:47:45 -06:00
bgbsww
bf3ccbc5b6 Correct mistaken Helix patch; use MakePipe for frenet for speed; add tests (#11598)
* Cleanup and switch to using MakePipe

* Cleanup unused include

* Use Frenet mode in building pipe

* Restore original code, add a control property

* Hide property, and init on new objects

* Restore prior behavior for legacy objects

* Clean up git blame; add missing move to keep helix same with new makePipe call

* Remove debug include

* Use doxygen syntax for deprecation comment

* Add unit tests; restore code for angled helixes; optimize zero angle helixes

* Lower test precision to accept platform variations

* Loosen more

* Correct restoration

* Tweak test volumes to match restored helix creation

* Restore helix generation parameter

* Fix test; delint
2024-01-08 13:43:38 -03:00
Chris Hennes
108ea5d521 Merge pull request #11786 from Syres916/PD_Fix_Combobox_Issue
[PartDesign] Sprocket fix bug with translated references
2024-01-06 18:31:18 -06:00
Max Wilfinger
f4167b48c0 add placement command to context menu 2024-01-05 19:14:02 -06:00
bgbsww
da05f7c8e8 Provide a default axis for polar patterns in multitransformation 2024-01-05 11:28:45 -06:00
Chris Hennes
1d2186b7d6 Update translations (#11886)
* 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-01-03 09:27:18 -06:00
Max Wilfinger
aac3003dcf use checkbox in menu item to display current object state and refactor the code 2023-12-28 11:30:49 +01:00
Max Wilfinger
72821eb513 Change the description of the default 'Toggle active object' command in the right click menu based on the current state of the selected object. 2023-12-27 09:10:30 +01:00
Syres916
41d9c4bfe5 [PartDesign] Remove unwanted print statement 2023-12-20 18:51:40 +00:00