Commit Graph

6904 Commits

Author SHA1 Message Date
Pasukhin Dmitry
848bf7f697 Foundation Classes - Enhance TCollection_ExtendedString with std::u16string_view support (#1009)
- Added constructor and assignment operator for std::u16string_view.
- Implemented conversion operator to std::u16string_view.
- Introduced methods to append std::u16string_view.
- Added Copy and assignment operator overloads for char16_t pointers.
- Fixed variable name inconsistencies (myLength vs mylength).
- Added new string manipulation methods: LeftAdjust, RightAdjust, LeftJustify, RightJustify, Center, Capitalize, Prepend, FirstLocationInSet, FirstLocationNotInSet, IntegerValue, IsIntegerValue, RealValue, IsRealValue, IsSameString.
2026-01-18 21:07:30 +00:00
Pasukhin Dmitry
13ab6349fd Documentation - Improve code examples in modeling algorithms (#1016)
- Updated `TopExp_Explorer` and `BRepTools_WireExplorer` usage to use modern constructor-based initialization instead of separate declaration and `Init()` calls
- Consolidated multi-line object construction patterns into single-line initializations
- Improved variable naming to follow OCCT conventions (e.g., `Ex1` → `anExpShell`, `builder` → `aBuilder`)
2026-01-18 18:24:30 +00:00
Pasukhin Dmitry
281d1475e2 Configuration - Accept empty FILES content (#1017)
Remove warning message for missing files in EXTRACT_PACKAGE_FILES function
2026-01-18 18:22:15 +00:00
Pasukhin Dmitry
5c253ac1c7 Documentation - Refactor documentation with new coding rules (#1013)
- Replaces `Handle(ClassName)` with `occ::handle<ClassName>` throughout documentation
- Updates `Standard_Integer`, `Standard_Real`, `Standard_Boolean`, `Standard_CString` to native C++ types (`int`, `double`, `bool`, `const char*`)
- Modernizes collection class references (e.g., `TDF_LabelSequence` to `NCollection_Sequence<TDF_Label>`)
2026-01-17 15:21:04 +00:00
Pasukhin Dmitry
3cda2770df Coding - Update AI Assistant guidelines (#1005)
- Updated handle syntax from `Handle(ClassName)` macro to `occ::handle<ClassName>` template
- Deprecated `Standard_*` type aliases in favor of native C++ types
- Removed package-specific collection aliases in favor of direct `NCollection_*` usage
2026-01-16 17:06:30 +00:00
Pasukhin Dmitry
b5cd7a8410 Coding - Suppress macOS system header warnings in multiple files (#997)
- Added clang diagnostic pragmas to suppress three specific warning types around macOS/iOS framework imports
- Added version-specific warning suppression for clang 20+ in the general warnings disable header
- Extended function cast warning suppression to cover clang's `-Wcast-function-type-mismatch`
2026-01-14 21:22:11 +00:00
Pasukhin Dmitry
0a1e8b7802 Coding - Include Standard_ErrorHandler header in OSD_signal (#996) 2026-01-14 21:21:12 +00:00
Dmitrii Kulikov
985287f213 Foundation Classes - Refactoring of gp_Pln (#1003)
- Renamed private member field from `pos` to `myPosition` throughout the class
- Added `[[nodiscard]]` attributes to getter and computation methods
- Introduced `SignedDistance()` methods for point, line, and plane to identify relative positions
- Refactored `Distance()` methods to use `SignedDistance()` internally, eliminating code duplication
- Made `gp_Ax3::Direct()` and `gp_Pln::Direct()` constexpr
2026-01-14 16:32:28 +00:00
Dmitrii Kulikov
c639199c01 Fixed warnings that appear when building with MSVC (#1004)
- Refactored loop control flow to use an `if` statement instead of a `for` loop with immediate `break`
- Changed variable type from `int` to `size_t` to match the expected type and eliminate conversion warnings
2026-01-14 14:49:43 +00:00
Pasukhin Dmitry
a36bca57a9 Coding - Clean up the FILES (#1002)
- Removed legacy metadata entries (EXTERNLIB, PACKAGES, DEFINES, FILES) that are no longer used by the build system
- Removed references to obsolete build artifacts (.lex, .yacc files) that appear to be superseded by generated .c/.h files
- Removed references to non-source files (README.md, .tcl scripts, GUID.txt) that shouldn't be listed in source file manifests
2026-01-14 14:46:42 +00:00
Pasukhin Dmitry
5d92701663 Testing - Update font installation process for Windows to use Noto Sans CJK (#999) 2026-01-14 09:41:44 +00:00
Pasukhin Dmitry
bfd3fcae2e Documentation - Fix issue with documentation build (#992)
- Modified Doxygen configuration to suppress documentation warnings and errors while enabling recursive example processing
- Removed sample documentation references from PDF and HTML file lists
- Updated example paths to include ViewerTest source files with recursive pattern matching
2026-01-12 09:06:59 +00:00
Pasukhin Dmitry
4afc8ef788 Coding - Optimization Box calculation in IntTools (#990)
- Optimized map lookup in `IntTools_SurfaceRangeLocalizeData::FindBox` by using `Seek()` instead of `IsBound()` + `operator()`
- Refactored surface handling functions to accept `BRepAdaptor_Surface` instead of `Handle(Geom_BSplineSurface)` to avoid redundant conversions
- Updated `ComputeGridPoints` to take both `BRepAdaptor_Surface` and `Handle(Geom_BSplineSurface)` parameters for accessing different surface properties
2026-01-09 15:16:13 +00:00
Pasukhin Dmitry
e1d36343e4 Foundation Classes - Inherited Standard_Failure from std::exception (#984)
First patch in iterative renovation of exceptions.

- Simplify exception classes to be container of data only.
- Removed redundant inclusion of <Standard_Type.hxx> in various header files across the project.
- Removed Set methods for failure and its define template.
- Removed Raise and Rerise static methods.
- Remove Instance and Throw methods
- Deprecated getting message with old approach, and moving to what()
- Update ErrorHandler to handle only specific list of exceptions.
2026-01-07 12:22:32 +00:00
Kirill Gavrilov
6c6f2ceb41 Coding - Use throw instead of legacy Standard_Failure::Raise (#983)
Replace Standard_*::Raise calls with throw statements for better exception handling
2026-01-05 19:17:00 +00:00
Kirill Gavrilov
078dfc44ae Foundation Classes, Standard_ErrorHandler - use thread_local stack instead of global mutex lock (#980)
Refactored Standard_ErrorHandler to use thread_local storage for the error handler stack
instead of a global list protected by mutex. This eliminates locking overhead entirely
since each thread only accesses its own error handlers.

Changes:
- Replaced global mutex-protected stack with thread_local Top pointer
- Simplified FindHandler() to directly return the thread-local Top
- Removed Catches() and LastCaughtError() methods (no longer needed)
- Added Raise() method for re-throwing caught exceptions
- Removed obsolete member variables: myStatus, myThread
- Deleted unused headers: Standard_HandlerStatus.hxx, Standard_JmpBuf.hxx, Standard_PErrorHandler.hxx
- Updated OCC_CATCH_SIGNALS macro to use new Raise() method
2026-01-05 17:03:00 +00:00
Dmitrii Kulikov
b9980c3c39 Shape Healing - GlueEdgesWithPCurves is not valid (#981)
- Removed non-functional pcurve handling code that was never properly executed
- Simplified the function to focus solely on 3D curve concatenation
- Improved code readability with better variable naming and modern C++ practices
2026-01-05 13:01:30 +00:00
Pasukhin Dmitry
463cf53106 Coding - Refactor reusing Extrema_ExtPS (#978)
- Eliminates redundant `Extrema_ExtPS` object creation by initializing once and performing multiple projections
- Removes unused `#include <Extrema_ExtPS.hxx>` directives from files that no longer directly instantiate the class
- Improves performance by avoiding repeated surface initialization overhead
2026-01-04 12:07:25 +00:00
Pasukhin Dmitry
6c24544fe1 Coding - Apply more flags from Clang-tidy (#977)
- Refactor boolean expressions and improve code readability across multiple files
- Simplified boolean expressions by removing unnecessary comparisons to true/false.
- Replaced explicit boolean checks with direct variable usage 

Used flags:
readability-static-accessed-through-instance
readability-simplify-boolean-expr
performance-for-range-copy
performance-move-const-arg
misc-unused-parameters
misc-redundant-expression
2026-01-03 12:18:59 +00:00
Pasukhin Dmitry
825b0bd782 Coding - Fix GCC warnings (#975)
- Removed unnecessary reference qualifiers (`&`) from `gp_Dir` variable declarations in geometric evaluation classes
- Initialized previously uninitialized variables (`DuvBuf`, `anFDOpenMode`) to prevent undefined behavior
- Removed redundant `Standard_EXPORT` from deleted copy constructors
- Added explicit base class initialization in `EnumeratedThread` copy constructor
- Replaced C-style cast with `reinterpret_cast` in `Quantity_ColorRGBA` for type safety
2026-01-02 14:34:45 +00:00
Pasukhin Dmitry
372e9431e9 Coding - Refactor BSplineCurve and BSplineSurface parameter preparation (#972)
- Introduced a new `PreparedParams` struct to encapsulate both parameter and span data in `GeomGridEval_BSplineCurve`.
- Updated `prepareParams` function to return `PreparedParams` instead of using output parameters for span data.
- Simplified the parameter preparation process in `GeomGridEval_BSplineSurface` by creating dedicated functions `prepareGridPoints` and `preparePairPoints` that return sorted UV points with span information.
- Removed redundant `locateSpan` and `computeSpansAndSort` methods from the public interface of `GeomGridEval_BSplineSurface`.
- Enhanced code readability and maintainability by reducing the number of parameters passed to functions and encapsulating related data.
2025-12-30 21:58:12 +00:00
Pasukhin Dmitry
bd99539eb2 Coding - Remove unused typedefs and includes, replace with forward declarations (#971)
- Deleted TopoDS_ListOfShape.hxx and removed its references in various files.
- Replaced instances of TopoDS_ListOfShape with NCollection_List in TopoDS_Builder, TopoDS_Iterator, and TopoDS_TShape.
- Updated CMake files to exclude TopoDS_ListOfShape from the build.
- Removed Geom2dConvert_SequenceOfPPoint and its usages, replacing them with NCollection_Sequence.
- Cleaned up Select3D and SelectMgr modules by removing Select3D_EntitySequence, Select3D_IndexedMapOfEntity, and SelectMgr_IndexedMapOfOwner.
- Adjusted includes in various files to use NCollection types instead of removed classes.
- Overall, this commit streamlines the codebase by eliminating unused types and reducing dependencies.
2025-12-29 22:31:23 +00:00
Pasukhin Dmitry
f675adaac0 Coding - Remove unused code and comments across various files (#968)
- Removed conditional compilation blocks (`#if 0`) that contained unused code in:
  - BRepTools_Modifier.cxx
  - AdvApp2Var_Data_f2c.hxx
  - AdvApp2Var_SysBase_baseinit.cxx
  - Extrema_FuncExtCS.cxx
  - Extrema_FuncExtSS.cxx
  - GeomProjLib.cxx
  - IntAna_IntLinTorus.cxx
  - IntAna2d_AnaIntersection_8.cxx
  - IntAna2d_Outils.cxx
  - ProjLib_CompProjectedCurve.cxx
  - ProjLib_ComputeApprox.cxx
  - ProjLib_ComputeApproxOnPolarSurface.cxx

- Cleaned up header files by ensuring proper end-of-file newlines in:
  - TKBRep_pch.hxx
  - GeomLib_Tool.hxx
  - MeshVS_SymmetricPairHasher.hxx
  - OpenGl_ShaderProgramDumpLevel.hxx
  - Graphic3d_ToneMappingMethod.hxx
2025-12-29 16:58:00 +00:00
Pasukhin Dmitry
a509566a28 Shape Healing - Unstable PCurve Processing (#967)
Added hot fix to keep old logic (loop were skipped).
Added TODO to fix for the ongoing release.
The ticket is added #966 in GH Issues.
2025-12-29 15:15:10 +00:00
Pasukhin Dmitry
c020fc2fad Coding - Clang-Tidy apply with refactoring (#965)
- Replacing empty constructor/destructor implementations with `= default`
- Removing redundant `virtual` keywords from override methods
- Replacing `NULL` and `0` with `nullptr`
- Replacing C headers with C++ equivalents (`<cstdio>`, `<cstring>`, etc.)
- Marking copy constructors/assignment operators as `= delete` for non-copyable classes
- Converting `void` parameter lists to empty parameter lists
- Replacing integer literals with appropriate boolean values
2025-12-29 11:55:04 +00:00
Pasukhin Dmitry
14d4e91171 Coding - Global Refactoring OCCT as a part of 8.0.0 (#955)
- Added automated migration scripts for handle syntax, standard types, and macros
- Deprecated legacy `Standard_*` types and macros in favor of native C++ equivalents
- Introduced modern `occ` namespace with template-based type checking helpers
- Enhanced NCollection macros to support variadic arguments for complex template types- Added automated migration scripts for handle syntax, standard types, and macros
- Deprecated legacy `Standard_*` types and macros in favor of native C++ equivalents
- Introduced modern `occ` namespace with template-based type checking helpers
- Enhanced NCollection macros to support variadic arguments for complex template types
2025-12-28 14:38:06 +00:00
Pasukhin Dmitry
b5d2fc73fb Coding - Refactor HArray and HSequence Definitions (#962)
- Replaced custom DEFINE_HARRAY1 and DEFINE_HSEQUENCE macros with typedefs to NCollection_HArray1 and NCollection_HSequence for various data types across multiple files.
- Updated header files in the following modules:
  - HLRAlgo
  - TKShHealing
  - TKBRep
  - TKG2d
  - TKG3d
  - TKGeomBase
  - TKMeshVS
  - TKV3d
- This change improves consistency and reduces the complexity of the codebase by utilizing the standard NCollection templates.
2025-12-28 11:42:24 +00:00
Pasukhin Dmitry
4c975e6a62 Coding - Refactor HLRBRep algorithms to replace Standard_Address (#961)
- Updated multiple files in the HLRBRep module to replace occurrences of Standard_Address with new type aliases HLRBRep_CurvePtr and HLRBRep_SurfacePtr.
- Introduced HLRBRep_TypeDef.hxx to define these type aliases for better clarity and maintainability.
- Adjusted constructors, method signatures, and internal variable types to use the new pointer types.
- Ensured compatibility with existing functionality while enhancing type safety and readability.
2025-12-28 11:16:27 +00:00
Pasukhin Dmitry
a15fed9b86 Coding - Temporary remove samples from the repository (#960)
- Moved tcl samples to resource folder.
- Clean up cmake from samples related settings.
- Removed CSharp samples from the repository.
- Removed MFC samples from the repository.
- Removed Qt samples from the repository.
- Removed Inspector samples from the repository.
- Removed glwin samples from the repository.
- Removed webgl samples from the repository.
- Removed xaml samples from the repository.
- Removed Java samples from the repository.
2025-12-27 21:51:28 +00:00
Pasukhin Dmitry
b3e58b5148 Modeling - Add optimized point-to-plane projection helper for batch processing (#959)
- Adds a new `PlaneProjector` struct that caches plane origin and direction components
- Replaces two instances of `ElSLib::Parameters` calls with the optimized projector for batch pole projection
2025-12-26 11:03:52 +00:00
Pasukhin Dmitry
5c63727727 Modeling - Optimize Bnd_BoundSortBox (#958)
Replaced std::vector with NCollection_Vector and std::unordered_map with NCollection_Array1 to use OCCT's native collection classes.
Avoid hashing to use array of elements with index directly.
Remove bit maps for storing the filling status and use the direct checking for emptiness.
Optimise allocations by using IncAllocator for all NCollection_Vector objects.
2025-12-26 09:39:11 +00:00
Pasukhin Dmitry
c3da25d597 Modeling - Implementation for math_Vector Resize functionality (#957)
math_VectorBase can be used with both stack and heap storage and resized when needed.
This is not often required, but when it is, the Resize method allows to do it efficiently,
  preserving existing data and optimizing memory usage.
2025-12-26 00:25:05 +00:00
Pasukhin Dmitry
0b9a5e0aab Foundation Classes - Optimize PLib polynomial evaluation (#953)
- Replaced `memcpy`/`memset` calls with direct initialization loops to enable register allocation for small dimensions (1-15)
- Introduced local stack arrays that reduce memory round-trips by writing to output only at the end of computation
- Fused derivative and value update loops to minimize redundant memory reads
2025-12-25 22:56:22 +00:00
Pasukhin Dmitry
ace750e3d5 Modeling - Refactor GeomGridEval with sequential evaluation (#952)
- Removed SetUVParams/SetParams methods from all GeomGridEval classes
- Updated all evaluation methods to accept parameters directly as arguments
- Added new EvaluatePoints methods for arbitrary UV pair evaluation
- Updated all callers to use the new direct evaluation pattern
2025-12-25 21:22:55 +00:00
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