Commit Graph

3051 Commits

Author SHA1 Message Date
André Althaus
de6fe29d30 Replace the yellow Part primitive toolbar icons with the blue tree icons 2024-05-19 12:12:48 +02:00
bgbsww
52ed6eb848 Toponaming: Bring in Chamfer, Fillet code and add tests (#14035)
* Toponaming: bring in missing code fragments in Sketcher

* Toponaming: Fix infinite recursion, remove debug cruft, rough in fillet test

* Bring in missing code; fix chamfers

* Toponaming: Add code for fillets and test
2024-05-15 19:43:30 -04:00
bgbsww
d3c5df86ee Toponaming: bring in missing code fragments in Part 2024-05-12 23:08:06 -04:00
Chris Hennes
9fead3682d Update translations 2024-05-12 17:06:56 -05:00
bgbsww
5054cace46 Rework makeElementChamfer to match current parms, and add PartDesign code for Chamfers 2024-05-12 13:28:20 -05:00
wmayer
5b98af4591 Part: Fix memory leaks 2024-05-08 20:01:54 +02:00
bgbsww
9fc744fbe3 Fix tests, slip in TNP defense 2024-05-07 13:42:21 -04:00
bgbsww
3ee0530ac2 Toponaming/Part: Fix fillet/pad bug, add tests 2024-05-07 09:40:48 -04:00
Chris Hennes
a5d8aaa21c Update translations
Also removes Web from translation scripts.
2024-05-06 18:17:53 +02:00
Martin Rodriguez Reboredo
51987dc1ab Fixups with Qt6 enums (#13611)
* Python PySide enums to C++ converter

* Python IntFlags to C++ int in getStandardButtons

* Remove int conversion in mods Python sources
2024-05-06 18:02:18 +02:00
wmayer
44af4555c0 Part: Create CompSolid/Compound/Shell if null before adding a sub-shape
Creating a shape with Part.CompSolid(), Part.Compound() or Part.Shell() is a null shape. In order to allow to append sub-shapes with the add()
method a valid shape must be created beforehand.

This fixes #13208
2024-05-06 17:45:58 +02:00
bgbsww
20cae6c026 Toponaming/Part: unify revolution changes 2024-05-02 18:50:02 -05:00
tomate44
b17f744ed7 add unit test for edge split method 2024-05-01 22:15:09 +02:00
tomate44
f0a72fbe59 Preserve pcurves in TopoShapeEdge.split 2024-05-01 22:15:09 +02:00
wmayer
2ea6bc17b6 Fix various compiler warnings:
* fix -Wunused-parameter
* fix -Wunused-function
* fix -Wunused-private-field
* fix -Wunused-variable
* fix -Winconsistent-missing-override
2024-04-30 16:59:31 +02:00
wmayer
6a6fc7eb4d Part: Remove cyclic dependency to Measure module
Although there is no cyclic dependency between the shared libraries it's still odd to have it on source files
2024-04-30 16:23:23 +02:00
hlorus
74d055e11a [Part/PD] Remove measure tools 2024-04-29 09:27:22 -04:00
hlorus
bed703a6f9 [Measure] Add features, viewproviders and preferences for unified measurement facility 2024-04-29 09:27:22 -04:00
hlorus
eb59021118 [Part] Add handlers for unified measurement facility 2024-04-29 09:27:22 -04:00
hlorus
8524ed6daf [Part] Move VectorAdapter into own file in PartGui 2024-04-29 09:27:22 -04:00
hlorus
dc54fdd5b8 [Part] Move ArcEngine into own file in Gui module 2024-04-29 09:27:22 -04:00
bgbsww
7961e82c66 Toponaming/Part: Fix all getBaseTopoShape calls. Tests and missing code. 2024-04-26 21:15:11 -05:00
Chris Hennes
ead426c6eb Update translations
Note: Web and Start omitted
2024-04-24 13:58:21 -05:00
Chris Hennes
9101454c4d Merge pull request #13495 from wwmayer/material_colors
Support to customize all material colors
2024-04-22 11:09:05 -05:00
wmayer
95b57d4dd4 Part: add unit test for PR #13507 2024-04-20 14:31:59 +02:00
tomate44
efc6fd87a4 Part: fix shape projection of complex BSpline curves 2024-04-19 20:47:51 +02:00
wmayer
17222f2927 Part: Support of material colors in settings 2024-04-19 11:14:00 +02:00
Chris Hennes
b985f6339e Base/Toponaming: Correct string hasher output 2024-04-18 13:25:57 -05:00
Chris Hennes
e7069e6797 Update translations. 2024-04-17 16:50:38 -05:00
bgbsww
0d8631973e Toponaming/Part: Fix hashing, hasher mismatches, and adjust test results to match 2024-04-15 23:00:27 -05:00
Chris Hennes
ed3e1cf544 Merge pull request #13332 from wwmayer/fix_material_issues
Fix material issues
2024-04-15 10:33:29 -05:00
bgbsww
459644be31 TopoShape/Part: Bug fixes; pass Hasher parms, OCCT 7.8 compatibility, ElementMaps correct item count 2024-04-14 13:56:07 -04: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
wmayer
12ef38e66f 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
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
wmayer
e87180b245 Part: fix import of STEP files with colors per face 2024-04-09 22:15:51 +02:00
wmayer
9d4757b301 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
15dcd1e9be 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
262a218b6b Part: fix Part_RefineShape and Part_Section 2024-04-09 22:15:51 +02:00
wmayer
4aa140d066 Mod: code cleanup 2024-04-09 22:15:51 +02:00
wmayer
92b1e77744 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
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
384902c26c 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
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
wmayer
7a7c0081c3 Part: Add overloaded methods of GeomBSplineCurve::approximate 2024-04-03 18:06:00 +02:00
wmayer
c96fd71e4f 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
a995efbe76 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
b710444271 Rewrite PropertyTopoShape::getShape to fix dangling reference 2024-04-01 16:54:59 -05:00