0029807: [Regression to 7.0.0] Impossible to cut cone from prism
[occt.git] / tests / bugs / modalg_7 / bug27419
CommitLineData
cba287d6 1puts "TODO OCC27419 ALL: ERROR: OCC27419 is reproduced."
2
3puts "========"
4puts "OCC27419"
5puts "========"
6puts ""
7##############################################
8# Incorrect result of Edge/Face intersection
9##############################################
10
11restore [locate_data_file bug27419_ef.brep] b
12
13explode b
14mkcurve c b_1
15mksurface s b_2
16
17# Get intersection of Curve and Surface
18intersect i c s
19
20# Get coordinates of intersection of Curve and Surface
21set bug_info [string trim [dump i]]
22set x_Coord [lindex $bug_info 7]
23set x_Coord [string trim [string range $x_Coord 0 [expr {[string length $x_Coord] - 2}]]]
24set y_Coord [lindex $bug_info 8]
25set y_Coord [string trim [string range $y_Coord 0 [expr {[string length $y_Coord] - 2}]]]
26set z_Coord [lindex $bug_info 9]
27
28# Get projection of intersection point to Curve
29proj c $x_Coord $y_Coord $z_Coord
30
31#Get the length of projection
32set Proj_Len [lindex [string trim [length ext_1]] 4]
33
34#Get maximim value of tolerance for the EDGE
35set MaxTol_Edge [lindex [string trim [tolerance b_1]] 11]
36set MaxTol_Edge [string trim [string range $MaxTol_Edge [expr {[string first "=" $MaxTol_Edge] + 1}] [expr {[string length $MaxTol_Edge] - 1}]]]
37
38# ERROR if MaxTol_Edge < Proj_Len else OK
39if {$MaxTol_Edge < $Proj_Len} {
40 puts "ERROR: OCC27419 is reproduced. Result of Edge/Face intersection is incorrect."
41}