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