Commit Graph

1283 Commits

Author SHA1 Message Date
hlorus
c054fe64b3 [Part] Move ArcEngine into own file in Gui module 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
wmayer
c3f9e6eed7 Part: Support of material colors in settings 2024-04-19 11:14:00 +02:00
Chris Hennes
6d504a0351 Update translations. 2024-04-17 16:50:38 -05:00
wmayer
74f614a93d Fix handling of transparency / Restore colour per face
The Materials module does a conversion from float to double when saving the transparency and again a conversion from double to float to double
when restoring it. This causes a considerable loss of accuracy so that the representation in percent leads to different numbers.

Using consistently some helper functions to do a proper conversion from float to long and back fixes the problem.

The new property ShapeAppearance is a PropertyMaterialList and always read after the DiffuseColor property when restoring a document.
Thus, the  method onChanged() doesn't override DiffuseColor when restoring a document. Additionally, the method finishRestoring() is re-implemented
to set the colours per face in case DiffuseColor has defined multiple colors.
2024-04-10 13:32:58 +02:00
wmayer
0a5a1a5c32 Part: fix import of STEP files with colors per face 2024-04-09 22:15:51 +02:00
wmayer
8cba167241 Part: fix some further regressions:
* Correctly load a file if colors are set per face
* Result of boolean operation is correctly colored if source objects have different colors
* Result of compound is correctly colored if source objects have different colors
2024-04-09 22:15:51 +02:00
wmayer
b7bc6ad1e6 Gui: add security checks to view provider extensions because they can be accessed if a document objects is not yet attached 2024-04-09 22:15:51 +02:00
wmayer
9b7a7b9756 Part: fix Part_RefineShape and Part_Section 2024-04-09 22:15:51 +02:00
wmayer
36d043cbbd Mod: code cleanup 2024-04-09 22:15:51 +02:00
wmayer
a19afb0f7d Gui: fix ViewProviderGeometryObject
* fix several linter warnings
* remove code that cannot be executed: inside the constructor it cannot ever happen that getObject()
  returns a valid object
* in ViewProviderGeometryObject::handleChangedPropertyName call the method of the direct base class
  as otherwise this may break the mechanism in the future
* Shape is a property of an extension module -> move its handling to ViewProviderPartExt
2024-04-09 22:15:51 +02:00
wmayer
b09289471d Gui: Fix broken toolbars layout due to MaterialWorkbench
The explicit activation of the MaterialWorkbench breaks the toolbars layout for every start. When fixing it manually it will be broken
again after the next start.

Because the core doesn't depend on the Material module it's a no-go to add an explicit runtime dependency to the corresponding workbench.

