1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0033187: Modeling Algorithms - Crash in postprocessing of imported shape

Problem: Desynchronization of behaviors of GeomAdaptor_Curve::NbIntervals and
 GeomAdaptor_Curve::Intervals functions. First calculates number of intervals, then
 array is created and second fills the array. In some cases the size of array
 is less than need for filling.

Change:
1. Added function BSplCLib::Intervals that calculates number of interval and fills
 the array with its (if needed).
2. Simplified the algorithm of intervals calculation.
3. GeomAdaptor_Curve::NbIntervals/Intervals and Geom2dAdaptor_Curve::NbIntervals/Intervals
 use BSplCLib::Intervals.
4. When creating an adapter for the base curve, the boundaries of the adapter for the offset curve are applied.
5. Test for problem shape was created: bugs modalg_8 bug33187.

Result: The new approach eliminates the problem of writing outside the array bounds.
This commit is contained in:
atereshi
2022-10-26 16:59:54 +03:00
committed by Vadim Glukhikh
parent aba5c241c6
commit f9990707fe
12 changed files with 355 additions and 1513 deletions

View File

@@ -0,0 +1,9 @@
puts "================================"
puts "0033187: Modeling Algorithms - Crash in postprocessing of imported shape"
puts "================================"
restore [locate_data_file bug33187.brep] s
if [catch { fixshape r s } catch_result] {
puts "${BugNumber}: Faulty"
}

View File

@@ -4,7 +4,7 @@ puts "====================================="
puts ""
set viewname ""
set length 6.30238
set length 6.30139
restore [locate_data_file bug27341_hlrsave.brep] a
COMPUTE_HLR $viewname $algotype

View File

@@ -1,4 +1,4 @@
puts "TODO OCC30286 ALL: Error : The length of result shape is 8.06872, expected 8.05281"
puts "TODO OCC30286 ALL: Error : The length of result shape is 7.9487, expected 8.05281"
puts "====================================="
puts "OCC27341: Incorrect exact HLR results"

View File

@@ -4,7 +4,7 @@ puts "====================================="
puts ""
set viewname "vbottom"
set length 8.39744
set length 8.40196
restore [locate_data_file bug27341_hlrsave.brep] a
COMPUTE_HLR $viewname $algotype

View File

@@ -1,4 +1,4 @@
puts "TODO OCC30286 ALL: Error : The length of result shape is 7.44464, expected 7.39488"
puts "TODO OCC30286 ALL: Error : The length of result shape is 7.4452, expected 7.39488"
puts "====================================="
puts "OCC27341: Incorrect exact HLR results"

View File

@@ -1,4 +1,4 @@
puts "TODO OCC30286 ALL: Error : The length of result shape is 9.10542, expected 9.47163"
puts "TODO OCC30286 ALL: Error : The length of result shape is 9.08401, expected 9.47163"
puts "====================================="
puts "OCC27341: Incorrect exact HLR results"

View File

@@ -4,7 +4,7 @@ puts "====================================="
puts ""
set viewname "vleft"
set length 7.64599
set length 7.64618
restore [locate_data_file bug27341_hlrsave.brep] a
COMPUTE_HLR $viewname $algotype

View File

@@ -4,7 +4,7 @@ puts "====================================="
puts ""
set viewname "vright"
set length 9.30381
set length 9.30402
restore [locate_data_file bug27341_hlrsave.brep] a
COMPUTE_HLR $viewname $algotype