File: bug29530

package info (click to toggle)
opencascade 7.9.2%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 301,924 kB
  • sloc: cpp: 1,523,264; tcl: 10,159; cs: 5,173; java: 1,554; sh: 1,342; ansic: 827; xml: 699; makefile: 30; javascript: 22
file content (32 lines) | stat: -rw-r--r-- 1,032 bytes parent folder | download | duplicates (4)
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
puts "========"
puts "0029530: Cannot intersec line with torus"
puts "========"
puts ""

line l 20849.8369546166 -51477.7110215995 0 0 0 1
torus s1 20849.8369546165 -16150.0401784893 -0.465280626514954 0 0 -1 -1 0 0 36035.8315681522 1000.78348430862

intersect result l s1

set full1 ""
regexp "Point\\s*:\\s*(\[-0-9.+eE\]+)\\s*,\\s*(\[-0-9.+eE\]+)\\s*,\\s*(\[-0-9.+eE\]+)\\s*" [dump result_1] full1 px1 py1 pz1

if {$full1 != ""} {
  checkreal PointX $px1 2.084983695461660e+004 1.0e-7 0
  checkreal PointY $py1 -5.147771102159950e+004 1.0e-7 0
  checkreal PointZ $pz1 7.066952174026758e+002 1.0e-7 0
} else {
 puts "Error : no intersection point"
}

set full2 ""
regexp "Point\\s*:\\s*(\[-0-9.+eE\]+)\\s*,\\s*(\[-0-9.+eE\]+)\\s*,\\s*(\[-0-9.+eE\]+)\\s*" [dump result_2] full2 px2 py2 pz2

if {$full2 != ""} {
  checkreal PointX $px2 2.084983695461660e+004 1.0e-7 0
  checkreal PointY $py2 -5.147771102159950e+004 1.0e-7 0
  checkreal PointZ $pz2 -7.076257786556961e+002 1.0e-7 0
} else {
  puts "Error : no intersection point"
}