File: bug21898

package info (click to toggle)
oce 0.18.3-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 301,548 kB
  • sloc: cpp: 1,190,609; ansic: 67,225; sh: 11,630; tcl: 7,954; cs: 5,221; python: 2,867; java: 1,522; makefile: 342; xml: 292; perl: 37
file content (42 lines) | stat: -rw-r--r-- 1,241 bytes parent folder | download | duplicates (5)
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
33
34
35
36
37
38
39
40
41
42
puts "========="
puts "OCC21898"
puts "========="
puts ""
###########################################################################
# Empty result of intersection between a surface of revolution and a line
###########################################################################

restore [locate_data_file bug21898_intersect_1.brep] a
explode a
mksurface s a_1
mkcurve l a_2
mkcurve l1 a_3

intersect r l s
regexp {Point +: +([-0-9.+eE]+), +([-0-9.+eE]+), +([-0-9.+eE]+)} [dump r] full pnt1_x pnt1_y pnt1_z
if { $pnt1_x == 0 || $pnt1_y == 0 || $pnt1_z == 0 } {
  puts "Error: there is not intersection between surface and first curve"
}

intersect r1 l1 s
regexp {Point +: +([-0-9.+eE]+), +([-0-9.+eE]+), +([-0-9.+eE]+)} [dump r1] full pnt2_x pnt2_y pnt2_z
if { $pnt2_x == 0 || $pnt2_y == 0 || $pnt2_z == 0 } {
  puts "Error: there is not intersection between surface and second curve"
}

vertex v r
distmini d v a_1
regexp {([-0-9.+eE]+)} [dump d_val] full dist1

vertex v1 r1
distmini d v1 a_1
regexp {([-0-9.+eE]+)} [dump d_val] full dist2

if { $dist1 > 1.e-7 || $dist2 > 1.e-7} {
  puts "Error: Wrong 3d point between surface and curve"
} else {
  puts "OK: Correct 3d point between surface and curve"
}

axo
set only_screen_axo 1