Commit Graph

202 Commits

Author SHA1 Message Date
CalligaroV
3066f74747 Part/Toponaming: makeElementWires
* Renamed enum classes members to lowercaseCapword
 * Moved struct ShapeHasher back to TopoShapeMapper.h
 * Added test for MapperMaker::generated
 * Modifications for clang-tidy warnings
 * Formatting

Signed-off-by: CalligaroV <vincenzo.calligaro@gmail.com>
2024-02-08 13:56:30 +01:00
CalligaroV
d9d6ae825e Merge branch 'main' of https://github.com/FreeCAD/FreeCAD.git into toponamingTopoShapeWire
# Conflicts:
#	src/Mod/Part/App/TopoShape.h
#	src/Mod/Part/App/TopoShapeExpansion.cpp
2024-02-07 23:51:49 +01:00
CalligaroV
728c215372 Part/Toponaming: makeElementWires
* Added test for MapperMaker::generated
 * Renamed spit into splitMkr in the test for MapperMaker::modified
 * Disabled test for TopoShape::makeElementWires

Signed-off-by: CalligaroV <vincenzo.calligaro@gmail.com>
2024-02-07 22:23:03 +01:00
Chris Hennes
31b40ce6a2 Merge pull request #12237 from bgbsww/bgbsww-toponamingMakeRefine
Toponaming: Transfer in makeElementRefine
2024-02-07 15:19:27 -06:00
CalligaroV
1938bbef69 Part/Toponaming: makeElementWires
* Added test for MapperMaker::modified

Signed-off-by: CalligaroV <vincenzo.calligaro@gmail.com>
2024-02-07 15:10:58 +01:00
bgbsww
46230c9a93 Add Test for MakeElementRefine 2024-02-06 15:58:37 -05:00
Adrian Insaurralde Avalos
808e5d9d74 Add Base::Tools::escapeQuotesFromString with corresponding test
To be used to avoid sending unescaped quotes to python console
2024-02-04 16:44:25 -06:00
bgbsww
12fdd27326 Switch to using enum 2024-02-04 09:27:16 +01:00
Adrián Insaurralde Avalos
2adc1bfce4 Test: build Mod test only if the module is being built 2024-02-02 00:04:39 +01:00
CalligaroV
d23b288faf Tests/Toponaming: Add test for simple shapes
* Added test for Tag Info generated by makeShapeWithElementMap
 * Make sure that there's at least one mapped element before checking the element map

Signed-off-by: CalligaroV <vincenzo.calligaro@gmail.com>
2024-02-01 15:19:42 +01:00
CalligaroV
71e42f6a53 Merge branch 'main' into toponamingTopoShapeWire
# Conflicts:
#	src/Mod/Part/App/TopoShape.h
#	src/Mod/Part/App/TopoShapeExpansion.cpp
#	tests/src/Mod/Part/App/TopoShapeExpansion.cpp

