0030829: BRepExtrema_ShapeProximity crashes with shape from STL/WRL
[occt.git] / tests / bugs / modalg_5 / bug24889
1 puts "=========="
2 puts "OCC24889"
3 puts "=========="
4 puts ""
5 #####################################################################################
6 # Geom2dAPI_InterCurveCurve produces result with parameter outside the curve limits
7 #####################################################################################
8
9 pload QAcommands
10
11 set info [OCC24889]
12 regexp {Curve 0: +FirstParam += +([-0-9.+eE]+); +LastParam += +([-0-9.+eE]+); +IntParameter += +([-0-9.+eE]+)} $info full first1 last1 intp1
13 regexp {Curve 1: +FirstParam += +([-0-9.+eE]+); +LastParam += +([-0-9.+eE]+); +IntParameter += +([-0-9.+eE]+)} $info full first2 last2 intp2
14
15 if { $intp1 >= $first1 && $intp1 <= $last1 } {
16   puts "OK: IntParameter1 inside the curve limits"
17 } else {
18   puts "Error: IntParameter1 outside the curve limits"
19 }
20
21 if { $intp2 >= $first2 && $intp2 <= $last2 } {
22   puts "OK: IntParameter2 inside the curve limits"
23 } else {
24   puts "Error: IntParameter2 outside the curve limits"
25 }
26
27 2dcvalue c_1 $intp1 xx1 yy1
28 2dcvalue c_2 $intp2 xx2 yy2
29
30 dump xx1 yy1
31 dump xx2 yy2
32
33 set dist_val [dval (xx1-xx2)*(xx1-xx2)+(yy1-yy2)*(yy1-yy2)]
34 if { $dist_val < 1.0e-14 } {
35   puts "OK: point distance is good"
36 } else {
37   puts "Error: point distance is wrong"
38 }