Commit Graph

2319 Commits

Author SHA1 Message Date
wmayer
4f8606fddb PD: Fixes #13446: Crash with hole in additive loft 2024-04-14 21:24:06 +02:00
bgbsww
9ebb23f234 Toponaming/Part: Initialize the hasher so that it operates 2024-04-13 22:41:57 -05:00
Zheng, Lei
01498d92d5 Bring in missing code 2024-04-11 18:20:26 -04:00
bgbsww
239c3e6f78 Toponaming/Part: Fix review items 2024-04-10 12:14:01 -04:00
bgbsww
942ebd58f0 Toponaming/Part: Add deprecation comments, clean up code 2024-04-09 21:17:08 -04:00
Zheng, Lei
231a638fc7 TopoShape/Part: Bring in PartDesign dependencies 2024-04-09 21:17:08 -04:00
bgbsww
caa126eec0 Upgrade Toponaming tests 2024-04-09 16:19:07 -05:00
wmayer
f84224bb43 Mod: Show regressions in shape colouring
This PR demonstrates the known regressions of the recently merged material branch:
* Changing the transparency after setting color per face will reset them
* The result of boolean operations or compound doesn't inherit the colour of its input objects
* If colour is set per face to a boolean operaton object then saving and restoring the file causes weird rendering behaviour
  because material binding is set to PER_PART but only a single colour is defined
* If a shape inside a part container has set colour per face then saving and restoring as STEP file causes weird rendering
behaviour for the same reason
* Shape binder or datum objects don't show the correct default shape colour
2024-04-09 22:13:42 +02:00
wmayer
dfc74591cc 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
ba20441935 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
bgbsww
37c38acd19 Add an initial test to show TNP (#13233)
* Add an initial test to show TNP

* Add documentation, make review tweaks

* Quiet Lint
2024-04-03 16:53:58 -05:00
wmayer
96b054aa84 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
b711c586c8 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
9f0a2ea3f7 adjust Part Design icons incl. WB icon 2024-04-01 11:15:33 -05:00
André Althaus
6b721ac797 Ignore suppressed features in patterns
This will remove all suppressed features from the Originals list
before calculating the patterns.
2024-04-01 10:58:24 -05:00
André
48f0e5043a 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
wmayer
b908e46b26 PD: Mirror feature should be more permissive
If you have a mirror feature and set the mirror plane with the normal feature editing the recompute works. But if the mirror plane is set with the property editor then the recompute fails with the message that no mirror plane reference is set.

This is related to a an empty sub-name list of the link property instead of a single and empty sub-name element.

This PR allows to specify a sketch, plane or datum plane without a sub-name.

For more details see: https://forum.freecad.org/viewtopic.php?t=86568

This fixes #13238
2024-03-31 17:32:27 +02:00
wmayer
5adb384e20 PD: refactor Mirrored::getTransformations 2024-03-31 17:32:27 +02:00
ppphp
8863b9ac4c fix: c++20 deprecate [=] 2024-03-31 10:47:32 +02:00
Max Wilfinger
e38b8d9bd4 update hardcoded XPMs to .svg files. Updated .svg icons for clarity. 2024-03-30 11:25:13 +01:00
Chris Hennes
c37c32edc9 Merge pull request #13154 from chennes/translations20240325
Update translations and fix script
2024-03-28 13:51:39 -05:00
Max Wilfinger
356dfb2080 add missing commands to tree context menu to be consistent with other WBs 2024-03-28 13:02:18 +01:00
Chris Hennes
1a51c0cb57 Update translations 2024-03-25 18:08:22 -05:00
Chris Hennes
32a957bd07 Translation update: move Path to CAM 2024-03-25 17:32:59 -05:00
Florian Foinant-Willig
4beeafbedd [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
8df43d0327 Toponaming/Part: Move missed attacher code into place 2024-03-21 16:27:23 +01:00
wmayer
43ec38ec9e 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
35ca189589 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
bf6a209c22 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
cd43bf60ee 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
262a858be5 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
fbd8767242 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
c4b54a94a2 Update translations 2024-02-29 17:25:46 -06:00
Florian Foinant-Willig
b5abde373d PD: Use SuppressibleExtension 2024-02-29 18:24:27 +01:00
Chris Hennes
1ed69c1e66 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
667514e21b PD: Correct typo in pattern parameters 2024-02-28 13:56:16 -06:00
André Althaus
1ee4a555da 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
bd0e555e4e Use the isDerived<>() Template function 2024-02-28 17:29:59 +01:00
André Althaus
3936f49ee2 Fix linter hints 2024-02-28 17:29:59 +01:00
wmayer
50d254e7a2 Tests: use the correct value as reference 2024-02-27 08:47:47 -06:00
LemonBoy
bb9a30ac65 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
cc5d4146cf 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
641e3dbbb4 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
64a91968a3 MSVC: fix compiler warnings 2024-02-25 00:12:34 +01:00
André Althaus
0c70b0bd1e Refactor the apply function to be virtual public 2024-02-21 15:04:38 +01:00
André Althaus
a89d450a93 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
28fdceaccd 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
30f5595e2a Reformat files with clang-format 2024-02-17 17:13:14 +01:00
André Althaus
cf627f5ce4 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
565b83d8fe 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