Commit Graph

6835 Commits

Author SHA1 Message Date
Pasukhin Dmitry
3d97677c15 Testing - Enhance BRepOffsetAPI_ThruSections_Test with B-spline support (#891)
- Added a helper function to create B-spline curves from poles and knot sequences.
- Introduced a new test case to validate ThruSections with B-spline profiles of varying pole counts.
- Ensured compatibility of closed B-spline curves during lofting operations.
- Improved test coverage for the BRepOffsetAPI_ThruSections functionality.
2025-12-07 15:29:03 +00:00
Pasukhin Dmitry
b9f46ada4c Modeling - Fix thickness operation regression on circle-to-polygon lofts (#889)
- Fixed CheckMixedContinuity to detect actual mixed concavity
  (both convex and concave regions) instead of any G1/non-G1 transitions
- Added null edge and PCurve checks in RefEdgeInter to prevent crashes
- Added GTests for BRepOffset_MakeOffset covering various loft scenarios
2025-12-07 11:12:27 +00:00
Pasukhin Dmitry
a873c1c83c Coding - Refactor RWStepAP214 module to use custom hasher for string_view types (#888)
- Introduced StringViewHasher for efficient hashing of std::string_view using OCCT utilities.
- Updated THE_TYPENUMS and THE_TYPESHOR maps to utilize StringViewDataMap with the new hasher.
- Modified initialization functions to accept the new map type for better type safety and clarity.
2025-12-06 19:17:37 +00:00
Pasukhin Dmitry
8662adfe46 Modeling - Refactor Extrema package (#869)
- Replacing preprocessor-based generic programming with C++ templates
- Converting inline implementation files (`.lxx`) to inline definitions within header files
- Removing legacy instantiation files (`_0.cxx`)
- Updating type aliases to use modern `using` declarations instead of macro-based instantiation
2025-12-06 17:08:32 +00:00
Pasukhin Dmitry
aa655079ad Foundation Classes - Refactor CSLib package and add GTests (#857)
- Updated CSLib_Class2d to enhance documentation and improve parameter types for constructors.
- Refined point classification methods with clearer return types and improved comments.
- Modified CSLib_DerivativeStatus to clarify the status of surface derivatives computation.
- Enhanced CSLib_NormalPolyDef for better readability and efficiency in polynomial evaluations.
- Updated CSLib_NormalStatus to provide clearer descriptions of normal computation statuses.
- Updated point classification methods to return clearer result types.
- Enhanced input validation and array management for polygon vertices.
- Improved documentation for methods and parameters.
- Refactored internal methods for consistency and readability.
2025-12-06 00:34:49 +00:00
Pasukhin Dmitry
c770a1a7f7 Coding - Fixing analyzer reports (#885)
- Replaced manual absolute value logic (conditional negation) with `std::abs` for clarity
- Added `const` qualifiers to variables that are not modified after initialization
- Moved variable declarations closer to their first use and removed unused variable assignments
2025-12-05 21:20:08 +00:00
Pasukhin Dmitry
d349cd4a67 Configuration - Update compiler flags and includes for macOS (#884)
- Added flags to suppress elaborated-enum-base warnings for newer Clang versions on macOS
- Updated includes in TDF_AttributeMap.hxx to include Standard_Handle.hxx
- Modified hash functions in GeomHash and Geom2dHash classes to use Standard_CStringHasher instead of Standard_HashUtils
2025-12-05 16:05:07 +00:00
Dmitrii Kulikov
733a8b4660 Modelling - ShapeUpgrade_UnifySameDomain crash (#876)
- Added null safety checks for `BRepAdaptor_Curve2d::Curve()` before evaluating curve parameters
- Modernized variable declarations with `const` qualifiers
- Replaced conditional assignment with `std::min` for cleaner code
2025-12-04 19:03:00 +00:00
Dmitrii Kulikov
244c54af3d Modeling - BRepBuilderAPI_GTransform face stretch crash (#875)
- Modified parameter validation to allow curves where `theUFirst > theULast` within `Precision::Confusion()` tolerance
- Updated documentation to reflect the new tolerance-based validation
- Added comprehensive test suites for both 2D and 3D curve adaptors
2025-12-04 19:02:29 +00:00
Pasukhin Dmitry
d60335d2f2 Configuration - Update VCPKG version (#878)
- Updates VCPKG baseline and version tag to 2025.10.17
- Adds new VCPKG install options for exact version matching and post-build cleanup
- Adds macOS build dependencies (autoconf-archive and libtool)
2025-12-04 17:30:31 +00:00
dpasukhi
985c3992f8 Revert "Foundation Classes - TopLoc package update (#849)"
This reverts commit a6e68c7e70.
2025-12-02 21:36:52 +00:00
dpasukhi
7b572da23f Revert " Configuration - Modernize compiler flags for C++17 and add Production optimizations (#867)"
This reverts commit 9edeecb791.
2025-12-02 17:39:03 +00:00
Pasukhin Dmitry
9edeecb791 Configuration - Modernize compiler flags for C++17 and add Production optimizations (#867)
- Removes obsolete compiler version checks (SSE2 for VS 2005-2010, GCC 4.6 deprecation warnings)
- Replaces deprecated CMake variables `CMAKE_COMPILER_IS_GNUCC/GNUCXX` with modern `CMAKE_CXX_COMPILER_ID`
- Adds production optimizations: aggressive inlining, linker optimizations, and security hardening flags
2025-11-30 14:39:43 +00:00
Pasukhin Dmitry
2c48978cda Testing - Update workflow dependencies and debug GTest (#866)
- Establishes explicit job dependencies to prevent redundant workflow runs
- Adds GTest execution for macOS with Clang (No PCH) in Debug mode
- Creates a dependency chain where macOS Clang (No PCH) builds depend on standard macOS builds
2025-11-30 12:11:35 +00:00
Pasukhin Dmitry
a26ad4b0cf Modeling - Memory consumption in BOPAlgo_PaveFiller_6.cxx (#864)
- Introduced a separate temporary allocator (`aTmpAllocator`) for per-iteration collections
- Reorganized collection declarations to distinguish between temporary (per-iteration) and persistent (cross-iteration) data structures
- Added allocator reset logic at the start of each iteration to reclaim memory
2025-11-30 10:29:46 +00:00
Pasukhin Dmitry
59907db19d Foundation Classes - Remove [[nodiscard]] attribute from Deprecated Method (#865) 2025-11-30 09:08:58 +00:00
Pasukhin Dmitry
a91a0d189a Modeling - Fix out-of-range access in BSplCLib_Reverse function (#863)
- Added a conditional check `if (aL < aUpper)` to prevent accessing array elements beyond bounds when `aL` equals or exceeds `aUpper`
2025-11-29 21:54:09 +00:00
Dmitrii Kulikov
29631c61de Modelling - Boolean fuse segfaults on loft (#860)
- Added null checks for 2D curve handles to prevent dereferencing null geometry
- Refactored `ProcessDE()` to use modern C++ idioms (auto, structured bindings, range-based iteration patterns)
- Simplified `FindPaveBlocks()` using a lambda function to reduce code duplication
2025-11-29 16:25:18 +00:00
Dmitrii Kulikov
5f40d892d2 Modeling - BRepFilletAPI_MakeFillet::Add hangs on adding edge (#859)
- Refactored the `ReorderFaces` function to iterate through all edges at a vertex instead of assuming only two edges exist
- Replaced manual face swapping with `std::swap` for cleaner code
- Removed debug output statements and unused debug declarations
2025-11-27 13:38:35 +00:00
Pasukhin Dmitry
c04f5e0b4c Modeling - Optimize BndLib and add GTests (#856)
- Fix negative modulo in torus bounding box computation
- Fix hyperbola extrema loop early break condition
- Fix OpenMin/OpenMax direction sign for infinite bounds
- Remove dead code in cone bounding computation
- Replace sqrt/log with more efficient computations in hyperbola bounds
- General code cleanup and modernization
2025-11-27 09:22:44 +00:00
Pasukhin Dmitry
1663c65625 Foundation Classes - Refactor BVH_Box to use generic vector types and add transformation tests (#858)
- Replaced `Graphic3d_Vec3d` and `Graphic3d_Vec4d` with generic `BVH_VecNt` and `BVH::VectorType<T, 4>::Type`
- Changed `Standard_Integer` and `Standard_Real` to template type `T` and `int` for generic implementation
- Added comprehensive test coverage for float-precision transformations
2025-11-26 21:15:01 +00:00
Pasukhin Dmitry
652b07f92c Foundation Classes - Enhance B-Spline Curve Computation (#855)
- Introduces `BSplCLib_KnotArrays` template for efficient stack-based knot/multiplicity management
- Refactors `BSplCLib_Reverse` to use `std::reverse` for improved performance
- Replaces heap-allocated arrays with stack-based `NCollection_LocalArray` in critical code paths
- Modernizes copy constructor/assignment operator prevention using `= delete`
2025-11-26 16:43:09 +00:00
Pasukhin Dmitry
8a37fbd49f Foundation Classes - Enhance BVH Implementation (#842)
- Fixed leaf node size condition and SAH cost evaluation in `BVH_SweepPlaneBuilder`
- Added `constexpr` to `BVH_Box`, `BVH_Types`, and helper functions for compile-time evaluation
- Introduced 13 new comprehensive test files covering BVH components
- Removed unused `BVH_BuildQueue.cxx` file
- Added internal helper structures to `BVH_Traverse` classes
2025-11-26 10:38:42 +00:00
Pasukhin Dmitry
0fab5399ff Documentation - Update Assistant guidelines for clarity and consistency (#854)
- Enhanced naming conventions with clearer examples aligned to OCCT standards (e.g., `aCircle` instead of `circ`)
- Added comprehensive guidance on OCCT collections vs STL containers with allocator usage
- Expanded documentation style guidelines with method separator rules and Doxygen comment patterns
2025-11-25 20:50:19 +00:00
Pasukhin Dmitry
c5120a28c8 Foundation Classes - Optimize and fix Bnd package (#839)
- Fixed multiple bugs including uninitialized variables (zmin/zmax in IsOut(gp_Lin)), incorrect type usage (Standard_Integer → Standard_Boolean), and improper gap handling
- Optimized performance-critical methods through branchless operations, early exits, and cached computations
- Modernized codebase with C++17 features including constexpr constructors, noexcept specifications, and [[nodiscard]] attributes
- Refactor Bnd_Box and Bnd_Box2d classes to introduce GetXMin, GetXMax, GetYMin, GetYMax, and GetZMin,
  GetZMax methods for improved clarity and encapsulation.
- Add Limits struct to represent box limits in both classes.
2025-11-25 19:29:53 +00:00
Pasukhin Dmitry
a6e68c7e70 Foundation Classes - TopLoc package update (#849)
- Performance optimizations including binary exponentiation for `Powered()`, optimized hash code computation, and fast-path optimizations for common operations
- Code modernization with `noexcept` qualifiers, `constexpr` for compile-time constants, and inline wrapper methods
2025-11-25 16:07:49 +00:00
Kirill Gavrilov
c64a167a96 Visualization - Improve detection of full cylinder/cone parameters #830
Parametric space of TopoDS_Face and ElSLib::ConeVIso() are now used for calculating parameters.
Scale factor is pre-applied.
2025-11-24 23:02:34 +00:00
Pasukhin Dmitry
6730c842bd Foundation Classes - Implement move semantics for math_Matrix and math_Vector (#841)
- Added move constructors and move assignment operators to `math_VectorBase`, `math_Matrix`, and `math_DoubleTab`
- Optimized move operations to avoid unnecessary copying when dimensions match and both objects use heap allocation
- Added comprehensive test coverage for move semantics with both heap-allocated (large) and buffer-allocated (small) objects
2025-11-24 11:14:19 +00:00
Pasukhin Dmitry
845e75e598 Foundation classes - Formatting fixes for deprecated (#851)
- Removed empty lines following `Standard_DEPRECATED` macro declarations to improve code consistency
- Removed `[[nodiscard]]` attributes from deprecated functions in Standard_Real, Standard_ShortReal, and Standard_Integer headers to resolve compiler compatibility issues
- Updated the clang-format-check action's regex pattern to better handle `Standard_DEPRECATED` macro variations
2025-11-23 20:52:02 +00:00
Pasukhin Dmitry
052c37669b Modeling Data - Add GeomHash and Geom2dHash packages (#845)
- Implementation of hashers for analytic curves (Line, Circle, Ellipse, Hyperbola, Parabola) and freeform curves (Bezier, BSpline, Trimmed, Offset) in both 2D and 3D
- Implementation of hashers for surfaces including elementary surfaces (Plane, Cylinder, Cone, Sphere, Torus) and derived surfaces (Revolution, LinearExtrusion, RectangularTrimmed, Offset)
- Comprehensive test coverage for all hasher implementations
2025-11-22 11:16:25 +00:00
Pasukhin Dmitry
851ac10c12 Foundation Classes - Modernize Bnd_B2 and Bnd_B3 (#838)
- Replace C-style arrays with std::array for internal storage (myCenter and myHSize fields)
  - Add constexpr noexcept constructors for all variants (default, gp_XY/gp_XYZ, and std::array overloads)
  - Add public getter methods Center() and HSize() for direct read access to internal fields
  - Add setter overloads accepting std::array parameters
  - Mark appropriate methods as constexpr and noexcept for compile-time evaluation and optimization guarantees
  - Clean up boolean comparisons (remove explicit Standard_True/False checks)
2025-11-19 11:34:04 +00:00
Dmitrii Kulikov
c479f6e000 Coding - Rework of Math global functions to stl (#833)
Majority of functions now simply call same functions from std namespace.
Functions that duplicate std namespace functionality are declared
deprecated.
Calls of deprecated functions are replaced with std functions calls.
2025-11-17 14:20:24 +00:00
Kirill Gavrilov
1a246afa2e Modeling, BSplineCache - Improve parameter validation logic #829
- Enhanced the parameter validation logic in BSplCLib_CacheParams to ensure correct handling of edge cases.
- Added checks for floating point precision when determining if the next knot should be used.
- Improved code readability by restructuring the return conditions.
2025-11-17 11:14:05 +00:00
Pasukhin Dmitry
c2375c78a6 Foundation Classes - Optimize Quantity package (#834)
- Converted validation macros to inline functions for better type safety
- Added `noexcept` specifiers to non-throwing functions for compiler optimization opportunities
- Added `constexpr` to compile-time evaluable functions (comparison operators, leap year calculation)
- Enhanced `Quantity_Color::StringName()` to return "UNDEFINED" instead of throwing exceptions
- Introduced shared time constants header for better maintainability
2025-11-17 09:54:17 +00:00
Pasukhin Dmitry
07239e2a8b Foundation Classes - Improve NCollection vector constructors (#835)
- Converted all constructor implementations from assignment-based to initializer list-based initialization
- Added `constexpr` and `noexcept` qualifiers to the default constructor where previously missing
- Removed `std::memset` usage in favor of compile-time initialization
2025-11-16 15:07:36 +00:00
Pasukhin Dmitry
e03b266234 Foundation Classes - Performance improvements for TopExp package (#831)
- Replaced raw pointer-based stack (`TopExp_Stack`) with `NCollection_Vector<TopoDS_Iterator>`
- Mark some methods noexcept
- Removed `myTop` field
2025-11-14 18:00:19 +00:00
luzpaz
79289339d8 Documentation - Fix whitespaces and typos (#824)
- Fixed excessive whitespace in multi-line comments
- Corrected spelling errors (e.g., "selectionnable" → "selectable", "begenning" → "beginning")
- Improved comment formatting and readability
2025-11-13 20:31:57 +00:00
Pasukhin Dmitry
570b34b666 Coding - Removing simple gxx files (#827)
- Converted generic template files to direct implementations for three packages (Extrema, MAT, TopBas/HLRAlgo)
- Removed preprocessor macro-based includes and replaced with concrete type definitions
- Updated CMake FILES lists to remove deprecated `.gxx` and `.lxx` files
2025-11-13 19:28:14 +00:00
Pasukhin Dmitry
ac9acb4fb1 Foundation Classes - Migrate BSplCLib from deprecated gxx macros (#826)
- Created BSplCLib_CurveComputation.pxx with template implementations
  for 2D/3D curve computation methods
- Updated BSplCLib_1.cxx to use explicit template instantiation for 2D types
  (gp_Pnt2d, gp_Vec2d, TColgp_Array1OfPnt2d)
- Updated BSplCLib_3.cxx to use explicit template instantiation for 3D types
  (gp_Pnt, gp_Vec, TColgp_Array1OfPnt)
- Removed deprecated BSplCLib_CurveComputation.gxx file
2025-11-13 18:03:39 +00:00
luzpaz
df59c53e79 Documentation - Fix whitespaces and typos (#821)
- Removed excessive whitespace between words in comments
- Removed <br> syntax
- Fixed spelling errors ("hilight" → "highlights", "texte" → "text")
- Improved comment formatting and structure
2025-11-13 09:30:53 +00:00
Pasukhin Dmitry
396b677095 Testing - Migrate QA DRAW tests to GTest (#823)
- Deletion of 20 legacy DRAW test files (.tcl format) from tests/bugs/ directories
- Addition of 15 new GTest C++ test files across multiple modules
- Removal of corresponding QA command implementations from TKQADraw
2025-11-13 09:28:07 +00:00
Pasukhin Dmitry
44df7106f3 Foundation Classes - Migrate Bnd_B2x and Bnd_B3x from macro-template to C++ templates (#820)
- Replaced macro-based template system with C++ templates for `Bnd_B2` and `Bnd_B3` classes
- Fixed incorrect use of Y-coordinate instead of Z-coordinate in transformation methods
- Added comprehensive GTest test coverage for both 2D and 3D bounding box classes
2025-11-12 18:46:10 +00:00
luzpaz
ed1d0c88cc Documentation - Fix whitespaces and typos (#819)
- Fixed inconsistent whitespace and line breaks in comments
- Corrected spelling errors ("witch" → "which", "sprcified" → "specified", "nul" → "null", etc.)
- Improved formatting consistency in documentation comments
2025-11-12 18:06:11 +00:00
dpasukhi
61d69fde9e Coding - Fix compilation issues on master
- Included <mutex> in Interface_Category.cxx to support thread synchronization.
- Added <windows.h> in Standard_StackTrace.cxx for Windows-specific functionality.
- Removed deprecated macro usage example in Standard_Macro.hxx to clean up the code.
2025-11-11 11:23:00 +00:00
dpasukhi
2962bc34f1 Coding - Remove unused Transfer_TransferDeadLoop includes 2025-11-11 09:20:27 +00:00
Pasukhin Dmitry
d166ff70e7 Testing - Migrate QA DRAW tests to GTest (#818)
- Removed 37 DRAW test scripts from `tests/bugs/` directories
- Added 31 new GTest C++ test files in appropriate `GTests/` directories
- Removed corresponding QAcommands implementations from QABugs source files
- Updated CMake FILES.cmake files to include new test files
2025-11-10 21:17:50 +00:00
Pasukhin Dmitry
49cf4baea6 Coding - Migrate from exception to local status flag for dead loop handling (#817)
- Transfer_ProcessForFinder_0.cxx: Replace exception throw/catch with
  local status flag in Transferring() method
- Transfer_ProcessForTransient_0.cxx: Same changes for consistency
- Transfer_TransferDeadLoop.hxx: Mark exception class as deprecated with
  Standard_DEPRECATED attribute

The Transfer_TransferDeadLoop class is kept alive but marked as deprecated
for backward compatibility. Dead loop detection is now handled via local
status flags instead of exceptions, improving performance and code clarity.
2025-11-10 21:17:26 +00:00
luzpaz
f9f94b6e36 Documentation - Fix whitespaces (#816)
- Standardized spacing in comment formatting (removing extra spaces after colons, between words)
- Fixed one typo in a parameter name within a comment
- Translated one French comment to English
2025-11-10 17:42:08 +00:00
luzpaz
a47cffd0eb Documentation - Fix whitespace and typos (#815) 2025-11-09 21:38:29 +00:00
Pasukhin Dmitry
989f00b9c4 Foundation Classes, math_Matrix - Remove redundant checks and inline methods (#814)
- Eliminated redundant member variables (`LowerRowIndex`, `UpperRowIndex`, `LowerColIndex`, `UpperColIndex`) that duplicated information already tracked by the underlying `math_DoubleTab Array`
- Inlined most `math_Matrix` methods into the `.lxx` file for better performance
- Updated all access patterns to use the `Array` member's methods directly
- Added `noexcept` qualifiers to non-throwing methods
- Modernized operator implementations (e.g., `operator-()` now returns `const`)
2025-11-09 15:27:10 +00:00