Commit Graph

52 Commits

Author SHA1 Message Date
Louis Gombert 289411f51c Move costly boost includes out of core headers
Use pimpl or move definitions to .cpp files in order to avoid including huge Boost headers in core FreeCAD headers. Due to boost inclusions in a few core headers, boost graph utilities, multi index and predicates headers were included in in a large portion of translation units, without them being actually required. This helps reduce build time of the project.
2026-02-16 21:58:36 -06:00
drwho495 e9ea3d0d25 TopoNaming: Enable migration code for 1.0.X -> 1.1 (#26538) 2025-12-30 13:24:09 +01:00
PhoneDroid 8abd25c999 [ App ]: Update SPDX License Identifiers 2025-12-25 11:55:37 -06:00
Markus Reitböck d05e2a0431 App: use CMake to generate precompiled headers on all platforms
"Professional CMake" book suggest the following:

"Targets should build successfully with or without compiler support for precompiled headers. It
should be considered an optimization, not a requirement. In particular, do not explicitly include a
precompile header (e.g. stdafx.h) in the source code, let CMake force-include an automatically
generated precompile header on the compiler command line instead. This is more portable across
the major compilers and is likely to be easier to maintain. It will also avoid warnings being
generated from certain code checking tools like iwyu (include what you use)."

Therefore, removed the "#include <PreCompiled.h>" from sources, also
there is no need for the "#ifdef _PreComp_" anymore
2025-09-14 09:47:02 +02:00
Chris Hennes f5806841b6 Merge pull request #19907 from benj5378/getAttribute
Base: make getAttribute template
2025-05-12 10:39:55 -05:00
Benjamin Bræstrup Sayoc 6786af6ef9 Everywhere: clean up getAttribute conversions 2025-05-09 15:54:57 +02:00
Benjamin Bræstrup Sayoc 492b8312b3 Base: make getAttribute template 2025-05-09 15:54:57 +02:00
Ladislav Michl c293d74566 Base: rename Exception's PascalCase methods to camelCase 2025-05-05 23:50:01 +02:00
Benjamin Nauck 27f5699588 App: Add #include <limits> where used 2025-03-31 23:50:19 +02:00
Chris Hennes c1ada6bc40 App: Coverity fixes 2025-03-18 15:59:22 +01:00
Chris Hennes d850e87567 Base: Coverity cleanup 2025-03-18 15:59:22 +01:00
Kacper Donat 2a69e3d878 Base: Add ComplexGeoData::centerOfGravity helper
This adds a simple quality of life helper returning center of gravity as
std::optional instead of C style method accepting reference and
returning bool to indicate method success.
2025-01-04 16:32:52 +01:00
wmayer 5771c94523 App: Apply clang format (part 2) 2024-11-21 21:17:42 +01:00
CalligaroV 64eb012d7b Call ComplexGeoData::ensureElementMap() in ComplexGeoData::readElements()
Signed-off-by: CalligaroV <vincenzo.calligaro@gmail.com>
2024-09-09 18:05:52 +02:00
bgbsww 99b753b006 Toponaming: Refactor out duplicated code using elementMap() 2024-08-10 10:47:01 -04:00
bgbsww cd128984e1 Toponaming: make sure toposhapes have hashers 2024-08-02 21:42:16 -04:00
bgbsww 3c3709cb5d Toponaming: Fix save and restore of elementmaps 2024-06-23 23:33:12 -04:00
bgbsww 71d96bccac Fix tests, slip in TNP defense 2024-05-07 13:42:21 -04:00
bgbsww 8fff92618c Toponaming/Part: Fix fillet/pad bug, add tests 2024-05-07 09:40:48 -04:00
Zheng, Lei 47635c0507 Methods to support Toponaming element maps 2024-05-01 18:02:04 -04:00
bgbsww 834bbff6b0 Toposhape/Part:: fix, relocate and test element methods in ComplexGeoData and TopoShape 2024-03-04 17:16:59 -05:00
Zheng, Lei 5e532494ca Toposhape/Part: element methods in ComplexGeoData and TopoShape 2024-03-04 17:16:59 -05:00
Zheng, Lei 2adff99c14 Toposhape/Part: Transfer in PropoertyTopoShape and related 2024-03-01 07:55:12 -05: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 928c4ce813 App/Toponaming: Add addition TNP methods 2024-01-15 18:17:32 +01:00
Chris Hennes e2f4ec90a3 App/Toponaming: Minor refactor if read method 2023-11-04 11:47:11 -05:00
Chris Hennes cd1b85500c App/Toponaming: ComplexGeoData clang-tidy cleanup 2023-11-04 11:07:22 -05:00
Chris Hennes 8f105dc162 App/Toponaming: ComplexGeoData serialization
Direct copy from TopoNaming branch with only modifications needed to compile against API changes.
2023-11-04 10:24:17 -05:00
wmayer 423cc42ac8 Tests: add unit tests for:
* TopoShape::getElementTypeAndIndex
* ComplexGeoData::getTypeAndIndex

and fix crashes there when passing a null pointer
2023-08-25 19:23:18 +02:00
wmayer fa12b433df App: refactor ComplexGeoData::getSubElementByName 2023-08-25 19:23:18 +02:00
wmayer ee0fad4c90 App: modernize C++: use default member init 2023-08-23 19:51:44 +02:00
Chris Hennes 64b4a5a490 App/Toponaming: Tweak ComplexGeoData destructor 2023-07-17 10:24:29 -05:00
Chris Hennes e7f8f26bd5 App/Toponaming: Basic tests and linter issues 2023-07-14 23:03:18 -05:00
Chris Hennes 9ea7b6424b App/Toponaming: ComplexGeoData realthunder original
Minor modifications to make it compile with previous refactorings.
The only substantial change to the original is moving the
getElementHistory function from ComplexGeoData to MappedName so
that the dehash function can remain private.
2023-07-14 23:03:18 -05:00
Pesc0 4a8d3853ba [Toponaming] create ElementMap class (#9175)
* Copypaste ElementMap
* Add MappedNameRef
* Fix missing include
* Copypaste `findTagInElementName`
* fix error introduced _somewhere_
* refactor toponaming constants
* Move `findTagInElementName` in `MappedName`
* reintroduce workaround to compile ElementMap
* Added missing functions copied from complexgeodata
* fix last compile errors, reorder and format files
* remove recursive refs to ComplexGeoData
* Add more comments
* fixed comments and added tests
* added FIXME, make functions private, misc fixes
* Move static functions from complexGeoData to PostfixStringReferences. Rename to ElementNamingUtils
* Fix broken includes due to previous change
* Revert constants from string to const char*
* added childmap tests and made hasher public
* Make functions private
* Added remaining tests
* removed bool return from `erase` functions
* fix missing appexport

Co-authored-by: John Dupuy <jdupuy98@gmail.com>
2023-06-15 09:05:24 -05:00
wmayer 2462f4c7a0 App: move from float to double for accuracy parameter, add a virtual method to determine a default accuracy 2022-09-15 09:52:14 +02:00
berniev 65a356835b App: Modernise ctors dtors defs etc 2022-08-01 00:34:46 +02:00
marioalexis 8f3f1d1e4c App: Use regex to match names in ComplexGeoData::getSubElementByName 2022-04-15 17:38:17 +02:00
Chris Hennes 132a1d7e55 App: PR6497 move return statement to new line 2022-03-29 12:33:37 -05:00
wmayer 749361d2f3 App: modernize C++11
* use nullptr
2022-03-23 17:29:23 +01:00
wmayer 4977e55e51 App: Optimize includes to reduce compile time 2022-03-07 15:53:58 +01:00
wmayer e4435cdcba Base/App: fix warnings from code analysers:
* convert old-style-casts to explicit C++ casts where possible
* make some implicit conversions explicit
2022-03-06 23:49:30 +01:00
Uwe 26102318a0 [App] remove some unused includes 2022-02-25 02:25:47 +01:00
wmayer 7b45d63bf2 App: use consistent spelling of SubElement 2021-10-06 18:09:53 +02:00
luz.paz 4f308dc03c src/App: [skip ci] fix header uniformity
This PR fixes header uniformity across all `src/App` files
2019-12-25 11:38:43 +01:00
Zheng, Lei a03b847507 App: null pointer check in ComplexGeoData::noElementName() 2019-10-08 10:20:18 +02:00
wmayer b50b21576e core system
force strict ISO C++ (-Wpedantic)
TODO: still a lot of variadic macros are not valid ISO C++
2019-09-18 01:01:14 +02:00
Zheng, Lei 29eb1a4299 App: GeoFeature/ComplexGeoData API changes
These are the bare minimum set of APIs for future new topogical naming
feature (see [here](https://git.io/fj6hy) for a overview of the new
APIs).

These APIs are added early to avoid too much code change for the new
features introduced in the current patch set.
2019-08-17 14:52:10 +02:00
wmayer 35e8edeb08 extend interface to get actual property with geometric data, get center of gravity of a geometry 2017-03-05 18:05:11 +01:00
wmayer 71df967fdf fix -Wextra in FreeCADApp 2016-09-21 16:05:36 +02:00