Commit Graph

12 Commits

Author SHA1 Message Date
Monty Montgomery
eb58ba5657 Fix to sanity checking of ElementMap::restore()
An operator precedence error in new sanity checking code within
ElementMap::restore() causes <X>.Shape.Map.txt files with more than
2 element maps to be rejected as invalid.  This silently corrupts
projects upon loading, potentially unrecoverably.

The preexisting code comment is still appropriate if ironic.
2025-04-23 17:19:32 -05:00
Chris Hennes
09cdcee1bb App: Coverity fixes 2025-03-18 15:59:22 +01:00
wmayer
6f5259af26 App: Apply clang format (part 1) 2024-11-21 07:54:24 +01:00
bgbsww
459644be31 TopoShape/Part: Bug fixes; pass Hasher parms, OCCT 7.8 compatibility, ElementMaps correct item count 2024-04-14 13:56:07 -04:00
Chris Hennes
d153359b16 Apply suggestions from code review 2024-03-04 19:01:18 -06: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
wmayer
af8c05c507 App: modernize C++: return braced init list 2023-08-18 00:36:24 +02: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
Chris Hennes
cfbe6e702d App/Toponaming: Compilation cleanup after #9175
Also fixes some trailing whitespace issues
2023-06-16 09:14:57 -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