Commit Graph

375 Commits

Author SHA1 Message Date
bgbsww
a1ce983035 Toponaming: Missing shape hasher line; fixed cleaned Transformed 2024-08-13 07:07:59 -04:00
bgbsww
71870bd6f3 Toponaming: Touchup cleanup
Includes some header re-ordering from chennes.
2024-07-26 21:39:39 -05:00
bgbsww
e15646d158 Toponaming: Tests, cleanup, and fix axis drawing 2024-07-26 11:49:56 -04:00
wmayer
61c964caa9 MSVC: Suppress warning 2024-07-25 20:34:52 +02:00
wmayer
8deb2e0f0f MSVC: Fix compiler warning 2024-07-25 20:08:10 +02:00
bgbsww
0178e848e4 Toponaming: Clean code, apply remark recommendations and Tweak tests 2024-07-22 12:55:23 -04:00
Chris Hennes
dd86f21130 Merge pull request #15521 from bgbsww/bgbsww-toponamingSaveRestore1plus
Throw exceptions rather than return default 0
2024-07-22 10:46:53 -05:00
wmayer
373533d030 Tests: Add tests for MeshPart 2024-07-22 00:06:23 -05:00
bgbsww
0bddc51805 Refactor all element name pairs into clearer struct names - renames 2024-07-20 16:32:12 -04:00
bgbsww
178c4ec477 Throw exceptions rather than return default 0 2024-07-19 09:09:59 -04:00
bgbsww
63a68b3c1c Throw exceptions rather than return default 0 2024-07-19 08:59:25 -04:00
wmayer
b0676d0578 Tests: Fix warnings: unknown pragma ignored [-Wunknown-pragmas] 2024-07-12 21:53:53 +02:00
bgbsww
5568b40a07 Toponaming: Add missing TNP element name code; rough in more TNP tests (#14561)
* Add missing TNP element name code; rough in more TNP tests

* Update ElementNamingUtils.cpp

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2024-07-08 18:43:42 -05:00
Chris Hennes
2411f9f3b3 Merge pull request #14461 from AjinkyaDahale/sk-fix-12592-bsp-by-knot-trim
[Part][Sketcher] Fix some B-spline trimming issues
2024-07-01 11:28:50 -05:00
CalligaroV
8def1e94dc Part/Toponaming: makeElementWires
* Updated tests

Signed-off-by: CalligaroV <vincenzo.calligaro@gmail.com>
2024-06-26 10:46:36 -05:00
Ajinkya Dahale
16cc6bf56a [Part][test] Add tests for GeomBSplineCurve::Trim() 2024-06-24 21:56:58 +05:30
Chris Hennes
d01ce32a1f Update for LibPack3 (#10337)
* cMake: Add base support for LibPack3

Minor changes to FreeCAD source code to support compiling with Qt 6.5 on MSVC,
and changes to cMake setup to support the new Libpack.

* NETGENPlugin: Fix compilation with MSVC and OCCT 7.8

* Material: Switch to Wrapped_ParseTupleAndKeywords for /fpermissive- on MSVC

* Base: Prevent accidental definition of MIN and MAX by MSVC

* cMake: Prevent accidentally finding an old LibPack

* Material: Wrap another ParseTuple call

* OCCT: Modify includes for 7.8.x

* Part: Change TNP code to use Wrapped_ParseTupleAndArgs

* Spreadsheet: Workaround for MSVC macro pollution

* Mesh: Workaround for MSVC macro pollution

* Base: Remove extra MSVC flag (moved to CMake)

* Tests: Fix compiling with /permissive-

* FEM: Fix Qt warnings about duplicate element names

* cMake: Ensure major version numbers are set

* Address review comments.

* cMake: Further tweaks for LibPack3

* cMake: Modify specification of compiler flags for MSVC

* Main: Remove QtQuick testing code

* cmake: Find Boost before SMESH (which uses it)

* Fixes for LibPack2

* cMake: Another try at importinhg VTK cleanly
2024-06-24 18:25:05 +02:00
wmayer
2f8382ae59 MSVC: Fix compiler warnings
* avoid redefines in Assembly
* explicit cast from size_t to int
* remove unused variables
* avoid implicit cast from double to float
* in test cases replace EXPECT_FLOAT_EQ with EXPECT_DOUBLE_EQ or EXPECT_NEAR when doubles are used
2024-06-20 15:42:16 -05:00
Mihail Dumitrescu
417e6559b4 Add ParallelPlane attachment mode.
It results in an attachment similar to ObjectXY but with the XY plane translated to pass through a selected vertex.

It is most useful to place sketches: pick a plane (XY, XZ, YZ) or another sketch then select a vertex to automatically translate the sketch in the Z-direction. In contrast to the Translate mode it does not change the origin.
2024-06-10 10:47:00 -05:00
wmayer
04cf749a4a Part: Add AttacherEngine of type PropertyEnumeration
This is added to conveniently change the attacher type of a Part object.

Hint: A new property is used to avoid to break project files when opening it with an older version.

See also forum thread: https://forum.freecad.org/viewtopic.php?t=87891
2024-06-03 11:24:09 -05:00
Chris Hennes
11fa271eb5 Test: Support system GTest, and give warning if no submodule (#13662) 2024-06-03 10:40:35 -05:00
wmayer
38d4fa3d6e tests: Add unit tests for getElementTypes() 2024-05-31 11:42:01 +02:00
David Carter
7d3f6e2ad1 Materials: Editor UI enhancements
When creating a new material, assigning the basic
rendering model to the material resulted in an all
black color. This will now be assigned the default
color as specified in the preferences.

The name of the material Properties tab has been
changed to Physical for improved consistency in
the user interface.
2024-05-27 11:35:00 -05:00
David Carter
51be8e7b4e Material: Appearance and Material inspectors
Dialogs to view the Appearance and Material properties of an object

These inspectors are intended to be used when debugging Appearance and
Material issues in a model.

The Appearance inspector displays the appearance properties of an
object. This will be more useful once PR 13792 is merged which migrates
parts to use ShapeAppearance instead of DiffuseColor. This shows each
of the appearance properties per face for the object.

The Material inspector shows the material, models, and properties
assigned to a model. It displays useful debugging information such as
the UUID and file paths associated with eacch of the items. This is
useful when finding and resolving model conflicts.

The material inspector now gives the option of copying the information
to the clipboard.
2024-05-27 10:50:35 -05:00
Chris Hennes
f1690821a3 Toponaming: Test fixes 2024-05-20 12:40:52 -05:00
David Carter
db3701193b Material: Material API fixes
Corrects an issue in the API where a new material may not have a UUID.
Corrected the test case to reflect the changes and better document the
process.

Added a test case for material filters.
2024-05-20 10:43:02 -05:00
bgbsww
2657bbee4d Minor test tweaks, and small fixes to pass tests 2024-05-17 19:14:01 -05:00
bgbsww
7f4d7a20f1 Simplify offset tests 2024-05-17 08:10:43 -04:00
ppphp
4cd8b2ad15 fix some warnings: cmake string quotes and float mark (#13909)
Co-authored-by: liukaiwen <kaiwen.liu@zixel.cn>
2024-05-13 11:55:59 -04:00
bgbsww
84ae6b9b7b Toponaming: bring in missing code fragments in Part 2024-05-12 23:08:06 -04:00
bgbsww
45c4aefaae Rework makeElementChamfer to match current parms, and add PartDesign code for Chamfers 2024-05-12 13:28:20 -05:00
bgbsww
71d96bccac Fix tests, slip in TNP defense 2024-05-07 13:42:21 -04:00
Chris Hennes
0af3ee4851 Merge pull request #13727 from wwmayer/fix_warnings
Fix compiler warnings
2024-05-01 10:29:21 -05:00
Chris Hennes
d0a4cb9a33 Tests: Disable DocumentObserverTest pending refactor
The 'normalized' test fails on Windows Conda, and the overall test class needs work.
2024-05-01 10:28:08 -05:00
wmayer
56f84c8042 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
sliptonic
680792030f Merge pull request #13650 from chennes/firstStartWidget
Start: First start widget
2024-04-29 11:42:50 -05:00
CalligaroV
c3b0fcdccf App/Toponaming: import SubObjectT dependencies for SubShapeBinder
* Fixed a mistake made in getSubObjectListFlatten()
 * Applied modifications according to review comments

Signed-off-by: CalligaroV <vincenzo.calligaro@gmail.com>
2024-04-29 11:42:18 -05:00
CalligaroV
243e20248d App/Toponaming: import SubObjectT dependencies for SubShapeBinder
* Formatted and refactored code imported for the DocumentObject class
 * Formatted and refactored code imported for the SubObjectT class

Signed-off-by: CalligaroV <vincenzo.calligaro@gmail.com>
2024-04-29 11:42:18 -05:00
CalligaroV
ceb5478a37 App/Toponaming: import SubObjectT dependencies for SubShapeBinder
* Added test for SubObjectT::hasSubObject()
 * Added test for SubObjectT::hasSubElement()
 * Added test for SubObjectT::normalize()
 * Added test for SubObjectT::normalized()

Signed-off-by: CalligaroV <vincenzo.calligaro@gmail.com>
2024-04-29 11:42:18 -05:00
CalligaroV
16bdedda2f App/Toponaming: import SubObjectT dependencies for SubShapeBinder
* Added test for DocumentObject::getSubObjectList()

Signed-off-by: CalligaroV <vincenzo.calligaro@gmail.com>
2024-04-29 11:42:18 -05:00
Chris Hennes
3a9547c235 Start: Create 'First Start' screen 2024-04-28 12:57:00 -05:00
Chris Hennes
2aad8ab334 Tests: Ensure MSVC has M_PI
Somewhere in the test suite GTest is including cmath (or something related) and not declaring this, so later includes of it by the tests are being ignored.
2024-04-28 12:56: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
farley
1f9f39fa28 Core: Fix searching model tree does not work for numbers #12723 (#13377)
* Fix problem #12723: Searching model tree does not work for numbers
- Modify ExpressionTokenizer::perform
- Add tests tokenizeCompletion
2024-04-22 10:55:42 -05:00
wmayer
d075a5106f Tests: add unit tests for Color class 2024-04-19 13:07:54 +02:00
wmayer
6e55cd1c3a Base: Fix possible race condition when restarting the application
When restarting the application (e.g. after installing an addon) the application will be closed and a new instance will be launched. Now it can happen that the old instance is still busy writing the config files to disk while the new instance wants to read them in. At this time it's possible that a config file is in an invalid state so that the new instance will ignore it but then starts with a default configuration.
Later when closing the new instance the config files will be overwritten and destroy the user's original settings.

By using a lock file this race condition will be avoided. It uses a timeout of 1 second that should be enough for the old instance to write the files to disk.
2024-04-18 23:07:58 -05:00
wmayer
757d564a7c Tests: add more unit tests for ParameterGrp 2024-04-17 21:45:26 +02: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
0056038ff4 Toponaming/Base: Add ASCII stream output class (#13209)
* Toponaming/Base: Add ASCII stream output class

* Remove the ref from std::string

* Update based on review comments
2024-04-15 17:58:11 +02:00
bgbsww
6291078939 Toponaming/Part: Initialize the hasher so that it operates 2024-04-13 22:41:57 -05:00