0028681: UnifySameDomain distorts face boundary when merges a chain of small linear...
[occt.git] / tests / bugs / modalg_7 / bug24954_5
CommitLineData
dfdfa61f 1puts "========"
2puts "OCC24954"
3puts "========"
4puts ""
5################################################################
6# BRepBuilderAPI_MakeFace adds wire with aribitary orientation
7################################################################
8
9polyline p -4.05 3.84 0.17 4.22 3.55 3.19 -1.32 -1.44 -1.57 -4.05 3.84 0.17
10wire w p
11mkplane f w
12
13# Verify orientation of shapes
14set bug_info [whatis p]
15if {[lindex $bug_info 5] != "FORWARD"} {
16 puts "ERROR: Input data is incorrect."
17}
18set bug_info [whatis w]
19if {[lindex $bug_info 5] != "FORWARD"} {
20 puts "ERROR: Input data is incorrect."
21}
22set bug_info [whatis f]
23if {[lindex $bug_info 5] != "FORWARD"} {
24 puts "ERROR: Input data is incorrect."
25}
26
27# Explode face (f) and verify wire orientation
28puts "Checks wires:"
29set wire_name_list [explode f w]
30set while_count 0
31while {$while_count < [llength $wire_name_list]} {
32 set bug_info [whatis [lindex $wire_name_list $while_count]]
33 if {[lindex $bug_info 5] != "FORWARD"} {
34 puts "ERROR: OCC24954 is reproduced. Wire [lindex $wire_name_list $while_count] has REVERSED orientation."
35 } else {
36 puts " [lindex $wire_name_list $while_count] has FORWARD orientation."
37 }
38 set while_count [expr {$while_count + 1}]
39}
40
41# Explode face (f) and verify edge orientation
42puts "Checks edges:"
43set edge_name_list [explode f e]
44set while_count 0
45while {$while_count < [llength $edge_name_list]} {
46 set bug_info [whatis [lindex $edge_name_list $while_count]]
47 if {[lindex $bug_info 5] != "FORWARD"} {
48 puts "ERROR: OCC24954 is reproduced. Edge [lindex $edge_name_list $while_count] has REVERSED orientation."
49 } else {
50 puts " [lindex $edge_name_list $while_count] has FORWARD orientation."
51 }
52 set while_count [expr {$while_count + 1}]
53}