0030760: Modeling Algorithms - Intersection fails in Occt 7.3.0
[occt.git] / tests / bugs / modalg_7 / bug29484
CommitLineData
a9810829 1puts "========"
2puts "OCC29484"
3puts "========"
4puts ""
5#################################################
6# Avoid inheritance of the BRepAlgoAPI_Check from BRepBuilderAPI_MakeShape
7#################################################
8
9puts "check simple box"
10
11box b1 2 2 2
12if {![regexp "The shape seems to be valid" [bopapicheck b1]]} {
13 puts "Error: The simple box is considered as invalid by BRepAlgoAPI_Check"
14}
15
16puts "add another box"
17
18box b2 1 1 1 2 2 2
19compound b1 b2 c
20
21puts "check si compound"
22
23if {![regexp "The shape is invalid" [bopapicheck c]]} {
24 puts "Error: Self-intersection is not detected"
25}
26
27if {![regexp "The shape seems to be valid" [bopapicheck c -si]]} {
28 puts "Error: Check on self-intersection is still enabled"
29}
30
31
32puts "increase tolerance of the vertices of the box to test Small edges detection"
33
34foreach v [explode b1 v] {settolerance $v 5.}
35
36if {![regexp "The shape is invalid" [bopapicheck b1 -si]]} {
37 puts "Error: Small edges are not detected"
38}
39
40if {![regexp "The shape seems to be valid" [bopapicheck c -si -se]]} {
41 puts "Error: Check on small edges is still enabled"
42}
43
44puts "b1 - invalid, b2 - ok"
45
46if {![regexp "The first shape is invalid" [bopapicheck b1 b2]]} {
47 puts "Error: The check is invalid"
48}
49
50if {![regexp "The second shape is invalid" [bopapicheck b2 b1]]} {
51 puts "Error: The check is invalid"
52}
53
54
55puts "test types"
56
57if {![regexp "The shapes seem to be valid" [bopapicheck b1 b2 -op fuse -se -si]]} {
58 puts "Error: The check on types is invalid"
59}
60
61puts "check empty shape"
62compound c
63
64if {![regexp "The shape is empty" [bopapicheck c]]} {
65 puts "Error: Empty shape is not detected"
66}
67
68if {![regexp "The shapes are not valid for Boolean operation" [bopapicheck b2 c]]} {
69 puts "Error: Empty shape is not detected"
70}
71
72
73puts "check vertex/solid BOPs"
74vertex v 1 1 1
75
76if {![regexp "The shapes seem to be valid" [bopapicheck b2 v -op common]]} {
77 puts "Error: The check on types is invalid"
78}
79
80if {![regexp "The shapes are not valid for Boolean operation" [bopapicheck b2 v -op fuse]]} {
81 puts "Error: The check on types is invalid"
82}
83
84if {![regexp "The shapes are not valid for Boolean operation" [bopapicheck b2 v -op cut]]} {
85 puts "Error: The check on types is invalid"
86}
87
88if {![regexp "The shapes seem to be valid" [bopapicheck b2 v -op tuc]]} {
89 puts "Error: The check on types is invalid"
90}