0030760: Modeling Algorithms - Intersection fails in Occt 7.3.0
[occt.git] / tests / bugs / modalg_7 / bug29530
CommitLineData
751d0553 1puts "========"
2puts "0029530: Cannot intersec line with torus"
3puts "========"
4puts ""
5
6line l 20849.8369546166 -51477.7110215995 0 0 0 1
7torus s1 20849.8369546165 -16150.0401784893 -0.465280626514954 0 0 -1 -1 0 0 36035.8315681522 1000.78348430862
8
9intersect result l s1
10
11set full1 ""
12regexp "Point\\s*:\\s*(\[-0-9.+eE\]+)\\s*,\\s*(\[-0-9.+eE\]+)\\s*,\\s*(\[-0-9.+eE\]+)\\s*" [dump result_1] full1 px1 py1 pz1
13
14if {$full1 != ""} {
15 checkreal PointX $px1 2.084983695461660e+004 1.0e-7 0
16 checkreal PointY $py1 -5.147771102159950e+004 1.0e-7 0
17 checkreal PointZ $pz1 7.066952174026758e+002 1.0e-7 0
18} else {
19 puts "Error : no intersection point"
20}
21
22set full2 ""
23regexp "Point\\s*:\\s*(\[-0-9.+eE\]+)\\s*,\\s*(\[-0-9.+eE\]+)\\s*,\\s*(\[-0-9.+eE\]+)\\s*" [dump result_2] full2 px2 py2 pz2
24
25if {$full2 != ""} {
26 checkreal PointX $px2 2.084983695461660e+004 1.0e-7 0
27 checkreal PointY $py2 -5.147771102159950e+004 1.0e-7 0
28 checkreal PointZ $pz2 -7.076257786556961e+002 1.0e-7 0
29} else {
30 puts "Error : no intersection point"
31}
32