Commit Graph

83 Commits

Author SHA1 Message Date
pre-commit-ci[bot]
25c3ba7338 All: Reformat according to new standard 2025-11-11 13:49:01 +01:00
Benjamin Nauck
aad5e58955 Part: Use std::numeric_limits and std::numbers instead of defines 2025-03-29 13:32:38 +01:00
mosfet80
3dd7a1cc52 Remove support to oldest occ <7.5 (#20084)
* remove support to oldest occ <7.5

The  os ubuntu 22.04 not supported use occ 7.5.1.
There is a lot of code implemented to support even older versions.
The patch removes support for versions lower than occ 7.5.0

* .

* move include library

#pieterhijma  change request :

* removed deprecated functions

get/setAngle functions has been removed with OCC 7.5
2025-03-21 13:06:47 +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
bgbsww
3a6f70946a Fix #16013 (#16090)
* Fix #16013

* Fix #16013
2024-09-02 18:00:47 +02:00
bgbsww
ecf7e51ab3 Toponaming: Remove all FC_USE_TNP_FIX protected old code 2024-08-26 11:12:48 -05:00
bgbsww
0178e848e4 Toponaming: Clean code, apply remark recommendations and Tweak tests 2024-07-22 12:55:23 -04:00
CalligaroV
8def1e94dc Part/Toponaming: makeElementWires
* Updated tests

Signed-off-by: CalligaroV <vincenzo.calligaro@gmail.com>
2024-06-26 10:46:36 -05:00
Chris Hennes
d01ce32a1f Update for LibPack3 (#10337)
* cMake: Add base support for LibPack3

Minor changes to FreeCAD source code to support compiling with Qt 6.5 on MSVC,
and changes to cMake setup to support the new Libpack.

* NETGENPlugin: Fix compilation with MSVC and OCCT 7.8

* Material: Switch to Wrapped_ParseTupleAndKeywords for /fpermissive- on MSVC

* Base: Prevent accidental definition of MIN and MAX by MSVC

* cMake: Prevent accidentally finding an old LibPack

* Material: Wrap another ParseTuple call

* OCCT: Modify includes for 7.8.x

* Part: Change TNP code to use Wrapped_ParseTupleAndArgs

* Spreadsheet: Workaround for MSVC macro pollution

* Mesh: Workaround for MSVC macro pollution

* Base: Remove extra MSVC flag (moved to CMake)

* Tests: Fix compiling with /permissive-

* FEM: Fix Qt warnings about duplicate element names

* cMake: Ensure major version numbers are set

* Address review comments.

* cMake: Further tweaks for LibPack3

* cMake: Modify specification of compiler flags for MSVC

* Main: Remove QtQuick testing code

* cmake: Find Boost before SMESH (which uses it)

* Fixes for LibPack2

* cMake: Another try at importinhg VTK cleanly
2024-06-24 18:25:05 +02:00
wmayer
2f8382ae59 MSVC: Fix compiler warnings
* avoid redefines in Assembly
* explicit cast from size_t to int
* remove unused variables
* avoid implicit cast from double to float
* in test cases replace EXPECT_FLOAT_EQ with EXPECT_DOUBLE_EQ or EXPECT_NEAR when doubles are used
2024-06-20 15:42:16 -05:00
Chris Hennes
11fa271eb5 Test: Support system GTest, and give warning if no submodule (#13662) 2024-06-03 10:40:35 -05:00
Chris Hennes
f1690821a3 Toponaming: Test fixes 2024-05-20 12:40:52 -05:00
bgbsww
2657bbee4d Minor test tweaks, and small fixes to pass tests 2024-05-17 19:14:01 -05:00
bgbsww
45c4aefaae Rework makeElementChamfer to match current parms, and add PartDesign code for Chamfers 2024-05-12 13:28:20 -05:00
bgbsww
71d96bccac Fix tests, slip in TNP defense 2024-05-07 13:42:21 -04:00
wmayer
56f84c8042 Fix various compiler warnings:
* fix -Wunused-parameter
* fix -Wunused-function
* fix -Wunused-private-field
* fix -Wunused-variable
* fix -Winconsistent-missing-override
2024-04-30 16:59:31 +02:00
bgbsww
a4dd600ec6 Toponaming/Part: Fix hashing, hasher mismatches, and adjust test results to match 2024-04-15 23:00:27 -05:00
bgbsww
c9d8bdf13d Toponaming/Part: Add deprecation comments, clean up code 2024-04-09 21:17:08 -04:00
bgbsww
28cb508489 Toposhape/Part: Cleanup FeatureFillet, FeatureChamfer and dependencies 2024-03-19 11:10:18 -04:00
luzpaz
5839134e95 Fix various typos throughout the codebase (#13029)
* Fix various typos throughout the codebase

* [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-03-18 16:54:30 -05:00
bgbsww
93e823da30 Toposhape/Part: clean and add tests 2024-03-17 10:24:58 -04:00
bgbsww
3bc87a9cf5 Clean and add tests for makeElementSolid 2024-03-17 10:24:58 -04:00
bgbsww
d0562d0c3a Toposhape/Part: Clean GeneralFuse, Fuse, Cut; add tests; tweak other tests 2024-03-17 10:24:58 -04:00
bgbsww
3df25821e5 Toposhape/Part:: Fix, relocate and test element methods in ComplexGeoData and TopoShape 2024-03-07 23:00:48 -05:00
wmayer
2e96599903 Tests: fix compiler warning about unused parameters 2024-03-06 15:22:21 +01:00
bgbsww
609cd12b4b Merge branch 'main' into bgbsww-toponamingElementCacheExtras 2024-03-04 21:19:42 -05:00
bgbsww
834bbff6b0 Toposhape/Part:: fix, relocate and test element methods in ComplexGeoData and TopoShape 2024-03-04 17:16:59 -05:00
bgbsww
d232549286 Toponaming/Part: Correct tests that show platform variations when all elements tested 2024-03-04 16:23:40 -05:00
bgbsww
046e43651c Toponaming/Part: Correct elementsMatch to test all entries 2024-03-03 19:49:59 -05:00
Vincenzo Calligaro
0e7aa5f7bc 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
68fd2934cf Testing for makeElementEvolve 2024-02-29 09:26:22 -06:00
bgbsww
698f306c18 Toposhape/Part: Clean and test replacEShape and removEShape 2024-02-28 16:53:29 -05:00
bgbsww
16c29ceb27 Toponaming/Part: Add tests and clean makeElementBSplineFace and makeElementFilledFace 2024-02-27 09:57:27 -06:00
Chris Hennes
c356223702 Merge pull request #12572 from bgbsww/bgbsww-toponamingMakeElementRevolve
Toponaming/Part: make element revolve and prism
2024-02-26 15:32:22 -06:00
bgbsww
1fa89ea4c1 Toponaming/Part: Cleaning and tests for makeElementRevolve, makeElementPrism, makeElementPrismUntil 2024-02-23 15:04:28 -05:00
bgbsww
331881ae22 Merge branch 'main' into bgbsww-toponamingMakeElementSliceMirror 2024-02-23 10:37:47 -05:00
bgbsww
85b5cfc62a Merge branch 'main' into bgbsww-toponamingMakeElementSliceMirror 2024-02-23 10:24:44 -05:00
bgbsww
68edc6f123 Merge branch 'main' into bgbsww-toponamingMakeElementSolid 2024-02-22 20:06:51 -05:00
bgbsww
405bf03ce9 Clean and add tests for makeElementSolid 2024-02-22 19:18:08 -05:00
bgbsww
e33e0a3f5e Toponaming/Part: Clean and add tests for elementTransform methods 2024-02-22 17:28:35 -05:00
bgbsww
dbe7c9d372 Toposhape/Part: Cleanups and tests for makeElementSlice, makeElementSlices, and makeElementMirror 2024-02-22 17:16:46 -05:00
bgbsww
715faeac54 Toposhape/Part: clean, add tests for makeElementFillet and makeElementChamfer 2024-02-22 08:27:40 -05:00
Chris Hennes
14d2915e6c 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
d7f14d3df5 Bring in = operator, resetMap and flushMap overrides, and fix affected tests 2024-02-21 12:13:16 -05:00
bgbsww
b5eafe6783 Toposhape/Part: Clean GeneralFuse, Fuse, Cut; add tests; tweak other tests 2024-02-21 12:00:51 -05:00
bgbsww
b2cad5297a Toponaming/Part: Clean and add tests for elementTransform methods 2024-02-21 11:56:22 -05:00
bgbsww
917093b550 Toposhape/Part: Clean GeneralFuse, Fuse, Cut; add tests; tweak other tests 2024-02-20 15:10:28 -05:00
Vincenzo Calligaro
5763ac32b0 Part/Toponaming: tests for MapperHistory (#12402)
* Part/Toponaming: MapperHistory
 * added test for MapperHistory::modified
 * added test for MapperHistory::generated
 * renamed edges in the test for MapperHistory::modified

---------

Signed-off-by: CalligaroV <vincenzo.calligaro@gmail.com>
2024-02-18 16:42:41 -06:00
bgbsww
10095d2625 Toponaming/Part: Add tests and clean 2024-02-17 21:13:08 -05:00
bgbsww
5db6ef559e Toponaming/Part: tests addition and cleaning 2024-02-17 18:07:23 -05:00