Commit Graph

7070 Commits

Author SHA1 Message Date
Pasukhin Dmitry
e7d1148e8f Foundation Classes - Enhance MathRoot and MathSys with new utilities (#954)
- Added comprehensive testing infrastructure for trigonometric root finding with multiple edge cases
- Introduced optimized 2D Newton solver with gradient descent fallback and bounds checking
- Created domain management utilities for 1D/2D parameter spaces
- Fixed critical bugs in trigonometric root finding algorithm
2025-12-25 21:21:59 +00:00
Pasukhin Dmitry
fee21ceac4 Modeling - Integrate GeomGridEval_Surface and enhance surface isoline evaluation (#951)
- Refactored polyhedron initialization to use `GeomGridEval_Surface` for grid-based evaluation
- Implemented isoline optimization in surface evaluators (1D curve extraction for 1×N/N×1 grids)
- Reorganized tests: moved BSpline surface tests to dedicated file and added comprehensive isoline validation tests
2025-12-24 16:19:34 +00:00
Pasukhin Dmitry
ba26818b18 Modeling - Fix partial torus creation with inverted V range (#928)
- Added height-ordering detection methods (`IsHeightInverted()`, `AreHeightsEqual()`) to `BRepPrim_OneAxis`
- Fixed edge vertex ordering and wire direction flags to handle inverted heights
- Replaced preprocessor macros with modern C++ enums in anonymous namespace
- Added comprehensive GTest suite for `BRepPrimAPI_MakeTorus`
- Refactored template-based code generation to explicit implementations across multiple packages
2025-12-24 12:35:09 +00:00
Pasukhin Dmitry
b3052a4002 Modeling - Fix 0-based index in BRep_Tool::CurveOnSurface call (#949)
Fixed incorrect loop index initialization in GlueEdgesWithPCurves function.
The loop for iterating PCurves started from index 0, but BRep_Tool::CurveOnSurface
requires 1-based indexing (returns immediately when Index < 1).

This bug caused the first PCurve to be skipped, potentially leading to
incorrect edge gluing results in ShapeUpgrade_UnifySameDomain.

Changed: for (int aCurveIndex = 0;; ...) -> for (int aCurveIndex = 1;; ...)
2025-12-23 23:55:16 +00:00
Pasukhin Dmitry
bb0d8200fa Modeling - Refactor extrusion and revolution Utils to accept pre-computed curve values (#948)
Refactored Geom_ExtrusionUtils.pxx and Geom_RevolutionUtils.pxx to provide
Calculate* functions that accept pre-computed curve values (point, D1, D2, D3).
This follows the pattern established in Geom_OffsetSurfaceUtils.pxx.

Changes:
- Added CalculateD0/D1/D2/D3/DN functions to both Utils files that work with
  pre-computed curve data instead of requiring curve objects with methods
- Updated template functions D0/D1/D2/D3/DN to call the Calculate functions,
  eliminating code duplication within the Utils files
- Updated GeomGridEval_SurfaceOfExtrusion to use Geom_ExtrusionUtils::Calculate*
- Updated GeomGridEval_SurfaceOfRevolution to use Geom_RevolutionUtils::Calculate*
- Fixed bug in GeomGridEval_BSplineSurface::prepare() where out-of-bounds
  parameters were not properly stored after clamping by BSplCLib::LocateParameter()

This refactoring ensures a single source of truth for surface evaluation formulas,
fixing potential regression from commit 5870232236 where duplicated formulas in
GeomGridEval implementations could diverge from the canonical Utils implementations.
2025-12-23 22:38:05 +00:00
Pasukhin Dmitry
8491bf4cee Coding, TKHLR - Replace Standard_Address with typed HLRBRep_Surface pointers (#947)
Refactor TKHLR module to eliminate usage of Standard_Address (void*)
for surface parameters, replacing them with type-safe HLRBRep_Surface*
pointers. This improves code readability, type safety, and enables
better compiler diagnostics.

Key changes:
- HLRBRep_Data: Change iFaceGeom member from Standard_Address to
  HLRBRep_Surface*, removing all associated casts
- HLRBRep_SurfaceTool: Update all methods to take const HLRBRep_Surface*
- HLRBRep_Surface: Make NbUIntervals/NbVIntervals const-qualified
- HLRBRep_InterCSurf: Use typed pointer via type alias
- HLRBRep_Intersector: Remove Standard_Address from public interface
- HLRBRep_ThePolyhedronOfInterCSurf: Use HLRBRep_Surface* directly
- HLRBRep_TheCSFunctionOfInterCSurf: Use typed pointer member
- HLRBRep_TheQuadCurvExactInterCSurf: Use HLRBRep_Surface* parameter
- Template instantiation files (_0.cxx): Change #define to typedef
  for ThePSurface to ensure correct const semantics with templates
2025-12-23 14:10:28 +00:00
Pasukhin Dmitry
5870232236 Modeling - Optimize geometry grid evaluating (#908)
- Introduced `GeomGridEval` package with specialized evaluators for analytical surfaces (plane, cylinder, sphere, cone, torus) and parametric surfaces (Bezier, BSpline, offset)
- Refactored extrema computation in `Extrema_GenExtSS`, `Extrema_GenExtPS`, and `Extrema_GenExtCS` to use batch grid evaluation
- Added comprehensive derivative computation support (D0-D3, DN) for all surface types
2025-12-23 14:10:04 +00:00
Pasukhin Dmitry
0ad3a1a297 Foundation Classes - Modernize TKMath with new packages (#944)
- Added six new packages: MathUtils, MathPoly, MathLin, MathOpt, MathRoot, MathSys, and MathInteg
- Implemented modern template-based algorithms with consistent result structures and error handling
- Added comprehensive test files for all new packages
2025-12-22 16:52:23 +00:00
Pasukhin Dmitry
a425c6882a Foundation Classes - Improve BVH Box and Rays (#882)
- Refactored Add method in BVH_Box to utilize in-place component-wise operations, reducing temporary vector creation.
- Introduced precomputed reciprocal direction in BVH_Ray for faster ray-box intersection tests.
- Updated RayBoxIntersection methods to leverage the new reciprocal direction for optimal performance.
- Enhanced documentation for clarity on new functionalities and optimizations.
2025-12-22 16:51:46 +00:00
Pasukhin Dmitry
fe2595e21a Modeling - Refactor Evaluator classes to inline Utils and variant-based Adaptors (#935)
This commit completes the refactoring of geometry evaluator classes, replacing polymorphic Handle-based evaluators with inline template utilities and std::variant-based data storage in adaptor classes.

Key changes:

1. Removed GeomEvaluator and Geom2dEvaluator packages:
   - Deleted GeomEvaluator_Curve, GeomEvaluator_Surface base classes
   - Deleted GeomEvaluator_OffsetCurve, GeomEvaluator_OffsetSurface
   - Deleted GeomEvaluator_SurfaceOfExtrusion, GeomEvaluator_SurfaceOfRevolution
   - Deleted Geom2dEvaluator_Curve, Geom2dEvaluator_OffsetCurve

2. Added private utility headers (.pxx files) with inline template functions:
   - Geom_OffsetCurveUtils.pxx - offset curve evaluation
   - Geom_OffsetSurfaceUtils.pxx - offset surface evaluation
   - Geom_ExtrusionUtils.pxx - surface of extrusion evaluation
   - Geom_RevolutionUtils.pxx - surface of revolution evaluation
   - Geom2d_OffsetCurveUtils.pxx - 2D offset curve evaluation

3. Refactored GeomAdaptor_Curve:
   - Moved BezierData and BSplineData structs inside the class
   - Added std::variant<monostate, OffsetData, BezierData, BSplineData> for type-specific evaluation data
   - Removed separate myBSplineCurve and myCurveCache members
   - Updated all evaluation methods to use variant-based access

4. Refactored GeomAdaptor_Surface:
   - Changed ExtrusionData and RevolutionData to use Handle(Adaptor3d_Curve) instead of Handle(GeomAdaptor_Curve) for flexibility
   - Changed RevolutionData to store gp_Ax1 instead of separate AxisLoc/AxisDir
   - Updated OffsetData to store Handle(Geom_OffsetSurface) for osculating surface queries instead of creating new Geom_OsculatingSurface

5. Updated Geom_OsculatingSurface:
   - Renamed UOscSurf/VOscSurf methods to UOsculatingSurface/VOsculatingSurface for consistency with Geom_OffsetSurface public API

6. Fixed specialized adaptor classes:
   - GeomAdaptor_SurfaceOfLinearExtrusion - removed evaluator, uses variant
   - GeomAdaptor_SurfaceOfRevolution - removed evaluator, uses variant
   - Geom2dAdaptor_Curve - updated to use variant-based data
   - Adaptor2d_OffsetCurve - updated to use Geom2d_OffsetCurveUtils

7. Fixed Geom_SurfaceOfRevolution:
   - Updated utility calls to use gp_Ax1 parameter instead of separate XYZ

8. Added missing includes in dependent files:
   - Adaptor3d_HSurfaceTool.cxx - added GeomAdaptor_Curve.hxx
   - GeomAdaptor.cxx - added Adaptor3d_Surface.hxx, GeomAbs_SurfaceType.hxx
   - Extrema_GenExtPS.cxx - added Adaptor3d_Curve/Surface.hxx, GeomAbs_IsoType.hxx
   - TopOpeBRepTool_GEOMETRY.cxx - added Geom2dAdaptor_Curve.hxx
   - BRepAdaptor_Curve2d.cxx - updated ShallowCopy for variant

Benefits:
- Reduced virtual function call overhead in hot evaluation paths
- Better code locality with inline template functions
- Simplified class hierarchy without abstract evaluator base classes
- More efficient memory layout with variant instead of polymorphic handles
- Consistent method naming across related classes
2025-12-21 10:28:25 +00:00
Pasukhin Dmitry
568ced2558 Modeling Data - Fix curve concatenation to use actual endpoints (#926)
GeomConvert_CompCurveToBSplineCurve::Add() was incorrectly using
  first/last poles for G0 continuity checks instead of actual curve
  endpoints. For non-clamped or periodic B-splines, poles may not
  coincide with curve start/end points, causing concatenation to fail
  or produce incorrect results.

Changed to use StartPoint()/EndPoint() methods which properly
  evaluate the curve at its parameter bounds.
2025-12-20 20:57:27 +00:00
Pasukhin Dmitry
915340f72c Shape Healing - Remove edges from map during face unification in ShapeUpgrade_UnifySameDomain (#941)
- Added calls to `RemoveEdgeFromMap()` after removing edges from `InternalEdges` collection
2025-12-20 20:56:07 +00:00
Pasukhin Dmitry
8a2df59d6c Coding - Add constexpr compatibility to more gp classes (#933)
- Added constexpr to constructors and methods in both classes, with special handling for already-normalized inputs
- Refactored coordinate access methods to avoid pointer arithmetic (incompatible with constexpr)
- Implemented a dual-path approach: fast path for normalized inputs (constexpr-compatible) and slow path for runtime normalization
2025-12-19 16:12:21 +00:00
Pasukhin Dmitry
e417b0c408 Foundation Classes - Refactor math_DirectPolynomialRoots (#937)
Modernized and refactored the polynomial root-finding implementation
with improved numerical stability and modern C++ practices.

Key changes:

1. Implementation refactoring (math_DirectPolynomialRoots.cxx):
   - Extracted helper functions into anonymous namespace for better encapsulation
   - Introduced ScaledCoefficients struct for coefficient scaling operations
   - Added separate functions for cubic root cases (three real, one real, multiple)
   - Replaced deprecated OCCT math functions with std:: equivalents
     (std::abs, std::sqrt, std::pow, std::log, std::cos, std::sin, std::atan, std::max)
   - Improved code documentation with algorithm references

2. Header modernization (math_DirectPolynomialRoots.hxx):
   - Added comprehensive Doxygen documentation for all public methods
   - Renamed private members to follow OCCT conventions (myDone, myRoots, etc.)
   - Moved inline implementations from .lxx file directly into header
   - Removed math_DirectPolynomialRoots.lxx file (merged into .hxx)

3. Test improvements:
   - Added test fixture class for math_DirectPolynomialRoots with helper methods
   - Extended test coverage with numerical stability tests
   - Added regression tests for problematic quartic cases
   - Added Geom2dGcc_Circ2d3Tan tests for BUC60622 regression case

4. Minor fixes:
   - Removed unused #include <iostream> from test file
   - Updated FILES.cmake to remove deleted .lxx file
   - Fixed test case expected values in bug28626_2
2025-12-19 16:07:59 +00:00
Pasukhin Dmitry
f64e2dfeb5 Modeling - Complete code sharing for IntCurveSurface Polyhedron classes (#936)
Completed the migration of IntCurveSurface_ThePolyhedronOfHInter and
HLRBRep_ThePolyhedronOfInterCSurf to fully utilize shared template
functions in IntCurveSurface_PolyhedronUtils.pxx.

The original commit fff55ee5fc introduced the .pxx template pattern but
only migrated 4 functions, leaving significant code duplication between
the two polyhedron implementations

Changes:
- Extended IntCurveSurface_PolyhedronUtils.pxx with 15 additional
  template functions: AllocateArrays, Destroy, NbTriangles, NbPoints,
  Triangle, TriConnex, PlaneEquation, Contain, FillBounding, IsOnBound,
  ComputeMaxDeflection, ComputeMaxBorderDeflection,
  SetDeflectionOverEstimation, Parameters, Point (3 overloads)
- Refactored both .cxx files to delegate all logic to PolyUtils namespace

This aligns the Polyhedron classes with other properly migrated classes
(Polygon, Inter, QuadricCurveExactInter) where the Utils.pxx contains
all shared logic and .cxx files are minimal wrappers.
2025-12-18 15:47:08 +00:00
Pasukhin Dmitry
d8992095c2 Testing - Disable usage of VTK by default (#939)
Update default value for 'use-vtk' input to 'false' in build-occt and configure-occt actions
2025-12-18 14:00:23 +00:00
Pasukhin Dmitry
1d8add2970 Coding - Translate French comments and modernize constants (#932)
This commit performs safe code cleanup across multiple modules:

1. French to English comment translations:
   - ApplicationFramework: TNaming, TDF, TDataStd packages
   - ModelingAlgorithms: BRepFill, TopOpeBRepBuild, TopOpeBRepTool,
     NLPlate, FairCurve, IntSurf, Contap, ShapeFix, MAT2d, LocOpe
   - ModelingData: ProjLib, GeomLib, GeomConvert, IntAna, AppDef,
     GCPnts, Hermit, BinTools, LProp
   - Visualization: PrsDim, AIS, V3d packages

2. Constexpr modernization:
   - Convert static const variables to constexpr
   - Replace #define macros with constexpr variables
   - Add anonymous namespaces for internal constants
   - Affected files: V3d_View, V3d_CircularGrid, V3d_RectangularGrid,
     Graphic3d_FrameStats, PrsDim_*, Convert_*ToBSplineSurface,
     math_BrentMinimum, and others

3. Code organization:
   - Wrap file-scope constants in anonymous namespaces
   - Use consistent naming convention (THE_* prefix)

No functional changes - all modifications are comment-only or
compile-time constant improvements that preserve identical runtime
behavior.
2025-12-17 10:23:13 +00:00
Pasukhin Dmitry
4727f7c049 Modeling Data - Refactor offset curve and surface evaluators (#930)
Extract derivative calculation logic from GeomEvaluator and
  Geom2dEvaluator classes into dedicated utility headers:
- Geom_OffsetSurfaceUtils.pxx for 3D offset surface derivatives
- Geom_OffsetCurveUtils.pxx for 3D offset curve derivatives  
- Geom2d_OffsetCurveUtils.pxx for 2D offset curve derivatives
- Geom_ExtrusionUtils.pxx for extrusion surface calculations
- Geom_RevolutionUtils.pxx for revolution surface calculations

Utility functions provide unified handling of singular and non-singular
  cases with osculating surface support for higher-order derivatives.

Buffer management uses NCollection_LocalArray for stack-safe allocation
  with heap fallback when sizes exceed expected limits.

Test case expectations updated to reflect improved calculation accuracy.
2025-12-16 21:06:40 +00:00
Pasukhin Dmitry
e268a55440 Coding, BRepClass3d_SolidExplorer - Remove unused Bnd_Box and related code (#931)
Cleans up the BRepClass3d_SolidExplorer class by removing the
  unused Bnd_Box member and associated code,
  including preprocessor directives and function definitions.
2025-12-16 21:03:30 +00:00
Pasukhin Dmitry
4cdee629a6 Mesh - Fix point-in-polygon check for CCW polygons in BRepMesh_Delaun (#920)
The isVertexInsidePolygon method uses the winding number algorithm,
  which computes cumulative angles from the test point to polygon vertices.
  For a point inside a polygon, this sum should be ±2π.

The gp_Vec2d::Angle method uses an inverted sign convention where
  CCW rotation gives negative angles. For CCW polygons, the total angle
  is -2π, but the original check only accepted +2π.

Changed the condition from:
    std::abs(Angle2PI - aTotalAng) > Precision::Angular()
to:
    std::abs(std::abs(aTotalAng) - Angle2PI) > Precision::Angular()

This correctly handles both CCW (-2π) and CW (+2π) polygon orientations.
2025-12-16 15:04:00 +00:00
Pasukhin Dmitry
7398ebb353 Modeling Algorithms - Replace HLRAlgo_PolyData::Box with Bnd_Box (#923)
Replace custom HLRAlgo_PolyData::Box struct with standard Bnd_Box class
to leverage its built-in update functionality and reduce code duplication.

Changes:
- Remove HLRAlgo_PolyData::Box struct definition
- Update UpdateGlobalMinMax methods to use Bnd_Box::Update()
- Simplify bounding box computation logic using Bnd_Box methods
- Use C++17 structured bindings with Bnd_Box::Get()
2025-12-16 13:21:43 +00:00
Pasukhin Dmitry
bd3ce7be7c Coding - Implement move semantics and default constructor for CSLib_Class2d (#919)
- Added a default constructor to CSLib_Class2d for creating empty classifiers.
- Implemented move constructor and move assignment operator to optimize resource management.
- Updated IntTools_FClass2d and BRepTopAdaptor_FClass2d to utilize the new move semantics, eliminating unnecessary dynamic memory allocations.
- Replaced deprecated pointer-based storage with NCollection_Sequence for better memory management.
- Removed the obsolete BRepTopAdaptor_SeqOfPtr class to streamline the codebase.
2025-12-16 13:18:42 +00:00
Pasukhin Dmitry
4a9f416b8c Coding - Fix unnecessary loop iteration in BRepLib::BuildCurve3d (#921)
BRep_Tool::CurveOnSurface expects Index >= 1, but the loop started
  from ii = 0, resulting in a wasted iteration that always returned
  a null pointer.

Fixes #0032371
2025-12-16 09:22:48 +00:00
Pasukhin Dmitry
fff55ee5fc Modeling Algorithms - Refactor IntCurveSurface and HLRBRep intersection packages (#912)
Modernized curve/surface intersection algorithms by replacing preprocessor-based
generic programming (.gxx macros) with C++ templates (.pxx headers):

IntCurveSurface package (TKGeomAlgo):
- Introduced IntCurveSurface_Inter.pxx with callback-based template functions
  for intersection algorithms, replacing IntCurveSurface_Inter.gxx
- Created IntCurveSurface_InterUtils.pxx with utility template functions for
  surface decomposition, UV clamping, and quadric intersection handling
- Added IntCurveSurface_PolygonUtils.pxx for polygon construction utilities
- Added IntCurveSurface_PolyhedronUtils.pxx for polyhedron construction utilities
- Added IntCurveSurface_QuadricCurveExactInterUtils.pxx for exact quadric
  intersection computations
- Converted standalone implementation files from macro instantiation (_0.cxx)
  to direct template usage (.cxx)
- Removed obsolete .gxx and .lxx files

HLRBRep package (TKHLR):
- Updated HLRBRep_InterCSurf to use new IntCurveSurface template utilities
- Converted HLRBRep polygon, polyhedron, and intersection classes to use
  modern template instantiation pattern
- Removed legacy macro-based instantiation files (_0.cxx)

This refactoring improves code maintainability, enables better IDE support
and debugging, and aligns with modern C++ practices while preserving
the existing API and functionality.
2025-12-15 20:38:53 +00:00
Pasukhin Dmitry
6571d532bf Coding - Optimize memory management in BOPAlgo classes (#915)
- Moved temporary allocator reset to the end of the iteration in BOPAlgo_PaveFiller to prevent memory accumulation.
- Introduced a separate temporary allocator for per-iteration data in BOPAlgo_FillIn3DParts, enhancing memory reclamation during processing.
- Cleared face map before resetting the allocator in BOPAlgo_Tools to ensure efficient memory usage.
2025-12-15 18:43:42 +00:00
Andrej730
be9b447204 Foundation Classes - Remove redundant pragma lib comment in OSD_Host.cxx (#902) 2025-12-15 16:57:10 +00:00
Pasukhin Dmitry
ed3f3ee95f Coding - Prevent copy and move operations in BRepAlgoAPI_BuilderAlgo (#913)
- Deleted copy and move constructors and assignment operators in BRepAlgoAPI_BuilderAlgo to ensure non-copyability and non-movability, preventing potential double-free issues.
- Added comprehensive unit tests to verify the non-copyable and non-movable nature of BRepAlgoAPI_BuilderAlgo and its derived classes.
- Updated CMake files to include the new test source file for build integration.
2025-12-15 16:55:45 +00:00
dpasukhi
c1f6a13240 Coding - Bump version to 8.0.0-rc3 V8_0_0_rc3 2025-12-15 12:49:25 +00:00
Pasukhin Dmitry
787a80fbe8 Build - Fix C++ standard options and NOMINMAX scope (#907)
- Fix C++ standard dropdown: split "C++23 C++26" into separate options
- Move NOMINMAX define from MSVC-only to all WIN32 compilers
2025-12-12 21:56:44 +00:00
Pasukhin Dmitry
e5888e6d19 Modeing - BSpline Cache Optimised calls for Local (#906)
- Added `D0Local`, `D1Local`, `D2Local`, `D3Local` methods to `BSplCLib_Cache` and `BSplSLib_Cache` classes
- Added accessor methods to `Geom_BSplineCurve` and `Geom_BSplineSurface` for direct handle access to internal arrays
- Comprehensive test coverage for both curve and surface cache implementations
2025-12-12 20:11:29 +00:00
Pasukhin Dmitry
2919e1baa1 Foundation Classes - Optimize BSpline data containers with constexpr and validation (#897)
Refactored BSplSLib_DataContainer and BSplCLib_DataContainer_T structs:
  - Use compile-time constexpr THE_MAX_DEGREE for array sizes
  - Remove constructors with runtime initialization overhead
  - Add standalone validateBSplineDegree() functions for degree checks
  - Eliminate unnecessary zero-initialization of stack buffers
  - Replace Standard_Real/Standard_Integer with native double/int types

  This improves performance by avoiding runtime memset of large arrays
  (~2800 doubles for surfaces, ~200 for curves) on every B-spline evaluation.
2025-12-08 19:57:34 +00:00
Pasukhin Dmitry
cb19690573 Testing - Update Ref tests mesh and offset test cases (#895)
Update private test reports after #892 #890 #894 #889
2025-12-08 12:40:03 +00:00
Pasukhin Dmitry
57fcedf49c Shape Healing - Revert BSpline check for ShapeConstruct_ProjectCurveOnSurface (#894)
- Updated isBSplineCurveInvalid to check for uneven parameterization speed and determine the need for ProjLib usage.
- Enhanced the logic for computing parameterization speed across knot intervals.
- Simplified the handling of B-spline curves with problematic knot spacing by directly utilizing ProjLib for projection.
- Improved overall clarity and maintainability of the code by removing redundant checks and streamlining parameter handling.
2025-12-08 12:39:17 +00:00
Pasukhin Dmitry
3b8185bafb Shape Healing - Optimize PCurve projection (#890)
- Implemented various test cases including projections of lines, circles, and B-splines on different surface types (planes, cylinders, spheres, and toroids).
- Refactored ShapeConstruct_ProjectCurveOnSurface to improve handling of periodic surfaces and edge cases.
- Updated header files to reflect new type aliases and improved structure for better readability and maintainability.
- Added a new function `extractBSplineCurve` to streamline the extraction of B-spline curves from both trimmed and untrimmed curves.
- Refactored `isBSplineCurveInvalid` to utilize the new extraction function, improving clarity and reducing code duplication.
- Updated `generateCurvePoints` to leverage the new extraction method for better handling of B-spline curves.
- Replaced std::vector with NCollection_Vector for better memory management in isBSplineCurveInvalid.
- Enhanced rebuildBSpline function to improve knot adjustment logic while preserving curve geometry.
- Introduced a new utility class, SurfaceProjectorWithCache, to enhance the projection of points onto B-spline surfaces by caching pole positions and their UV parameters.
2025-12-08 09:08:13 +00:00
Pasukhin Dmitry
9ba63b850e Modeling - Enhance periodic curve handling in ChFi3d_Builder (#892)
- Updated the intersection logic to check for non-null C2dint1 when determining periodicity of 3D curves.
- Improved robustness of the PerformIntersectionAtEnd function to prevent potential issues with null parameters.
2025-12-07 23:53:15 +00:00
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