Commit Graph

259 Commits

Author SHA1 Message Date
David Carter
00c57a9d08 Materials: External Modules Part 1
Refactored code to support local and external material sources

This is the first PR in a series to support external modules. External
modules allow materials to be stored in external data sources such as
databases or web services. No new functionality is introduced in this
PR, rather it is a refactoring of code that will allow for changes to
be introduced in future PRs. Minor performance improvements have also
been made in the model and material managers.

The Python API has been enhanced for many data types to allow for
modification within Python.
2025-03-18 20:33:10 -05:00
tritao
cdab9c7837 CMake: Cleanup targets with transitive dependencies 2025-03-17 12:12:06 +00:00
Chris Hennes
1a2070c36f Merge pull request #19636 from kadet1090/color-in-base
Base: Move App::Color to Base
2025-03-02 16:36:40 -06:00
Benjamin Bræstrup Sayoc
ee1c73cd04 Build: suppress warnings from 3rd party libraries
Warnings from 3rd parties are not relevant and are only polluting the warning output. Marking these libraries as SYSTEM suppresses warning.

https://gcc.gnu.org/onlinedocs/cpp/Invocation.html#index-I
https://gcc.gnu.org/onlinedocs/cpp/System-Headers.html
2025-02-25 14:39:05 +00:00
Chris Hennes
30af56d860 Sketcher Tests: add [[maybe_unused]] 2025-02-25 14:35:12 +00:00
Joao Matos
15076cb504 Core: Move PyCXX library to src/3rdParty. 2025-02-24 16:36:06 +00:00
bofdahof
6f84cd5971 current src path no longer required 2025-02-22 20:48:30 -06:00
Kacper Donat
13fbab9e42 Base: Move App::Color to Base
Every basic data type is stored in Base module, color is standing out as
one that does not. Moving it to Base opens possibilities to integrate it
better with the rest of FreeCAD.
2025-02-17 21:10:26 +01:00
Benjamin Bræstrup Sayoc
34a77cfbb7 Tests: use QStringLiteral 2 2025-02-17 12:44:27 +01:00
tritao
80b299bb88 Base: Move zipios library to 3rdParty folder. 2025-02-14 13:08:28 -06:00
Chris Hennes
ec050db9a8 Merge pull request #18791 from CalligaroV/toponaming-ElementMapVersion-code-from-LS3
[Toponaming] Import code releted to _ElementMapVersion from LS3
2025-02-14 10:54:38 -06:00
Chris Hennes
b56cdcde02 Tests: remove superfluous NOLINTs 2025-02-12 14:22:41 -06:00
Chris Hennes
a3004c2c0a Merge pull request #19142 from hyarion/refactor/add-template-addobject
Add new addObject<T>() function
2025-02-11 09:42:47 -06:00
Benjamin Nauck
2107e60304 Mod: Use new GroupExtension::addObject<T>(...) 2025-02-10 18:35:38 +01:00
Benjamin Nauck
265b58c034 Mod: Use new addObject<T>(...) using regex 2025-02-10 18:35:38 +01:00
Benjamin Bræstrup Sayoc
1c0774563d Material: Use QStringLiteral 2025-02-10 18:32:45 +01:00
Ajinkya Dahale
fd67538dec [Sketcher][test] Divide SketchObject tests into multiple files
...for managability.
2025-01-30 09:34:03 +01:00
Ajinkya Dahale
bae501e493 [Sketcher][test] Move helper functions away for reusability
...in other tests
2025-01-30 09:34:03 +01:00
Ajinkya Dahale
d06349e3ac [Sketcher][test] Add new test for internal geometry deletion
...when some are "used"
2025-01-16 15:56:21 +05:30
Ajinkya Dahale
10f4fb866e [Sketcher][test] Add tests for B-spline operations 2025-01-16 15:55:14 +05:30
Ajinkya Dahale
6e48d338b7 [Sketcher][test] Tests for expose/delete internal geometry 2025-01-16 15:52:03 +05:30
Ajinkya Dahale
bb11cb52f5 [Sketcher][test] Create test for getConstraintAfterDeletingGeo+
[Sketcher] Add null case to constraint change on deletion checks
2025-01-16 15:52:02 +05:30
Kacper Donat
a71a67408b Part: Use TopoShape instead of TopoDS_Shape
This changes Attacher to use more our own TopoShape class which is more
information rich.
2025-01-04 16:32:52 +01:00
Vincenzo Calligaro
b43394de2d Toponaming: import code related to ElementMapVersion from LS3
*Added test

