Commit Graph

181 Commits

Author SHA1 Message Date
bgbsww
9566f06683 Toponaming: Add a plane matching based heuristic to TNP mitigation (#16803)
* Add a plane matching based heuristic to TNP mitigation

* Improve comments, add test
2024-12-09 11:06:02 -06: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
chris
07c95a60ff issue #15329 add missing include to resolve build error 2024-09-24 19:08:45 -05:00
bgbsww
d1ac4551aa Cleanup element map in Revolution and add test (#15959) 2024-09-02 17:59:44 +02:00
bgbsww
a0b44f8405 Toponaming: Fix PropertyTopoShape restore; tweak Loft test; missing TopoShape method. 2024-08-07 20:31:21 -05:00
bgbsww
1eda66dfd8 Cleanup, format 2024-07-24 16:41:15 -04:00
Zheng, Lei
62d1c300fb Toponaming: Bring in composite shapes for findSubshapesWithSharedVertex ( searchSubShape ) 2024-07-22 12:51:25 -04:00
bgbsww
ae6f7f25e8 Toponaming: Missing suppress property and code 2024-07-15 09:38:13 -05:00
mosfet80
5f38b52114 [MOD:PART] removed unused parameter (#14252)
d variable are never used

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2024-06-24 10:41:39 -05:00
bgbsww
5054cace46 Rework makeElementChamfer to match current parms, and add PartDesign code for Chamfers 2024-05-12 13:28:20 -05:00
bgbsww
20cae6c026 Toponaming/Part: unify revolution changes 2024-05-02 18:50:02 -05:00
Zheng, Lei
01498d92d5 Bring in missing code 2024-04-11 18:20:26 -04:00
bgbsww
942ebd58f0 Toponaming/Part: Add deprecation comments, clean up code 2024-04-09 21:17:08 -04:00
Zheng, Lei
231a638fc7 TopoShape/Part: Bring in PartDesign dependencies 2024-04-09 21:17:08 -04:00
bgbsww
a27e91a272 Toposhape/Part: clean and add tests 2024-03-17 10:24:58 -04:00
Zheng, Lei
201d48659f Toposhape/Part: Transfer in makEOffset, makEOffsetFace, makEOffset2d 2024-03-17 10:24:58 -04:00
bgbsww
5c582b7b2d Toposhape/Part:: fix, relocate and test element methods in ComplexGeoData and TopoShape 2024-03-04 17:16:59 -05:00
Vincenzo Calligaro
494df1d169 Part/Toponaming: Tests for flushElementMap and resetElementMap (#12471)
* Part/Toponaming: tests for flushElementMap and resetElementMap
 * Added test for resetElementMap()
 * Added test for flushElementMap()
 * restored ComplexGeoData::resetElementMap to RT fork
 * modified TopoShape::resetElementMap to match the restored signature of ComplexGeoData::resetElementMap
 * added checks in TopoShape::makeShapeWithElementMap to avoid segfaults
 * added check in TopoShape::setElementComboName to avoid segfaults
 * restored testFindSubShapesForSourceWithTypeAndIndex
 * modified test saveDocFileWithNoElementMap to match the restored signature of ComplexGeoData::resetElementMap
* Part/Toponaming: tests for flushElementMap and resetElementMap
 * Removed comments in ComplexGeoData::resetElementMap()
 * Changed TopoShape::resetElementMap():: from virtual to override
 * Removed comment in TopoShape::resetElementMap()
 * Added comments about differences between main and RT fork
 * Removed comment in test saveDocFileWithNoElementMap
 * Updated expected test result in makeElementCompoundTwoShapesGeneratesMap
 * Updated expected test result in resetElementMapTest
 * Fixed typo in test flushElementMapTest
* Part/Toponaming: tests for flushElementMap and resetElementMap
 * updated expected tests results after previous methods modifications

---------

Signed-off-by: CalligaroV <vincenzo.calligaro@gmail.com>
2024-02-29 13:27:27 -06:00
bgbsww
806be24fca Testing for makeElementEvolve 2024-02-29 09:26:22 -06:00
Zheng, Lei
6ee141e39e Toposhape/Part: Transfer in makEEvolve 2024-02-29 09:26:22 -06:00
Chris Hennes
76b7e0eb56 Merge pull request #12201 from bgbsww/bgbsww-toponamingGetElementName
Toponaming: transfer in getElementName and dependencies
2024-02-28 21:05:54 -06:00
Chris Hennes
4fb058f6af Toponaming/Part: Clang-format cleanup 2024-02-28 19:18:45 -06:00
Zheng, Lei
1d9fcfea9a Toponaming/Part: trasnfer in getElementName 2024-02-28 17:06:09 -05:00
bgbsww
4e1c37cd6e Toposhape/Part: Clean and test replacEShape and removEShape 2024-02-28 16:53:29 -05:00
Zheng, Lei
b5af3d38c3 Toposhape/Part: Transfer in replacEShape and removEShape 2024-02-28 16:41:07 -05:00
Zheng, Lei
da53249e3e Toposhape/Part: Transfer in makEFilledFace and makEBSplineFace 2024-02-27 09:57:27 -06:00
Chris Hennes
8105a71a4b Merge pull request #12572 from bgbsww/bgbsww-toponamingMakeElementRevolve
Toponaming/Part: make element revolve and prism
2024-02-26 15:32:22 -06:00
mos
037fbbc5c5 removed deprecaded functions
.

.
2024-02-26 17:38:01 +01:00
bgbsww
2840ed04ab Toponaming/Part: Cleaning and tests for makeElementRevolve, makeElementPrism, makeElementPrismUntil 2024-02-23 15:04:28 -05:00
Zheng, Lei
74cd977ed9 Toponaming/Part: Transfer in makERevolve, makEPrism, makEPrismUntil 2024-02-23 14:50:44 -05:00
bgbsww
078bd87acb Merge branch 'main' into bgbsww-toponamingMakeElementSliceMirror 2024-02-23 10:37:47 -05:00
bgbsww
ea43c3a3f2 Merge branch 'main' into bgbsww-toponamingMakeElementSliceMirror 2024-02-23 10:24:44 -05:00
bgbsww
551bcbc17d Remove redundant from merge 2024-02-22 20:11:08 -05:00
bgbsww
678926cdae Merge branch 'main' into bgbsww-toponamingMakeElementSolid 2024-02-22 20:06:51 -05:00
bgbsww
e7d44e7594 Clean and add tests for makeElementSolid 2024-02-22 19:18:08 -05:00
bgbsww
a3e97b7839 Toponaming/Part: Clean and add tests for elementTransform methods 2024-02-22 17:28:35 -05:00
bgbsww
fe72c59e41 Toposhape/Part: Cleanups and tests for makeElementSlice, makeElementSlices, and makeElementMirror 2024-02-22 17:16:46 -05:00
Zheng, Lei
75296929d6 Toposhape/Part: Transfer in _makETransform, makETransform, makEGTransform 2024-02-22 12:13:54 -05:00
Zheng, Lei
e5247001cb Toposhape/Part: Transfer in makESlice and makEMirror 2024-02-22 08:57:01 -05:00
bgbsww
1470616abe Toposhape/Part: clean, add tests for makeElementFillet and makeElementChamfer 2024-02-22 08:27:40 -05:00
Zheng, Lei
952ae46d49 Toposhape/Part: Transfer in makEFillet and makEChamfer 2024-02-22 07:40:59 -05:00
Chris Hennes
6f2a457e0b Merge pull request #12528 from bgbsww/bgbsww-toponamingMoveEqualOperator
Toponaming/Part:  Bring in = operator, resetMap and flushMap overrides, and fix affecte…
2024-02-21 16:08:32 -06:00
bgbsww
91191c7be3 Bring in = operator, resetMap and flushMap overrides, and fix affected tests 2024-02-21 12:13:16 -05:00
Zheng, Lei
c6d443dfa5 Toposhape/Part: Transfer in makESolid 2024-02-21 12:00:51 -05:00
bgbsww
907f59dc40 Toponaming/Part: Clean and add tests for elementTransform methods 2024-02-21 11:56:22 -05:00
Zheng, Lei
97b84fc9f6 Toposhape/Part: Transfer in _makETransform, makETransform, makEGTransform 2024-02-21 11:56:22 -05:00
bgbsww
25a78b3062 Toposhape/Part: Clean GeneralFuse, Fuse, Cut; add tests; tweak other tests 2024-02-20 15:10:28 -05:00
Zheng, Lei
122ff7f61f Toposhape/Part: Transfer in makEGeneralFuse, makeEFuse, makeECut 2024-02-19 21:12:52 -05:00
bgbsww
b8486c1562 Toponaming/Part: Remove makeElementShape and cleanup opcode code 2024-02-18 21:57:12 -06:00
Zheng, Lei
24fb41685f TopoNaming/Part: transfer makeElementThickSolid 2024-02-17 21:11:52 -05:00