Commit Graph

6751 Commits

Author SHA1 Message Date
Pasukhin Dmitry
cd3fc87130 Coding, PerfMeter - Use NCollection_DataMap and TCollection_AsciiString (#774)
- Replace std::unordered_map<std::string, Stopwatch> with NCollection_DataMap<TCollection_AsciiString, Stopwatch>
- Update all method signatures to use TCollection_AsciiString instead of std::string
- Replace STL map operations with OCCT equivalents (Bind/Seek/ChangeSeek/IsBound/UnBind/Clear)
2025-10-29 08:48:47 +00:00
luzpaz
44110e06b9 Documentation - Fix various typos and comment uniformity (#771)
- Corrected parameter name from `tehNbIterations` to `theNbIterations` in constructor declaration
2025-10-28 13:49:33 +00:00
luzpaz
719ed090cb Documentation - Fix whitespace uniformity (#770)
- Standardized spacing in documentation comments by removing extra spaces between words
- Fixed inconsistent line breaks in multi-line comment blocks  
- Corrected minor spelling/grammar issues (e.g., "follow" → "follows", "form" → "from")
2025-10-28 08:26:46 +00:00
Pasukhin Dmitry
8da5219913 Shape Healing - Regression after #584 (#769)
Second iteration of fixing regressions.
Fixed issue with loops and incorrect shell created.
#584 affected some tests which were not updated on time.
Now all test cases are passed.
2025-10-27 21:27:16 +00:00
Pasukhin Dmitry
07c8845fc8 Revert "Data Exchange - Step supplemental geometry support (#744)" (#768)
This reverts commit 4ca8112dab.
2025-10-27 19:18:53 +00:00
luzpaz
859d1d6f6c Documentation - Fix various typos and comment uniformity (#767)
Fixes user-facing and non-user-facing typos.  
Also removes code comment justification and optimizes whitespace.
2025-10-27 10:42:17 +00:00
Pasukhin Dmitry
190c90c856 Configuration - Validate the configuration on CMake 3.10 and later (#762)
- adm/cmake/gtest.cmake: check CMake version before using FetchContent; emit a warning and skip FetchContent-based GoogleTest setup when CMake < 3.11.
- adm/cmake/occt_macros.cmake: wrap list(REMOVE_DUPLICATES ...) calls in if() checks to avoid operating on empty/unset variables.
2025-10-25 15:49:04 +01: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
c57f5e7647 Data Exchange, STEP - Replace String typedef and global temp buffers in StepData_StepReaderData (#756)
- Remove typedef TCollection_HAsciiString String and global statics (txtmes, initstr, subl)
- Use explicit string for message handles and function-local char txtmes buffers, drop constructor initstr logic, and update error/warning formatting.
- Reduce global mutable state and clarify message handling.
2025-10-22 18:03:50 +01:00
Pasukhin Dmitry
a6e4f8e20a Foundation, Testing - Use computational basis size for arrays in PLib_JacobiPolynomial tests (#755)
Allocate TColStd_Array1OfReal using aDegree = WorkDegree - 2*(NivConstr()+1) in BasisFunctionD0, BasisFunctionDerivatives and StressTests so array sizes match the actual number of basis functions and avoid sizing mismatches.
2025-10-22 16:42:45 +01:00
Pasukhin Dmitry
3b67b4b5da Foundation Classes - Optimize AsciiString with pre-defined string (#752)
- Rename internal members mystring/mylength -> myString/myLength across AsciiString
  implementation and related files to improve naming consistency.
- Add std::string_view support and efficient overloads:
  - constructor from string_view, AssignCat/Copy/Insert/SetValue from string_view
  - Cat, operators (+, +=) and comparison helpers accepting string_view
  - Token/StartsWith/EndsWith/Search helpers and literal-template overloads
  - operator std::string_view() to obtain a non-owning view
  - IsEqual/IsSameString/IsDifferent variants for string_view/C-string combinations
  - optimized literal templates to avoid runtime strlen for compile-time literals
- Improve memory handling and allocation helpers (allocate/reallocate/deallocate)
  and keep padding strategy consistent.
- Add Insert/AssignCat implementations that accept string_view and use memmove/memcpy.
- Fix calls in HAsciiString to use direct method instead of members
- Adjust misc. parameter names and small code-style/clarity improvements.

These changes enable zero-copy interop with std::string_view, reduce redundant C-string
operations for literals, and unify internal naming for maintainability.
2025-10-22 12:39:48 +01:00
Dmitrii Kulikov
4ca8112dab Data Exchange - Step supplemental geometry support (#744)
- Added three new GUIDs to identify supplemental geometry containers, references, and individual supplemental geometry items in the XCAF document structure
- Implemented logic to extract and convert STEP geometric items (curves and surfaces) into TopoDS shapes when they are referenced by PMI but not present in the main model
- Refactored duplicate code for finding PMI reference positions and geometry into reusable functions
2025-10-22 11:21:13 +01:00
Pasukhin Dmitry
1c0bb24479 Shape Healing - Regression after #584 (#753)
Fixed issue with unstable shape order after fixing.
Fixed reference data which was changed
2025-10-21 11:14:33 +01:00
Dmitrii Kulikov
de1fcc2018 Mesh - Import of STEP file crashes at the very end when visualizing the boundary curves (#745)
When an edge (BRepMeshData_Edge) has multiple PCurve curves (IMeshData_PCurve) with different orientations, the index array is filled for only one PCurve curve.
This would cause problems later, so a fix was made to fill index arrays for curves with another orientation.
2025-10-16 18:46:10 +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
Pasukhin Dmitry
184fb9bf56 Visualization - Unexpected moving with AIS_ViewCube (#727)
- Removes Euler angle storage and calculations that caused rotation instabilities
- Replaces complex coordinate transformations with direct camera vector manipulation
- Implements quaternion-based rotation logic using stored camera direction and up vectors
2025-10-16 14:13:50 +01:00
Dmitrii Kulikov
d54a7e0786 Modelling - Crash in BRepFilletAPI_MakeChamfer (#743)
- Refactored helper functions with clearer naming and improved parameter handling
- Added null safety checks to prevent crashes when edge lookup fails in face topology
- Removed debug code and simplified variable declarations for better maintainability
2025-10-16 08:54:40 +01:00
Pasukhin Dmitry
87c50319c7 Shape Healing - Optimize FixFaceOrientation (#584)
Refactor shell construction algorithm for improved performance:
- Add GetConnectedFaceGroups function using DFS to identify topologically 
  connected face groups before shell construction
- Replace O(nˆ3) iterations with pre-built connectivity maps (FaceEdgesMap, 
  EdgeFacesMap) using STL unordered_map with custom allocators for O(1) lookup.
- Process only the largest connected component first, significantly reducing 
  time complexity for large face sets
2025-10-11 12:19:50 +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
Dmitrii Kulikov
df7e26c79d Modeling - Crash in BRepOffsetAPI_MakePipeShell (#740)
Performed a basic refactoring of BRepFill_SectionPlacement::Perform()
  and fixed a crash.
2025-10-09 18:37:51 +01:00
Pasukhin Dmitry
0476fd3936 Testing - Add ShapeAnalysis_CanonicalRecognition unit tests (#720)
- Implements 20+ test cases covering curve recognition (line, circle, ellipse) and surface recognition (plane, cylinder, cone, sphere)
- Tests both simple canonical shapes and complex multi-segment/sewn geometry scenarios
- Includes error handling tests for invalid/null shapes
2025-10-09 11:27:04 +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
76b05809d0 Testing - Cover Boolean operation with GTests (#721)
- Added systematic Boolean operation test coverage using Google Test framework
- Implemented test utilities for shape creation, transformation, and validation
- Migrated existing Draw-based Boolean tests to C++ GTests for better automation
2025-10-08 11:50:42 +01:00
Rodrigo Brayner Lyra
b295b40387 Visualization - Fix method to transform AABB (#735)
Replace the incorrect implementation of Axis Aligned Bounding Boxes transformation to Jim Arvo's efficient AABB transformation algorithm described in his chapter in the Graphics Gems (1990) book.

The algorithm simplifies the number of operations necessary to transform the AABB. Instead of transforming the eight vertices of the original AABB, and then computing the bounding box of the transformed vertices, Arvo's algorithm works by forming both products for each component of the min and max point, and summing the smallest/largest terms, we arrive at the minimal/maximal value.
2025-10-07 20:19:11 +01:00
Dmitrii Kulikov
6b431882bc Modeling - Segfault on chamfer or fillet approaching ellipse (#738)
Fixed nullptr dereference
2025-10-07 20:15:37 +01:00
Dmitrii Kulikov
1c3b9acf9d Data Exchange - Hang in STEPCAFControl_Reader (#733)
Constructor of BRepTopAdaptor_FClass2d is updated to guarantee
processing of curves with large parameters values with small difference
between them.
2025-09-24 16:47:24 +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
bbf9fe96a7 Coding - Blame ignore for gxx formatting patch (#731)
Updated file .git-blame-ignore-revs to ignore gxx formatting commit
2025-09-21 11:18:30 +01:00
Pasukhin Dmitry
08c8482271 Coding - Applying formatting to gxx files (#730)
- Updated GitHub Action for ASCII Check and Clang-Format
- Formatted all gxx files in the src directory
2025-09-21 09:53:01 +01:00
Pasukhin Dmitry
4cd93baf2a Foundation Classes - EigenValuesSearcher improvements (#714)
- Complete replacement of handle-based arrays (`TColStd_HArray`) with direct `NCollection_Array` instances
- Comprehensive algorithm refactoring using the QL algorithm with Wilkinson shifts for improved numerical stability
- Enhanced documentation with detailed mathematical context and algorithm explanations
- Addition of comprehensive unit tests covering edge cases and numerical stability scenarios
2025-09-11 14:30:07 +01:00
Pasukhin Dmitry
e4edfec36f Foundation Classes - math Container optimization (#717)
Increase DoubleTab container buffer size to 64 from 16.
Optimize the vector initialisation with 5-10% increasing time.
  Before the creating was takes too much branching.
2025-09-11 09:36:05 +01:00
Pasukhin Dmitry
1b94e22897 Testing - Remove QANCollection package (#718)
- Removes all QANCollection header and source files that contained collection type definitions and test utilities
- Updates the build configuration to remove QANCollection from the package list
- Removes the QANCollection integration from the main QADraw factory
2025-09-10 18:31:12 +01:00
Pasukhin Dmitry
515e112564 Testing - Migrate QA NCollection to GTests (#709)
- Complete removal of old Draw Harness test infrastructure for NCollection classes
- Addition of new GTest files testing STL algorithm compatibility (min, max, replace, sort, reverse)
- Migration of OSD_Path and Handle operation tests to GTest format
2025-09-08 15:59:34 +01:00
Pasukhin Dmitry
86caa2d513 Testing - Add unit tests for Standard_ArrayStreamBuffer (#708)
- Replaces legacy DRAW command-based tests with modern GTest framework
- Removes the `OCC28887` DRAW command and associated test files
- Adds comprehensive unit test coverage for `Standard_ArrayStreamBuffer` functionality
2025-09-08 09:50:35 +01:00
Pasukhin Dmitry
7eee9549cb Coding - Remove OSD_MAllocHook class (#707)
- Complete removal of the `OSD_MAllocHook` class and its related handler implementations
- Removal of the Draw command "mallochook" that provided command-line interface to the memory tracking functionality
- Updates to build configuration to exclude the removed files
2025-09-08 09:50:07 +01:00
Pasukhin Dmitry
b07f0ca82f Testing - Fix GTests for TKMath in Debug (#706)
- Relaxed mathematical tolerances from extremely tight values (1.0e-15) to more reasonable ones (1.0e-10/1.0e-12) for debug mode compatibility
- Increased iteration limits to allow algorithms more time to converge in debug builds
- Added exception handling with EXPECT_NO_THROW to prevent test crashes in debug mode
2025-09-07 19:17:58 +01:00
Pasukhin Dmitry
7fdd2b62f9 Testing - Add unit tests for PLib functionality (#705)
- Introduced comprehensive unit tests for the Jacobi polynomial implementation in PLib, covering constructors, edge cases, Gauss integration points, weights, and basis function evaluations.
- Added tests for basic utility functions in PLib, including pole conversion and binomial coefficient calculations.
- Implemented checks for Hermite interpolation and polynomial evaluation with derivatives.
- Enhanced error handling and edge case testing for small and large coefficients.
- Initialised MaxError in PLib_DoubleJacobiPolynomial to ensure consistent behaviour during degree reduction.
2025-09-07 19:17:13 +01:00
Pasukhin Dmitry
80ce783ca2 Modeling - Fix array indexing bug in IntAna_IntQuadQuad::NextCurve method (#703)
Fixed a critical indexing bug in IntAna_IntQuadQuad::NextCurve where the
  method incorrectly used nextcurve[I] instead of nextcurve[I-1] for
  determining the theOpposite parameter.
This mismatch between 1-indexed API
  parameters and 0-indexed array access could lead to out-of-bounds memory
  access and incorrect curve connectivity determination.

Changes:
  - Fix IntAna_IntQuadQuad::NextCurve to use consistent I-1 indexing for both
   condition check and return value
  - Add comprehensive GTests covering NextCurve functionality, edge cases,
  and performance
  - Ensure proper error handling for invalid curve indices
2025-09-06 13:36:48 +01:00
Pasukhin Dmitry
7dbd20076b Testing - Resolving CICD issues (#702)
- Added missing `<algorithm>` include for C++ standard library functionality
- Suppressed unknown warning options in the macOS build configuration to prevent build failures
2025-09-06 11:14:31 +01:00
ikochetkova
0d30b42cb1 Shape Healing, STP Import - Revolved shape in STEP file is imported inverted (#699)
Make the degenerated torus bounded in two values of parameters processed as a regular to insert a seam edge properly.
2025-09-04 17:05:44 +01:00
Pasukhin Dmitry
e7e1f8a0a2 Data Exchange, DE Wrapper - Reorganisation of plugin system for Configuration Nodes (#696)
- Added Register and UnRegister methods to DE_ConfigurationNode for managing bindings with DE_Wrapper.
- Introduced DE_MultiPluginHolder to facilitate registration of multiple configuration nodes simultaneously.
- Created new plugin factory functions for various configuration nodes (DEBREP, DEXCAF, DEGLTF, DEIGES, DEOBJ, DEPLY, DESTEP, DESTL, DEVRML) to streamline their registration with DE_Wrapper.
- Removed unnecessary DE_PluginHolder instances from individual configuration node implementations.
- Updated CMake files to include newly created source files for each configuration node.
- Implemented singleton patterns in draw commands to ensure plugins are registered only once during initialization.
2025-09-03 16:51:18 +01:00
Pasukhin Dmitry
1f02122211 Testing - Fix macOS setup to install Mono separately (#697)
- Replaces single brew install command with multiple individual brew install commands
- Each package installation is wrapped with `|| true` to prevent failures from stopping the workflow
2025-08-30 17:16:23 +01:00
Dmitrii Kulikov
5bd288265f Mesh - Stack overflow when meshing (#695)
- Introduced `StackOfFrames` class to manage processing frames iteratively instead of recursively
- Modified `killTrianglesAroundVertex` method to collect victim nodes in a provided container rather than recursively processing them
- Replaced recursive depth-first traversal with iterative processing using the new stack-based approach
2025-08-29 22:49:53 +01:00
Pasukhin Dmitry
51abcfc61c Testing - Cover math module with GTests (#684)
- Extensive test coverage for core mathematical algorithms (Newton methods, optimization, linear algebra, root finding)
- Bug fix for proper iteration count tracking in `math_FunctionRoot`
- Bug fix for custom vector bounds handling in `math_SVD`
- Dependency update in `OSD_PerfMeter_Test` by replacing Boolean operations with mathematical computations
2025-08-24 19:52:47 +01:00
Kirill Gavrilov
8ae8540176 Draw - Fix message color mixing (#685)
Message color from previous message in Unix was mixed.
2025-08-24 18:00:48 +01:00
Pasukhin Dmitry
5c814b0f0f Coding - Dangerous use of 'cin' (#681)
- Replaced hardcoded buffer sizes with `constexpr size_t aBufferSize` constants
- Added `width()` calls to input streams before reading to prevent buffer overflows
- Applied consistent buffer size management across multiple input operations
2025-08-17 21:03:18 +01:00
Pasukhin Dmitry
5c8756830f Coding - Incorrect return-value check for a 'scanf'-like function (#680)
Fix sscanf condition checks in iges_lire function for better error handling
2025-08-17 21:01:32 +01:00
Pasukhin Dmitry
3eb7ce1ffd Coding, TKXSBase - Translation to English (#679)
- Updated French comments to English for better accessibility and understanding.
- Enhanced clarity of comments to better describe the functionality and purpose of the code.
- Ensured consistency in terminology and phrasing throughout the codebase.
- Made minor adjustments to comment formatting for improved readability.
2025-08-17 19:42:21 +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
45eefc4134 Coding, TKDEIGES - Translation to English (#678)
- Updated comments in IGESGeom_ToolCircularArc, IGESGeom_ToolCurveOnSurface, IGESGeom_ToolOffsetCurve, IGESGeom_ToolPlane, IGESGeom_ToolSplineSurface, IGESGeom_ToolTransformationMatrix, IGESGraph_ToolColor, IGESGraph_ToolDrawingUnits, IGESSelect, IGESSelect_Activator, IGESSelect_RebuildGroups, IGESSelect_SelectBypassGroup, IGESSelect_SelectBypassSubfigure, IGESSelect_SignStatus, IGESSelect_ViewSorter, IGESSelect_WorkLibrary, IGESToBRep, IGESToBRep_BRepEntity, IGESToBRep_BasicCurve, IGESToBRep_BasicSurface, IGESToBRep_TopoCurve, IGESToBRep_TopoSurface to improve readability and understanding.
- Translated French comments to English where applicable.
- Ensured comments accurately reflect the functionality and intent of the code.
2025-08-17 09:53:01 +01:00