Commit Graph

18 Commits

Author SHA1 Message Date
luzpaz
bd53a03b31 Documentation - Fix whitespace and typos (#805)
- Corrected spelling of "transfert" to "transfer" throughout IGES-related files
- Fixed various grammatical and punctuation errors in comments
- Improved whitespace and formatting in multi-line comments
2025-11-05 13:40:06 +00:00
luzpaz
0763d96209 Documentation - Fix whitespace and typos (#797)
- Normalized spacing in multi-line comments
- Fixed typos in documentation (e.g., "toipological" → "topological", "exist" → "exists")
- Improved comment formatting and alignment
2025-11-04 15:06:11 +00:00
Pasukhin Dmitry
787bee375c Coding - Replace Standard_Mutex with std::mutex and migrate to RAII locks (#766)
- Replace legacy Standard_Mutex usage across many modules with std::mutex.
- Include <mutex> where needed and remove <Standard_Mutex.hxx> includes.
- Replace Standard_Mutex::Sentry / explicit Lock/Unlock with std::lock_guard or std::unique_lock.
- Convert optional/heap mutex holders to std::unique_ptr<std::mutex> and adapt locking accordingly.
- Simplify several singleton initializations (remove manual double-checked locking where safe).
- Use thread_local for per-thread flags instead of ad-hoc mutex protection.
- Fix BVH_BuildQueue Fetch logic to preserve thread counters and wasBusy handling.
- Remove obsolete TopTools_MutexForShapeProvider sources and update FILES.cmake.

This modernizes mutex usage, reduces dependency on custom mutex types and improves clarity of locking patterns.
2025-11-03 16:44:08 +00:00
Pasukhin Dmitry
b30cee0125 Foundation Classes, gp - Mark core types and methods constexpr/noexcept (#790)
Make gp basic types and operations more constexpr-friendly and noexcept:
- Mark gp::Resolution as constexpr.
- Add constexpr and/or noexcept to many constructors and small access/modifier methods.
- Convert several functions to constexpr where safe to allow compile-time evaluation.
- Initialize members via initializer lists for several GTrsf/GTrsf2d/Mat/etc constructors.
- Add noexcept to transformation/serialization helpers and small utilities where appropriate.

This enables better compile-time optimizations and safer noexcept semantics across TKMath gp primitives.
2025-11-02 00:52:32 +00:00
Pasukhin Dmitry
962a456f9b Foundation Classes, Strings - add EmptyString() for Ascii/Extended and use it everywhere (#788)
Introduce TCollection_AsciiString::EmptyString() and TCollection_ExtendedString::EmptyString()
  and update headers.
Replace many local/static empty string instances and default-constructed
  temporaries with the shared EmptyString() reference across ApplicationFramework, DataExchange,
  Visualization and other modules.
Remove several unused local empty-key/static variables and
  adjust default parameters and return paths to use the centralized empty-string accessors.
Add missing #include <TCollection_AsciiString.hxx> to several headers that use/forward TCollection_AsciiString.
2025-11-01 22:39:12 +00:00
Pasukhin Dmitry
7d89343b9b Application Framework - Early-return null NamedShape when TNaming_UsedShapes is missing (#760)
Check Acces.Root().FindAttribute(...) result in TNaming_Tool::NamedShape and return an empty Handle
if the TNaming_UsedShapes attribute is not found to avoid using an uninitialized map.
2025-10-24 09:11:48 +01:00
Pasukhin Dmitry
f4741d647f Coding - Checking for copyright notice (#749)
Created a new CI step to validate the presence of a copyright notice in each source file.
Updated existed files to include the copyright notice.
2025-10-16 18:39:56 +01:00
Gordan Segon
a042bed175 Coding - Add RTTI support for TFunction_Logbook class (#741)
- Added RTTI macro declarations and implementations for TFunction_Logbook
- Improved type identification for debugging and error reporting
2025-10-10 13:07:03 +01:00
Pasukhin Dmitry
775454b75a Coding - Remove duplicate and self-referencing include directives (#739)
- Removal of self-referencing includes where files include themselves
- Elimination of duplicate include statements within the same file
- Cleanup of redundant includes in conditional compilation blocks
- Adding CI validation for validation PRs
2025-10-08 20:31:35 +01:00
Pasukhin Dmitry
47bc102e28 Coding - Method guard iterative update (#732)
Used regex in src folder:
^//[\s\n\r\t]*[-=]{2,}[=]*[\n\r]*//[\s\n\r\t]*[a-z]+[\s\n\r\t]*:[\s\n\r\t]*[a-z0-9_:\t\s]*[\s\n\r\t]*//[\s\n\r\t]*[a-z]+[\s\n\r\t]*:[\s\n\r\t]*[a-z0-9_\s\t./-><]{0,22}//[\s\n\r\t]*[-=]{3,}[=]*
2025-09-21 11:50:56 +01:00
Pasukhin Dmitry
5ae60b51d3 Coding - Moving to Sprintf call (#675)
- Updates function calls from `sprintf` to `Sprintf` across the entire codebase
- Updates comments and documentation references to reflect the new function name
- Adds format attribute annotations to the `Sprintf` function declaration for better compiler validation
2025-08-17 12:45:30 +01:00
Pasukhin Dmitry
314527f5c0 Coding - Update Clang-format with more macroses (#677)
- Updates `.clang-format` to include `OCC_CATCH_SIGNALS`, `DEFINE_STANDARD_RTTIEXT`, and `Draw_Drawable3D_FACTORY` as statement macros
- Adds a GitHub action step to automatically remove empty lines after `Standard_DEPRECATED` macro declarations
- Reformats numerous files by removing blank lines after deprecated method declarations and improving macro formatting
2025-08-16 20:50:50 +01:00
Pasukhin Dmitry
d1b00bf132 Coding - Reducing relying on exceptions (#676)
- Replaced try-catch blocks with explicit validation checks in PCDM_ReadWriter_1.cxx
- Added division-by-zero protection in XSDRAWSTL.cxx using precision-based comparison
- Improved error handling for integer parsing operations
2025-08-16 13:55:33 +01:00
Pasukhin Dmitry
ae4de70f98 Coding - Method guard iterative update (#674)
- Standardizes comment formatting by replacing detailed comment blocks with a uniform "//=================================================================================================" separator
- Removes redundant "function:" and "purpose:" fields that often contained minimal or no useful information
- Maintains code functionality while improving visual consistency across the codebase
2025-08-15 17:14:53 +01:00
Pasukhin Dmitry
0947067ed5 Coding - Function guard update (#610)
- Removed verbose function header comments (name, purpose) across multiple C++ source files.
- Introduced a single-line separator comment before each function for consistent formatting.
- Applied the change in visualization, modeling, algorithms, foundation, and application framework modules.
2025-07-13 13:16:51 +01:00
Pasukhin Dmitry
4629ee0ca3 Coding - Refactor switch-case statements and improve memory management #569
- Added missing break statements in switch-case blocks in LDOMBasicString, LDOM_BasicElement, PCDM_ReadWriter, and IntCurve_IntConicConic_1 to prevent fall-through behavior.
- Enhanced Standard_Macro.hxx to support fallthrough attributes across different compilers.
- Corrected the use of std::forward in Standard_MemoryUtils.hxx for better type deduction.
- Replaced raw arrays with NCollection_Array1 in AdvApp2Var_SysBase for improved memory safety.
- Updated Extrema_ExtCC2d to utilize smart pointers for better memory management and avoid potential leaks.
- Refactored Units_UnitsDictionary to use NCollection_Array2 for matrix representation, improving readability and maintainability.
- Initialized TranFirst and TranLast in TopTrans_CurveTransition constructor for better default state management.
- Set myStatus in ShapeConstruct_ProjectCurveOnSurface constructor to ensure proper initialization.
- Changed matrix access in Units_UnitsDictionary to use NCollection_Array2 syntax for consistency.
2025-05-30 14:31:26 +01:00
Pasukhin Dmitry
876ccbe977 Configuration - Add support for Google Test framework in CMake #443
Enhance Google Test integration and add support for test projects.
Each Toolkit have GTests folder with place for new tests.
For adding new tests needs to extend FILES.cmake files in each GTests folder.
The single executable is created for each toolkit with all tests.
The tests grouped by module and toolkit with :: as separator.
Added option to download GTest by Cmake if not found.
Add GTest for PLib_JacobiPolynomial with comprehensive test cases
Add GTest for TCollection_AsciiString and TCollection_ExtendedString
Set C++ standard to C++14 for GTest compatibility if required
2025-03-24 08:58:02 +00:00
Pasukhin Dmitry
5647b46a34 Configuration - Reorganize repository structure #450
Reorganizing structure to have Module/TK/Package/FILES structure.
New structure reflect the structure inside IDE.
Migrate FILES, PACKAGES, EXTRLIB to CMake version to handle changes on updates.
No changes were done to installation layout, all installation result keep as before.
The migration was done using python script, see PR, which refactor automatically the structure.
Updated doc generation to have valid path to modules, toolkits and packages.
In case of PR into new version, IR-790 can be used as a target for the previous version.
2025-03-20 00:39:26 +00:00