1puts "================" 2puts "OCC23051" 3puts "================" 4puts "" 5###################################################################################### 6# Bug in BRepExtrema_DistShapeShape (through BRepExtrema_DistanceSS0 7###################################################################################### 8 9set BugNumber OCC23051 10 11# create edges and find minimal distance 12plane p 0 0 0 0 0 1 13mkface f p -10 10 -10 10 14vertex v 0 0 1 15distmini r f v 16 17# get start and end vertices -- these should be solutions on f and v 18set sol [explode r v] 19 20set status1 0 21# check distances in correct order 22distmini d1 [lindex $sol 0] f 23distmini d2 [lindex $sol 1] v 24set d1 [dval d1_val] 25set d2 [dval d2_val] 26 27puts "Distances from solutions to relevant objects: $d1, $d2" 28if { $d1 > 1e-7 || $d2 > 1e-7 } { 29 puts "Error: distances are non-zero!" 30 set status1 1 31} 32 33set status2 0 34# check distances in swapped order 35distmini d1 [lindex $sol 0] v 36distmini d2 [lindex $sol 1] f 37set d1 [dval d1_val] 38set d2 [dval d2_val] 39 40puts "Distances from solutions to swapped objects: $d1, $d2" 41if { $d1 < 0.1 || $d2 < 0.1 } { 42 puts "Error: swapped distances are zero, i.e. solutions are swapped!" 43 set status2 1 44} 45 46# Resume 47puts "" 48if { ${status1} != 0 && ${status2} != 0 } { 49 puts "Faulty ${BugNumber}" 50} else { 51 puts "OK ${BugNumber}" 52} 53 54 55