Commit Graph

3029 Commits

Author SHA1 Message Date
Chris Hennes
1ec93fdbc2 Update translations
Note: Web and Start omitted
2024-04-24 13:58:21 -05:00
Chris Hennes
2326d3ce4c Merge pull request #13495 from wwmayer/material_colors
Support to customize all material colors
2024-04-22 11:09:05 -05:00
wmayer
90a9020ed4 Part: add unit test for PR #13507 2024-04-20 14:31:59 +02:00
tomate44
1a2e922dce Part: fix shape projection of complex BSpline curves 2024-04-19 20:47:51 +02:00
wmayer
c3f9e6eed7 Part: Support of material colors in settings 2024-04-19 11:14:00 +02:00
Chris Hennes
7ae62d74bf Base/Toponaming: Correct string hasher output 2024-04-18 13:25:57 -05:00
Chris Hennes
6d504a0351 Update translations. 2024-04-17 16:50:38 -05:00
bgbsww
a4dd600ec6 Toponaming/Part: Fix hashing, hasher mismatches, and adjust test results to match 2024-04-15 23:00:27 -05:00
Chris Hennes
87839c9f8b Merge pull request #13332 from wwmayer/fix_material_issues
Fix material issues
2024-04-15 10:33:29 -05:00
bgbsww
a88e7baff5 TopoShape/Part: Bug fixes; pass Hasher parms, OCCT 7.8 compatibility, ElementMaps correct item count 2024-04-14 13:56:07 -04:00
bgbsww
6291078939 Toponaming/Part: Initialize the hasher so that it operates 2024-04-13 22:41:57 -05:00
Zheng, Lei
6c6dce236d Bring in missing code 2024-04-11 18:20:26 -04: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
bgbsww
c9d8bdf13d Toponaming/Part: Add deprecation comments, clean up code 2024-04-09 21:17:08 -04:00
Zheng, Lei
82c3e107d7 TopoShape/Part: Bring in PartDesign dependencies 2024-04-09 21:17:08 -04: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
3a34fe080a 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
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
wmayer
ba27d6d92d Part: Add overloaded methods of GeomBSplineCurve::approximate 2024-04-03 18:06:00 +02:00
wmayer
d92267c6a7 Fix several compiler warnings
* fix -Winconsistent-missing-override
* fix -Wunused-but-set-variable
* fix -Wunused-parameter
* fix -Wunused-lambda-capture
* fix -Wunused-private-field
* fix -Wpessimizing-move
2024-04-03 10:04:56 +02:00
CalligaroV
66912a6810 Part/Toponaming: WireJoiner - use std::hash with OCC_VERSION_HEX >= 0x070800
* Added precompiler directive to use std::hash instead of HashCode(INT_MAX) if OCC_VERSION_HEX >= 0x070800

Signed-off-by: CalligaroV <vincenzo.calligaro@gmail.com>
2024-04-02 17:23:56 -05:00
bgbsww
99da05f8a6 Rewrite PropertyTopoShape::getShape to fix dangling reference 2024-04-01 16:54:59 -05:00
Chris Hennes
8a6bb8884b Merge pull request #13196 from bgbsww/bgbsww-toponamingCompSolidPyImp
Toponaming/Part move in PyImps
2024-04-01 11:30:44 -05:00
bgbsww
c8d54181d4 Add Tests 2024-03-31 09:32:06 -04: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
3fadb1f40b Merge pull request #13197 from bgbsww/bgbsww-toponamingAppPartPy
Toponaming/Part:  move in  AppPartPy
2024-03-28 13:57:30 -05:00
Chris Hennes
49451b3c7f Merge pull request #13154 from chennes/translations20240325
Update translations and fix script
2024-03-28 13:51:39 -05:00
Zheng, Lei
75c78369c7 Toponaming/Part: move in remaining ifdef methods and the new TopoShapePy methods 2024-03-28 13:09:14 -04:00
bgbsww
4a0e57907b Toponaming/Part Tests 2024-03-28 13:09:14 -04:00
Zheng, Lei
401b03bdff Toponaming/Part: move TopoShapePyImp ifdef methods in 2024-03-28 13:09:14 -04:00
bgbsww
b690aac305 Toponaming/Part: Rework and clean python interface and add tests 2024-03-28 13:09:09 -04:00
bgbsww
b241c0d4e6 Toponaming/Part: Rework and clean python interface and add tests 2024-03-28 12:47:33 -04:00
Chris Hennes
a84255dde8 Merge pull request #13156 from bgbsww/bgbsww-toponamingTopoShapePyImp2
Toponaming/Part: move ToposhapePyImp get methods into place
2024-03-28 09:18:56 -05:00
Chris Hennes
ada6c62e14 Merge pull request #12535 from CalligaroV/toponaming-WireJoiner
Part/Toponaming: Transfer WireJoiner
2024-03-28 09:17:49 -05:00
Zheng, Lei
5663ecfd86 Transfer in makeCompound python interface and other tnp clauses into AppPartPy 2024-03-28 09:01:31 -04:00
Zheng, Lei
8f5394f2f2 Toponaming/Part: move Toposhapepy get methods in 2024-03-28 09:01:31 -04:00
tomate44
d2f43e0d2c TopoShapePy: enable multithreading in function distToShape 2024-03-28 11:00:27 +01:00
tomate44
5603c697d0 TopoShapePy: add optional tolerance to function distToShape 2024-03-28 11:00:27 +01:00
bgbsww
e75b5db8c7 Toponaming/Part: remove senseless voids 2024-03-27 08:49:51 -04:00
wmayer
8aee9c35a4 Part: use of TaskDialog::addTaskBox 2024-03-26 15:57:20 +01:00
wmayer
c649fd3d09 Part: add export macro for Windows builds 2024-03-26 15:54:13 +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
wmayer
0bb9399806 Part: make projection on surface parametric 2024-03-26 15:54:13 +01:00