mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-05-10 17:40:24 +08:00
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
31 lines
716 B
Plaintext
31 lines
716 B
Plaintext
puts "========"
|
|
puts "OCC28626"
|
|
puts "========"
|
|
puts ""
|
|
####################################################################################
|
|
## Boolean CUT operation fails due to exception while intersecting two conical faces
|
|
####################################################################################
|
|
|
|
cone c1 0 0 0 0 -1 0 45 0
|
|
cone c2 -23 -20 10 1 0 0 45 0
|
|
trimv tc1 c1 0 42.4264068711929
|
|
trimv tc2 c2 0 42.4264068711929
|
|
mkface f1 tc1
|
|
mkface f2 tc2
|
|
|
|
bop f1 f2
|
|
bopsection result
|
|
|
|
checkshape result
|
|
|
|
checknbshapes result -edge 3 -vertex 4
|
|
|
|
checkmaxtol result -ref 5.21731e-007
|
|
|
|
checkprops result -l 88.9692
|
|
|
|
smallview
|
|
don f1 f2 result
|
|
fit
|
|
checkview -screenshot -2d -path ${imagedir}/${test_image}.png
|