Commit Graph

41 Commits

Author SHA1 Message Date
Kacper Donat
dc747db955 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
fadfc7e270 App: Apply clang format (part 2) 2024-11-21 21:17:42 +01:00
CalligaroV
c36406c112 Call ComplexGeoData::ensureElementMap() in ComplexGeoData::readElements()
Signed-off-by: CalligaroV <vincenzo.calligaro@gmail.com>
2024-09-09 18:05:52 +02:00
bgbsww
959fa6b628 Toponaming: Refactor out duplicated code using elementMap() 2024-08-10 10:47:01 -04:00
bgbsww
e425f2367f Toponaming: make sure toposhapes have hashers 2024-08-02 21:42:16 -04:00
bgbsww
aa66518568 Toponaming: Fix save and restore of elementmaps 2024-06-23 23:33:12 -04:00
bgbsww
9fc744fbe3 Fix tests, slip in TNP defense 2024-05-07 13:42:21 -04:00
bgbsww
3ee0530ac2 Toponaming/Part: Fix fillet/pad bug, add tests 2024-05-07 09:40:48 -04:00
Zheng, Lei
56e32b9c98 Methods to support Toponaming element maps 2024-05-01 18:02:04 -04:00
bgbsww
5c582b7b2d Toposhape/Part:: fix, relocate and test element methods in ComplexGeoData and TopoShape 2024-03-04 17:16:59 -05:00
Zheng, Lei
e5ef0b5833 Toposhape/Part: element methods in ComplexGeoData and TopoShape 2024-03-04 17:16:59 -05:00
Zheng, Lei
09a5ceca03 Toposhape/Part: Transfer in PropoertyTopoShape and related 2024-03-01 07:55:12 -05:00
Chris Hennes
f0a734fed0 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
979090169f App/Toponaming: Add addition TNP methods 2024-01-15 18:17:32 +01:00
Chris Hennes
a4494ba0a1 App/Toponaming: Minor refactor if read method 2023-11-04 11:47:11 -05:00
Chris Hennes
554ab69270 App/Toponaming: ComplexGeoData clang-tidy cleanup 2023-11-04 11:07:22 -05:00
Chris Hennes
7c942a0cc8 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
2c2347f746 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
56ccef84c2 App: refactor ComplexGeoData::getSubElementByName 2023-08-25 19:23:18 +02:00
wmayer
1cf1a90a17 App: modernize C++: use default member init 2023-08-23 19:51:44 +02:00
Chris Hennes
73689f269c App/Toponaming: Tweak ComplexGeoData destructor 2023-07-17 10:24:29 -05:00
Chris Hennes
66f6350fd3 App/Toponaming: Basic tests and linter issues 2023-07-14 23:03:18 -05:00
Chris Hennes
8ec1ae3319 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
c65f049d20 [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
1309b86ea5 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
b6cae3bfdf App: Modernise ctors dtors defs etc 2022-08-01 00:34:46 +02:00
marioalexis
97e0d63750 App: Use regex to match names in ComplexGeoData::getSubElementByName 2022-04-15 17:38:17 +02:00
Chris Hennes
f7edc74eee App: PR6497 move return statement to new line 2022-03-29 12:33:37 -05:00
wmayer
1a20b7f119 App: modernize C++11
* use nullptr
2022-03-23 17:29:23 +01:00
wmayer
f1f68db55b App: Optimize includes to reduce compile time 2022-03-07 15:53:58 +01:00
wmayer
4a343ab31e 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
d837160c8e [App] remove some unused includes 2022-02-25 02:25:47 +01:00
wmayer
9eedb17b70 App: use consistent spelling of SubElement 2021-10-06 18:09:53 +02:00
luz.paz
019f73852c 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
df9e950f38 App: null pointer check in ComplexGeoData::noElementName() 2019-10-08 10:20:18 +02:00
wmayer
9fa56345cf 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
8448d0d8c5 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
63943e4bb8 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
c636974ec8 fix -Wextra in FreeCADApp 2016-09-21 16:05:36 +02:00
Mateusz Skowroński
05f95c0506 Fix files encoding. Go from ISO8859-1 to UTF-8. 2015-09-21 19:50:49 -03:00
wmayer
120ca87015 + unify DLL export defines to namespace names
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5000 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-10-10 13:44:52 +00:00