5 #################################################
6 # Avoid inheritance of the BRepAlgoAPI_Check from BRepBuilderAPI_MakeShape
7 #################################################
9 puts "check simple box"
12 if {![regexp "The shape seems to be valid" [bopapicheck b1]]} {
13 puts "Error: The simple box is considered as invalid by BRepAlgoAPI_Check"
16 puts "add another box"
21 puts "check si compound"
23 if {![regexp "The shape is invalid" [bopapicheck c]]} {
24 puts "Error: Self-intersection is not detected"
27 if {![regexp "The shape seems to be valid" [bopapicheck c -si]]} {
28 puts "Error: Check on self-intersection is still enabled"
32 puts "increase tolerance of the vertices of the box to test Small edges detection"
34 foreach v [explode b1 v] {settolerance $v 5.}
36 if {![regexp "The shape is invalid" [bopapicheck b1 -si]]} {
37 puts "Error: Small edges are not detected"
40 if {![regexp "The shape seems to be valid" [bopapicheck c -si -se]]} {
41 puts "Error: Check on small edges is still enabled"
44 puts "b1 - invalid, b2 - ok"
46 if {![regexp "The first shape is invalid" [bopapicheck b1 b2]]} {
47 puts "Error: The check is invalid"
50 if {![regexp "The second shape is invalid" [bopapicheck b2 b1]]} {
51 puts "Error: The check is invalid"
57 if {![regexp "The shapes seem to be valid" [bopapicheck b1 b2 -op fuse -se -si]]} {
58 puts "Error: The check on types is invalid"
61 puts "check empty shape"
64 if {![regexp "The shape is empty" [bopapicheck c]]} {
65 puts "Error: Empty shape is not detected"
68 if {![regexp "The shapes are not valid for Boolean operation" [bopapicheck b2 c]]} {
69 puts "Error: Empty shape is not detected"
73 puts "check vertex/solid BOPs"
76 if {![regexp "The shapes seem to be valid" [bopapicheck b2 v -op common]]} {
77 puts "Error: The check on types is invalid"
80 if {![regexp "The shapes are not valid for Boolean operation" [bopapicheck b2 v -op fuse]]} {
81 puts "Error: The check on types is invalid"
84 if {![regexp "The shapes are not valid for Boolean operation" [bopapicheck b2 v -op cut]]} {
85 puts "Error: The check on types is invalid"
88 if {![regexp "The shapes seem to be valid" [bopapicheck b2 v -op tuc]]} {
89 puts "Error: The check on types is invalid"