File: bug27419

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 (41 lines) | stat: -rw-r--r-- 1,349 bytes parent folder | download | duplicates (3)
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
puts "TODO OCC27419 ALL: ERROR: OCC27419 is reproduced."

puts "========"
puts "OCC27419"
puts "========"
puts ""
##############################################
# Incorrect result of Edge/Face intersection
##############################################

restore [locate_data_file bug27419_ef.brep] b

explode b
mkcurve c b_1
mksurface s b_2

# Get intersection of Curve and Surface
intersect i c s

# Get coordinates of intersection of Curve and Surface
set bug_info [string trim [dump i]]
set x_Coord [lindex $bug_info 7]
set x_Coord [string trim [string range $x_Coord 0 [expr {[string length $x_Coord] - 2}]]]
set y_Coord [lindex $bug_info 8]
set y_Coord [string trim [string range $y_Coord 0 [expr {[string length $y_Coord] - 2}]]]
set z_Coord [lindex $bug_info 9]

# Get projection of intersection point to Curve
proj c $x_Coord $y_Coord $z_Coord

#Get the length of projection
set Proj_Len [lindex [string trim [length ext_1]] 4]

#Get maximum value of tolerance for the EDGE
set MaxTol_Edge [lindex [string trim [tolerance b_1]] 11]
set MaxTol_Edge [string trim [string range $MaxTol_Edge [expr {[string first "=" $MaxTol_Edge] + 1}] [expr {[string length $MaxTol_Edge] - 1}]]]

# ERROR if MaxTol_Edge < Proj_Len else OK
if {$MaxTol_Edge < $Proj_Len} {
  puts "ERROR: OCC27419 is reproduced. Result of Edge/Face intersection is incorrect."
}