Since the Part module depends on the Materials module and the PartGui on MatGui the correct way is to let Part an PartGui load their
dependencies.
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
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
wmayer
8aee9c35a4 Part: use of TaskDialog::addTaskBox 2024-03-26 15:57:20 +01:00
wmayer
2c4fbc5427 Part: make GUI for ProjectOnSurface feature 2024-03-26 15:54:13 +01:00
wmayer
969106d2a7 Part: add ViewProviderProjectOnSurface 2024-03-26 15:54:13 +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
wmayer
d5b90e50af Gui: Apply clang-format on DlgProjectionOnSurface and fix linter warnings 2024-03-24 00:54:57 +01:00
bgbsww
28cb508489 Toposhape/Part: Cleanup FeatureFillet, FeatureChamfer and dependencies 2024-03-19 11:10:18 -04:00
Zheng, Lei
4f3d23fe98 Toposhape/Part: Transfer in FeatureFillet, FeatureChamfer and dependencies 2024-03-18 22:05:25 -04:00
Chris Hennes
1f94569b93 Part: Remove trailing spaces from translations 2024-03-12 22:42:19 -05:00
Chris Hennes
8a6bc53dd6 PD: Translate attachment task title
Eliminate default title, which is untranslatable.
2024-03-11 18:08:22 +01:00
Chris Hennes
da36c0c1f3 Merge pull request #12066 from 3x380V/time_cleanup
Base: Use std::chrono for time manipulation
2024-03-05 15:47:33 -06: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
Ladislav Michl
e4d304f934 Base: Implement TimeElapsed
Some instances of TimeInfo serve the sole purpose of measuring time
duration. Using system time is unfortunate as it returns wall clock,
which is not guaranteed to be monotonic. Replace such a usage with
the new TimeElapsed class based on steady clock.
2024-03-05 12:29:24 +01:00
Chris Hennes
16016e2d2b Part: Correct context for selection filter 2024-03-05 10:39:25 +01: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
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
Max Wilfinger
f6f8243b7e [Material] Adjust default material appearance (#12380) 2024-02-17 20:07:44 -06:00
LemonBoy
7f5d89fa19 Part Attacher: Implement 1D intersection for attachments (#12328)
* PD: Implement 1D intersection for attachments

Extract a line from the intersection of two faces.

Closes #6870

* fixup! Use Handle macro

For some reason I don't fully understand yet the CI was failing, let's
see if this fixes the compilation errors.

* fixup! Add missing(?) header

Well, it compiles just fine on my system...

* fixup! Be more specific in error messages
2024-02-13 17:45:01 -03:00
LemonBoy
c0e318c6d0 Part Grid: Exclude the grid group from bbox computation (#12349)
Fixes the problem where View_FitAll would compute a huge bounding box
when the infinite grid is enabled.

Closes #11570

Co-authored-by: wwmayer <werner.wm.mayer@gmx.de>
2024-02-13 17:42:51 -03:00
wmayer
cc8452a545 Part: use of ShapeMapHasher for code simplification 2024-02-12 12:02:17 -06: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
LemonBoy
82582ace52 Clear projected shape when changing extrude height
When the height is zero no solid is produced, the code was thus showing
the result of the previously selected projection height.

Closes #12113
2024-02-12 11:54:48 -06:00
Andrei Pozolotin
4ff2ee43d2 Resolve #12235: labels in Mod/Part/Gui/TaskAttacher.ui 2024-02-12 11:29:51 -06:00
bdieterm
62a6fab19b Gui: add explicit transparency specification 2024-01-21 17:41:31 +01:00
Chris Hennes
14d4ea2416 Merge pull request #11883 from wavexx/pch_build_fix
Fix build with precompiled headers
2024-01-16 14:06:34 -06:00
bgbsww
8abd09398a Add support for OCCT 7.8.0 (#11909) 2024-01-09 19:47:25 -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
Yuri D'Elia
40994793c1 Part: Fix build with pch
Move QtAll inclusion (which includes GL itself) after manually including
<GL/glext.h> to correctly get ARB extensions.
2024-01-02 19:28:50 +01:00
Yorik van Havre
a679c8b818 merged crowdin translations 2023-12-20 09:27:37 +01:00
Yorik van Havre
f78959fab3 Updated ts files 2023-12-20 09:27:37 +01:00
sliptonic
3f33cec4ee Merge pull request #11633 from mwganson/partmirroring
[Part::Mirror] fix bug where selection gate was not getting removed o…
2023-12-11 11:05:56 -06:00
André Caldas
560898907b Avoids using getNameInDocument() to test if DocumentObject is attached to a Document.
This patch substitutes by isAttachedToDocument() (almost) everywhere where
getNameInDocument() is used for this purpose.

The very few places not touched by this patch demand a (just a little) less trivial change.
When we change the returning type of getNameInDocument() to std::string,
those places will be easily found, because they shall generate a compiler error
(converting std::string to bool).

Rationale:
The fact that getNameInDocument() return nullptr to indicate
that the object is not attached to a document is responsible for lots of bugs
where the developer does not check for "nullptr".

The idea is to eliminate all those uses of getNameInDocument() and, in the near future,
make getNameInDocument() return always a valid std::string.
2023-12-11 17:37:58 +01:00
mwganson
4dddfa79fb [Part::Mirror] fix bug where selection gate was not getting removed on cancel button clicked 2023-12-04 12:40:10 -06:00