Signed-off-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>
2025-01-03 14:12:04 +01:00
Mark Ganson TheMarkster
27889739bd [Spreadsheet] fix isValidAlias() (#18567) 2024-12-23 14:18:30 -03:00
Ladislav Michl
0b3adee2ab Base: Quantity: return std::string 2024-12-23 17:48:42 +01:00
wwmayer
dd1419cd5f Test: Support of parallel execution of reader tests (#18587)
* Tests: Initialize xerces sub-system in order to parse XML files

* Test: Support of parallel execution of reader tests

Fixes #18549
2024-12-20 10:42:02 -06:00
David Carter
ddf48e0daa Materials: Change display of Quantity values
The default display type of quantity objects is fixed point resulting
in insufficient accuracy when changing unit systems, or when the values
are small. This fix changes the default format from 'Fixed' to the more
apt 'Default' format. This allows the displayed values to scale as
appropriate.

Fixes #18149
2024-12-20 11:31:43 -05:00
efferre79
70ec5a7583 cmake fixes for external OndselSolver building (#18379)
* Assembly: fix building with external OndselSolver

This commit pairs with f35b075e271e9cb3451f3439f7dc0274841a0838.
It solves two issues:

- remove hardcoded includes of 3rdparty files
- add missing include_directories()

* Assembly: add check for external OndselSolver includes
2024-12-13 10:46:46 -06:00
marioalexis
4c492621fc CMake: Decouple internal SMESH build from Fem build - fixes #18287 2024-12-09 12:09:30 -05:00
Chris Hennes
3134cd5d8c Merge pull request #17315 from mwganson/ssclearall
[Spreadsheet] avoid removing user dynamic properties when clearing ce…
2024-12-06 11:57:45 -05:00
Ajinkya Dahale
4e476b9c78 [Sketcher][test] Add and use helper function to get points of interest 2024-12-04 00:57:41 +05:30
Ajinkya Dahale
30e95ee86a [Sketcher] Refactor SketchObject::trim()
DO NOT MERGE because not complete: not all constraints are not transferred.

Includes:

* Adjust `deriveConstraintsForPieces` for trim
* Make sure new points are constrained on the cutting edges
* Add constraints at trim end(s) dependent on pre-exisiting ones with cutting curve(s). Also change tests to reflect that auto-coincidence can now be applied to non-periodic curves as well.

Known issue(s):
* Some redundant constraints may be added under certain circumstances (e.g. in
presence of perpendicular-via-point)
2024-12-04 00:57:40 +05:30
Ajinkya Dahale
75a347490e [Sketcher] Add tests for split and trim
Includes:
* Tests for splitting and trimming of various types of curves
* Assertions on constraints expected to be added on these curves
2024-12-04 00:57:40 +05:30
Ajinkya Dahale
03b143a0d1 [Sketcher][test] Add unit tests for SketchObject::getPoint() 2024-12-04 00:57:39 +05:30
wmayer
c07df6b392 Test: Add unit test to read in 3MF file 2024-11-28 19:36:58 +01:00
Chris Hennes
e669a58941 Spreadsheet: Add tests for validAddressName and validAliases 2024-11-26 17:51:57 -06:00
Jacob Oursland
960f4e4d63 CMake: Add missing target_link_directories() for OCCT. 2024-11-26 16:03:08 -05:00
Chris Hennes
f24c7da793 Spreadsheet: Add C++ test framework 2024-11-25 23:09:35 -06:00
wmayer
10e9d09763 Tests: Add unit test for PR #16576 2024-11-22 12:02:30 +01:00
wmayer
4a4618f7d7 Tests: Add unit test to explore a null shape 2024-11-22 10:52:45 +01:00
Eric Price
44305ffc89 Part: bugfix #17468 recursively unpack compounds for boolean fuse (#17469)
* fix #17468  recursively unpack compounds for boolean fuse

* fix and into &&, add ctest case for multifuse with compounds and recursive compounds

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* remove unneeded duplicated code - allow Part::Common to be created with a single object (compound or shape) - will result in Unity and possibly a warning message

* prevent endless loop in case of endless recursive compounds as suggested in chat

* Update src/Mod/Part/App/FeaturePartFuse.cpp

Co-authored-by: Benjamin Nauck <benjamin@nauck.se>

* implemented suggestion by wwmayer

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Nauck <benjamin@nauck.se>
2024-11-11 17:51:56 +01:00
wmayer
6f36a2124f Test: Add unit test for pad 2024-10-26 15:39:04 +02:00
wmayer
d5a9a8ae38 Test: Add test for MeasureDistance with two circles 2024-10-23 23:07:49 +02:00
Eric Price
aba60775f6 Fix boolean operations (#17119)
* add BRepAlgoAPI wrapper files to CMakeList

* introduce wrapper for BRepAlgoAPI_BooleanOperation and derivatives, set sensible default Fuzzyness for boolean operations

* allow default fuzzyness to be set in settings - including off

* backwards compatibility with OCCT 7.3.3 - removed newer paramateres from wrapper

* added missing header

* reverted src/Mod/Part/App/OpenCascadeAll.h to original state

* implement some changes suggested by @wwmayer

* removed unneeded destructor definitions

* moved getDefaultFuzzyValue into its own helper class

* removed unneeded references to base class default constructor

* default to SetRunParallel(Standard_True) as suggested by @FlachyJoe

* fixed license header as requested

* Added new method to autocalculate fuzzyness to BooleanOperation base class and use it for those parts that do not call the obsolete constructor but also do not set precision

* implemented static variable solution as suggested by @wwmayer

* added helix for test case

* Refactoring FCRepAlgoAPI to FCBRepAlgoAPI

* Added Test Case (fuse cylinder with helix with different working and non-working Fuzzy values)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* increased default value of FuzzyBoolean and made tests more robust for compatibility with OCCT 7.3

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fixes for FREECAD_USE_PCH - allow testing of FREECAD_USE_PCH on linux with cmake switch (default OFF)

* removed surplus line - wasn't needed after all

* included precompiled as instructed

* set anti-corruption flag in boolean operations, ensures source shape is not damaged in OCCT 7.1 and higher

* fix #17085

* disable subtests that were too specific for now

* fixed all CLI tests - see comments in Pull Request https://github.com/FreeCAD/FreeCAD/pull/17119#issuecomment-2420772452

* Update src/Mod/PartDesign/PartDesignTests/TestTopologicalNamingProblem.py

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* remove surplus tests from github suggestion interface bug

* hide the BooleanFuzzy variable - can now be only set by manually editing the config file
i
in FCParamGroup "Boolean"
<FCFloat Name="BooleanFuzzy" Value="10.000000000000"/>

* Suggestion by @FlachyJoe - add validity checks to the base and tool shape in any direct boolean op

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>
2024-10-21 18:38:51 +02:00
bgbsww
891f012264 Fix #16013 (#16090)
* Fix #16013

* Fix #16013
2024-09-02 18:00:47 +02:00
bgbsww
e4a509cc77 Toponaming: Remove all FC_USE_TNP_FIX protected old code 2024-08-26 11:12:48 -05:00
CalligaroV
c8e1bea243 Part/Toponaming: use TopoShape::getShape() in PartFeatures.cpp tests and TopoShapeMakeElementRefine.cpp tests
* Replace TopoShape::getValue() with TopoShape::getShape() to test the size of element maps
 * Update the expected values

Signed-off-by: CalligaroV <vincenzo.calligaro@gmail.com>
2024-08-24 19:54:33 -05:00
bgbsww
cb3df1d59c Toponaming: Fuse call makeElementRefine; remove deprecated refineSha… (#15897)
* Toponaming:  Fuse call makeElementRefine; remove deprecated refineShapeIfActive
* Part/Toponaming: import code for MultiFuse::execute() from LS3
* added expected values of testRefine

Co-authored-by: Zheng, Lei <realthunder.dev@gmail.com>
Co-authored-by: CalligaroV <vincenzo.calligaro@gmail.com>
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2024-08-18 11:49:05 -05:00
bgbsww
8b25341a7f Toponaming: Touchup cleanup
Includes some header re-ordering from chennes.
2024-07-26 21:39:39 -05:00