Commit Graph

113 Commits

Author SHA1 Message Date
wwmayer
45d3864942 PD: Add test case for #17184 (#17707) 2024-11-11 18:21:15 -03:00
Eric Price
7680872e41 increase tolerance on helical shapes to avoid crash / broken geometry (#17356)
* increase tolerance on helical shapes to avoid crash

fix #17113
fix #9377
fix #11083

* added test cases for additive and subtractive helix

* fixed whitespace issue, reduced turncount for speed

* relaxed large scale testcases for OCCT 7.3 and below, work around windows CI error #17394

* Further reduce max size in test for buggy Ubuntu OCCT
2024-11-11 17:44:27 +01:00
wmayer
e523eab001 Tests: Add unit test to demonstrate failure of #17553 2024-11-02 23:45:02 +01:00
Eric Price
cf8ad66373 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
wmayer
e3246e13a0 PD: Explicitly switch off AllowCompound for some tests to make them succeed
Fixes #17363
2024-10-21 18:12:40 +02:00
Florian Foinant-Willig
490d6c5abc [PD] Fix Pad uptoface with custom direction (#16539)
* [PD] Fix Pad uptoface with custom direction

* Add unit test
2024-09-24 11:30:01 -05:00
Florian Foinant-Willig
22fbfeddc2 [PD] Fix Pad uptoshape and add unit test 2024-09-22 17:22:36 -05:00
Florian Foinant-Willig
8b9f5bdc4f [PD] fix pad uptoface and uptoshape (#16030)
* [PD] fix Pad UpToFace and UpToShape
* specify struct pointers for Win
* Rename variables for MSVC compatibility - windows.h defines 'near' and 'far' as macros
* Add unit test

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2024-09-19 08:51:18 -05:00
bgbsww
0f53f2195d Add override flag for recomputes; set it in relevant tests with old files. 2024-09-16 17:49:35 +02:00
Florian Foinant-Willig
355610cfb3 [PD] Fix helix placement 2024-09-09 18:11:25 +02:00
bgbsww
85c1f5c47c Toponaming: Fix ctrl selection issues by looking up element names and setting up detail path 2024-09-02 18:28:11 +02:00
bgbsww
24bb499c1f Cleanup element map in Revolution and add test (#15959) 2024-09-02 17:59:44 +02:00
bgbsww
34030c9ece Toponaming: Run black on the entire toponaming python test file. 2024-08-26 11:19:47 -05:00
bgbsww
8c08549f5a Update to Toposhape versions and fix shapebinder references with test (#16036)
* Update to Toposhape versions and fix shapebinder references with test

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

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2024-08-26 10:50:18 -05:00
Florian Foinant-Willig
ffb2ebe4c6 [PD] helix fix 2024-08-24 20:38:58 -05:00
bgbsww
c8c657eefe Fix shape color / materials issues in fuse 2024-08-22 18:53:55 -05:00
wmayer
0dae7353d1 PD: Make PD tests more robust
If in the user settings the refinement is switched off several PD tests will fail. This change explicitly sets the Refine property to True to guarantee correct behaviour
2024-08-18 11:50:33 -05:00
bgbsww
a1ce983035 Toponaming: Missing shape hasher line; fixed cleaned Transformed 2024-08-13 07:07:59 -04:00
bgbsww
25ba8ab223 Toponaming: Fix transformed; abstract index element name generation 2024-08-10 23:02:05 -04:00
bgbsww
aab0b31aec Toponaming: Make FeatureThickness elementMap aware 2024-08-09 16:40:07 -04:00
bgbsww
4925957185 Toponaming: fix loft mistake and complete test 2024-08-08 09:12:48 -05:00
bgbsww
2b97b20a03 Toponaming: Additional element map changes to transform 2024-08-08 09:09:46 -05:00
bgbsww
4afbe73f51 Toponaming: Fix PropertyTopoShape restore; tweak Loft test; missing TopoShape method. 2024-08-07 20:31:21 -05:00
Chris Hennes
74e5c3fafb Revert "[PD] Revert 316506f, back to shell algo for some helix cases (#15678)"
This reverts commit dcfae6a897.
2024-08-06 18:54:46 -05:00
Chris Hennes
4801300913 Merge pull request #15734 from bgbsww/bgbsww-toponamingFixTopoShapeToHaveHasher
Toponaming: make sure TopoShapes have Hashers
2024-08-05 11:17:46 -05:00
Florian Foinant-Willig
dcfae6a897 [PD] Revert 316506f, back to shell algo for some helix cases (#15678)
* [PD] Revert 316506f, back to shell algo for some helix cases

* fix test accuracy
2024-08-05 10:40:00 -05:00
bgbsww
19b63630c6 Toponaming: reformat tnp tests 2024-08-04 17:57:38 -04:00
bgbsww
cd128984e1 Toponaming: make sure toposhapes have hashers 2024-08-02 21:42:16 -04:00
bgbsww
a348a1bc82 Toponaming: Update tests, implement missing subtractive operation tests,
fix helix and revolution
2024-07-30 09:12:58 -05:00
David Carter
233fcd1416 Material: PartDesign DiffuseColor custom attribute
PartDesign features did not inherit the custom attribute for
DiffuseColors as expected. The inheritance chain was incorrect. Also
added tests to ensure it's available.

fixes #15364
2024-07-29 11:24:46 -05:00
bgbsww
6a5207f7a8 Toponaming: Cleanup review notes 2024-07-23 23:58:56 -05:00
luzpaz
a71f49f4f6 Fix trailing newlines and minor typo fixes 2024-07-23 16:16:30 +02:00
Chris Hennes
2e39b4167f Merge pull request #15177 from shaise/Fix-Python-getElement
[TNP] Fix python get element. partially fixes #15095
2024-07-13 20:53:03 -05: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
wmayer
fadb607054 Tests: Make PD and Sketcher tests independent of user settings
The Refine property must be explicitly set as otherwise some tests will break because of different user settings
2024-07-08 11:19:36 -05:00
bgbsww
f823f3fd8a Toponaming: Tweak test framework to allow leaving documents for examination 2024-07-08 11:12:45 -05:00
shai
2d1edacaa9 Add fixes suggested by @bgbsww 2024-07-04 19:53:09 +03:00
shai
b08714116c Fix python shape setElement function. Partially fixes #15095 2024-07-04 11:48:44 +03:00
wmayer
3abd1989a9 PD: Rename duplicated test method
Fixes #14795: testPartDesignElementMapSketch: Duplicate test method name
2024-07-01 11:18:46 -05:00
Max Wilfinger
e490531510 Activate Part/Part Design check and refine preferences by default (#14406)
* Activate Part/Part Design check and refine preferences by default

* added bool in .ui

* Update tests

* Fix Sketcher tests
2024-07-01 10:50:42 -05:00
bgbsww
47f94afcba Toponaming: Add tests for subshaoebinder, attachment problems. 2024-06-28 11:57:43 -05:00
Chris Hennes
6c41f92980 TNP: Update test to use AttachmentSupport 2024-06-26 10:46:36 -05:00
Syres916
49e214729c Part/Toponaming: makeElementWires
* Added tests developed by Syres916
2024-06-26 10:46:36 -05:00
bgbsww
3c3709cb5d Toponaming: Fix save and restore of elementmaps 2024-06-23 23:33:12 -04:00
bgbsww
4c3fc869fe Toponaming: Check for selection mapped element name 2024-06-22 17:10:54 -05:00
Florian Foinant-Willig
0b4e01047f Fix can't pad a sketch on datum plane (#14397)
* Fix can't pad a sketch on datum plane

* Add a unit test for Pad a sketch on datum plane
2024-06-10 11:21:32 -05:00
bgbsww
040502280f Toponaming: Cleanup verified face calls 2024-05-20 17:48:01 -05:00
bgbsww
9decb98c71 Toponaming: adjust tests 2024-05-18 14:12:04 -05:00
bgbsww
2657bbee4d Minor test tweaks, and small fixes to pass tests 2024-05-17 19:14:01 -05:00
bgbsww
b72a8c4222 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