Commit Graph

114 Commits

Author SHA1 Message Date
wmayer
007b98df0e PD: Add test case to show the fix for the crash with active objects 2024-11-28 17:15:39 +01:00
wwmayer
7a0154d1b1 PD: Add test case for #17184 (#17707) 2024-11-11 18:21:15 -03:00
Eric Price
f90c6f56d3 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
bd813f1df0 Tests: Add unit test to demonstrate failure of #17553 2024-11-02 23:45:02 +01: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
wmayer
91ccd0ea07 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
1d204f57ec [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
8161537def [PD] Fix Pad uptoshape and add unit test 2024-09-22 17:22:36 -05:00
Florian Foinant-Willig
e157f0616a [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
16129930ab Add override flag for recomputes; set it in relevant tests with old files. 2024-09-16 17:49:35 +02:00
Florian Foinant-Willig
05f7047c66 [PD] Fix helix placement 2024-09-09 18:11:25 +02:00
bgbsww
5a1275ad60 Toponaming: Fix ctrl selection issues by looking up element names and setting up detail path 2024-09-02 18:28:11 +02:00
bgbsww
d1ac4551aa Cleanup element map in Revolution and add test (#15959) 2024-09-02 17:59:44 +02:00
bgbsww
d8fcd79dbe Toponaming: Run black on the entire toponaming python test file. 2024-08-26 11:19:47 -05:00
bgbsww
5c2bd8b57e 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
096c5d215b [PD] helix fix 2024-08-24 20:38:58 -05:00
bgbsww
9de8fc9bec Fix shape color / materials issues in fuse 2024-08-22 18:53:55 -05:00
wmayer
d1c62470be 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
0ab5887fe1 Toponaming: Missing shape hasher line; fixed cleaned Transformed 2024-08-13 07:07:59 -04:00
bgbsww
5b7e03013e Toponaming: Fix transformed; abstract index element name generation 2024-08-10 23:02:05 -04:00
bgbsww
04d44075f2 Toponaming: Make FeatureThickness elementMap aware 2024-08-09 16:40:07 -04:00
bgbsww
fcd6d10748 Toponaming: fix loft mistake and complete test 2024-08-08 09:12:48 -05:00
bgbsww
4fd5b0b562 Toponaming: Additional element map changes to transform 2024-08-08 09:09:46 -05:00
bgbsww
a0b44f8405 Toponaming: Fix PropertyTopoShape restore; tweak Loft test; missing TopoShape method. 2024-08-07 20:31:21 -05:00
Chris Hennes
9b898346a7 Revert "[PD] Revert 316506f, back to shell algo for some helix cases (#15678)"
This reverts commit 50add521d67939bfac2b259e54b77600fa03af25.
2024-08-06 18:54:46 -05:00
Chris Hennes
3deb8d96d2 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
84e25ed38d [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
8825e5dce1 Toponaming: reformat tnp tests 2024-08-04 17:57:38 -04:00
bgbsww
e425f2367f Toponaming: make sure toposhapes have hashers 2024-08-02 21:42:16 -04:00
bgbsww
cfb4514df7 Toponaming: Update tests, implement missing subtractive operation tests,
fix helix and revolution
2024-07-30 09:12:58 -05:00
David Carter
5d90969c82 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
aade704d01 Toponaming: Cleanup review notes 2024-07-23 23:58:56 -05:00
luzpaz
bc150dc73c Fix trailing newlines and minor typo fixes 2024-07-23 16:16:30 +02:00
Chris Hennes
0e08c99092 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
dc9849bdb7 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
c2d5bf03a1 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
a807c9e25b Toponaming: Tweak test framework to allow leaving documents for examination 2024-07-08 11:12:45 -05:00
shai
b38bfb1aeb Add fixes suggested by @bgbsww 2024-07-04 19:53:09 +03:00
shai
2c062fc2c1 Fix python shape setElement function. Partially fixes #15095 2024-07-04 11:48:44 +03:00
wmayer
10ac9a63a5 PD: Rename duplicated test method
Fixes #14795: testPartDesignElementMapSketch: Duplicate test method name
2024-07-01 11:18:46 -05:00
Max Wilfinger
86b1c2e863 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
cc93d99f49 Toponaming: Add tests for subshaoebinder, attachment problems. 2024-06-28 11:57:43 -05:00
Chris Hennes
da37ccc674 TNP: Update test to use AttachmentSupport 2024-06-26 10:46:36 -05:00
Syres916
08ee9fa728 Part/Toponaming: makeElementWires
* Added tests developed by Syres916
2024-06-26 10:46:36 -05:00
bgbsww
aa66518568 Toponaming: Fix save and restore of elementmaps 2024-06-23 23:33:12 -04:00
bgbsww
8675aa87b4 Toponaming: Check for selection mapped element name 2024-06-22 17:10:54 -05:00
Florian Foinant-Willig
b9dfc493b8 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
9e2a8343a0 Toponaming: Cleanup verified face calls 2024-05-20 17:48:01 -05:00
bgbsww
6a947afda5 Toponaming: adjust tests 2024-05-18 14:12:04 -05:00
bgbsww
e50ef22e7b Minor test tweaks, and small fixes to pass tests 2024-05-17 19:14:01 -05:00