1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-07-20 12:45:50 +03:00
ika 369a38aac2 0026931: [Regression in 6.9.0] Exporting a face throws an exception
Writing periodic BSpline surfaces to IGES:
Replace segmentation of surface to setting new origin.
Fix face bounds if its length (in U or V) is more than period.

Segmentation of BSpline curve/surface:
Throw exception if segment length more than period.

Fix test case bugs moddata_1 bug14782:
bounds of segmentation must be the same as curve bounds, according to issue description.

Changes in classes Geom2d_BSplineCurve, Geom_BSplineCurve, Geom_BSplineSurface:
- Replace *Raise_if macros with unconditional exceptions where it does not affect on performance.
- Update comments in .hxx files in regard of raised exceptions.
2016-01-13 15:22:59 +03:00

77 lines
1.8 KiB
Plaintext
Executable File

puts "========================"
puts "OCC14782"
puts "========================"
puts ""
#######################################################################
# Method segment works wrongly for periodical BSpline curve
#######################################################################
set BugNumber OCC14782
proc GetPercent {Value GoodValue} {
set Percent 0.
if {${GoodValue} != 0.} {
set Percent [expr abs(${Value} - ${GoodValue}) / abs(double(${GoodValue})) * 100.]
} elseif {${Value} != 0.} {
set Percent [expr abs(${GoodValue} - ${Value}) / abs(double(${Value})) * 100.]
} else {
set Percent 0.
}
return ${Percent}
}
restore [locate_data_file OCC14782.draw] res
bounds res t1 t2
set bounds_list [dump res]
puts ""
if { [llength ${bounds_list}] < 7 } {
puts "Bad bounds_list"
puts "Faulty ${BugNumber}"
} else {
set periodic_type [lindex ${bounds_list} 6]
puts "periodic_type=${periodic_type}"
if { ${periodic_type} != "periodic" } {
puts "1. Faulty ${BugNumber}"
} else {
puts "1. OK ${BugNumber}"
}
}
set ll1 [lindex [length res] end]
puts "length1=${ll1}"
segment res t1 t2
set segment_list [dump res]
puts ""
if { [llength ${segment_list}] < 7 } {
puts "Bad segment_list"
puts "Faulty ${BugNumber}"
} else {
set periodic_type [lindex ${segment_list} 6]
puts "periodic_type=${periodic_type}"
if { ${periodic_type} != "periodic" } {
puts "2. OK ${BugNumber}"
} else {
puts "2. Faulty ${BugNumber}"
}
}
set ll2 [lindex [length res] end]
puts "length2=${ll2}"
set percent_max 0.1
set length_percent [GetPercent ${ll1} ${ll2}]
puts "length_percent = ${length_percent}"
puts ""
if { ${length_percent} > ${percent_max} } {
puts "3. Faulty ${BugNumber}"
} else {
puts "3. OK ${BugNumber}"
}