Signed-off-by: CalligaroV <vincenzo.calligaro@gmail.com>
2024-01-29 19:41:56 +01:00
bgbsww
ff153e32e4 Merge branch 'main' into bgbsww-toponamingMakeElementShape 2024-01-28 11:19:11 -05:00
bgbsww
ac63598572 Clean code and add tests 2024-01-28 11:04:34 -05:00
Chris Hennes
e24ed34867 Tests/Toponaming: Post-merge cleanup 2024-01-27 14:01:35 -06:00
bgbsww
88b5191b5e Cleaned up complex test (#15)
* Element Map Test

* Rename test and add more assertions

* Reduce test complexity
2024-01-27 12:00:12 -06:00
Vincenzo Calligaro
2e98912266 Tests for makeShapeWithElementMap (#12)
* Tests for makeShapeWithElementMap
 * Added nullShapesThrows tests for the classes derived from <TopoDS_Shape>
 * Added test passing as "sources" parameter of the tested method an empty vector of TopoShapes objects
 * Added test with unmappable sources
 * Added test to find shapes inside other shapes made from the first ones
* Tests for makeShapeWithElementMap with simple shapes
 * Added test to find source shapes' sub-shapes name in the elements maps
 * Added test to find the "MAK" OpCode in the elements maps names

---------

Signed-off-by: CalligaroV <vincenzo.calligaro@gmail.com>
2024-01-27 12:00:12 -06:00
bgbsww
5135564fb4 Rename test and add more assertions 2024-01-27 12:00:12 -06:00
bgbsww
43f4db445a Element Map Test 2024-01-27 12:00:12 -06:00
Chris Hennes
f91d39bac3 Tests/Toponaming: Add test framework for makeShapeWithElementMap 2024-01-27 12:00:12 -06:00
bgbsww
eb7c658a06 Add helper methods 2024-01-26 17:42:51 -07:00
bgbsww
5a68162258 Tests for makeElementShell 2024-01-25 11:13:00 -05:00
bgbsww
9f84fbe9bb Tweak resetElementMap to default to empty defined element map (#12098)
* Tweak resetElementMap tp default to empty defined element map

* [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-24 21:24:08 -06:00
bgbsww
a6ee5f4df9 Merge branch 'main' into bgbsww-toponaming-makeElementFace 2024-01-23 08:14:07 -05:00
Chris Hennes
1a7e3848b9 Merge pull request #12023 from bgbsww/bgbsww-patch-30
Initial code of mapSubElement Test
2024-01-22 16:02:00 -06:00
bgbsww
5586c52069 Merge branch 'main' into bgbsww-toponaming-makeElementFace 2024-01-22 12:50:13 -05:00
Chris Hennes
37ec34df9d Merge pull request #12014 from bgbsww/bgbsww-patch-29
Toponaming ShapeMapper
2024-01-22 11:23:56 -06:00
bgbsww
96b4171c09 Single char constants 2024-01-22 11:29:41 -05:00
bgbsww
31a6eb5a4a lint / review cleanups 2024-01-22 11:01:19 -05:00
bgbsww
541ec563e3 Merge branch 'main' into bgbsww-toponaming-makeElementFace 2024-01-21 15:52:31 -05:00
bgbsww
d4c5906c5c Add tests, reformat to modern C++, clean 2024-01-21 15:34:46 -05:00
bgbsww
22b952f8e4 Improve tests 2024-01-19 20:59:19 -05:00
bgbsww
2699c748c8 Improve tests 2024-01-19 10:49:47 -05:00
Chris Hennes
10d1102b84 Merge pull request #12007 from chennes/toponamingElementNameComparator
App/Toponaming: Add Comparator for mapped elements
2024-01-19 09:20:59 -06:00
bgbsww
a2d15df6df Split test cases 2024-01-18 13:15:21 -05:00
bgbsww
21b7da61b3 Lint and other cleanups 2024-01-18 11:46:15 -05:00
Chris Hennes
0992bae590 Merge pull request #11994 from 3x380V/avoid_fmtlib
Tests: Avoid use of fmtlib when not needed
2024-01-17 21:35:23 -06:00
bgbsww
cfdbf79b2b Initial code of mapSubElement Test 2024-01-17 09:13:39 -05:00
bgbsww
969090b844 Move MapperMaker and MapperHistory out to future PR 2024-01-17 08:55:16 -05:00
Chris Hennes
32d47402b6 Tests/Toponaming: Add tests for ElementNameComparator
This verifies the existing functionality, but does not alter it. Two tests are disabled because they represent cases that the current code does not handle correctly. They are edge cases that are not expected in real code.
2024-01-16 19:25:38 -06:00
bgbsww
f9a4f25048 Tests for transferred TopoShapeMapper objects 2024-01-16 20:11:59 -05:00
Chris Hennes
920dbf9133 Part/Toponaming: Linter cleanup of makeElementWires 2024-01-15 16:39:48 -06:00
Chris Hennes
ed6230093f Part/Toponaming: Refactor makeElementCompound
Refactor to address linter issues, breaking up large methods, renaming variables, etc.
2024-01-15 18:17:32 +01:00
Chris Hennes
60a7f45ece Tests/Toponaming: Add tests for makeElementCompound 2024-01-15 18:17:32 +01:00
Chris Hennes
928c4ce813 App/Toponaming: Add addition TNP methods 2024-01-15 18:17:32 +01:00
Ladislav Michl
7a955c5600 Tests: Avoid use of fmtlib when not needed 2024-01-15 17:38:56 +01:00
Andrei Pozolotin
6a54591bac Resolve #11825 - no automatic quantity conversion: App::anyToQuantity 2024-01-11 11:32:18 -06:00
Stefan Brüns
5b7fe70483 [App] Fix segfault due to missing Py_Initialize in StringIDRefTest
The PyObject desctructor requires an initialized interpreter, otherwise
PyGILState_Ensure crashes.

Fixes #11878
2024-01-10 22:34:04 -06:00
bgbsww
e166c8ccfd Adding additional TNP tests (#11829)
* Initial tests for Chamfer, Fillet, Compound

* Lint cleanup, new tests

* Outline of Extrusion and Revolution

* Use python to define a 2d object to extrude and test

* Refactor; start filling in revolution tests

* Example of parameterized tests in Extrusion, cleanups

* Use gtest framework for parameterised tests

* Rearrange for clarity

* WIP with TEST_P use for posterity

* Switch from parameters to individual tests

* Guess at test failures on other platforms

* Cleanups and Revolution Tests

* Remove temp code

* Switch Revolutions to boundbox test; add Compound subshape count test

* Calculate test volume correctly; lint fixes

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2024-01-06 18:25:44 -06:00
David Carter
343f1b01a0 Material: Material editor enhancements (#11764)
Continues the work of the material subsystem improvements.

Add support for embedded SVG files. These are not the same
as image files so need to be handled differently.

Add the ability to filter materials in the editor when called from
code. This allows programs to select objects supporting specific
models, complete models, older models, etc.

Updated tests, and refactored code.

New models and materials supporting patterns such as used by the
TechDraw workbench.

fixes #11686 - checks for the presense of a model property before
assinging a value. This can happen when a required model definition is
not available.

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2024-01-06 18:11:53 -06:00
bgbsww
a3220eeece Merge branch 'main' into bgbsww-patch-24 2023-12-30 23:25:51 -05:00