1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
|
puts "TODO OCC26190 ALL: Error: Curve Number is bad"
puts "TODO OCC26190 ALL: Error: Length of intersection line is bad!"
puts "============"
puts "CR23471"
puts "============"
puts ""
#######################################################################
# Intersection algorithm produces overlapping intersection curves
#######################################################################
# Attention!!!!
# Change these values is strictly forbidden (see bug #26190)
set GoodNbCurv 1
set GoodLength 79655.615367318111
restore [locate_data_file OCC22790-cx.brep] b
explode b
mksurface s1 b_1
mksurface s2 b_3
intersect res s1 s2
set che [whatis res]
set ind [string first "3d curve" $che]
if {${ind} >= 0} {
#Only variable "res" exists
copy res res_1
}
set SumLength 0
set ic 1
set AllowRepeate 1
while { $AllowRepeate != 0 } {
set che [whatis res_$ic]
set ind [string first "3d curve" $che]
if {${ind} < 0} {
set AllowRepeate 0
} else {
set log [length res_$ic]
set exp_string "The length res_$ic is +(\[-0-9.+eE\]+)"
regexp ${exp_string} ${log} full len
set SumLength [expr $SumLength+$len]
incr ic
}
}
set NbCurv [expr {$ic - 1}]
if {$NbCurv == $GoodNbCurv} {
puts "OK: Curve Number is good!"
} else {
puts "Error: Curve Number is bad ($NbCurv curve(s) found, but $GoodNbCurv expected)!"
}
if { abs($SumLength - $GoodLength) < 0.01*$GoodLength } {
puts "OK: Length of intersection line is good!"
} else {
puts "Error: Length of intersection line is bad!"
puts "Expected length is: $GoodLength"
puts "Found length is: $SumLength"
}
|