2 # check history information
5 eval compound [explode result v] res_verts
6 eval compound [explode result e] res_edges
8 # get all vertices and edges of the input shape
9 eval compound [explode a v] input_verts
10 eval compound [explode a e] input_edges
17 # get removed vertices through the history
19 foreach v [explode input_verts] {
20 if {[regexp "Deleted." [isdeleted usd_hist $v]]} {
25 # get removed edges through the history
27 foreach e [explode input_edges] {
28 if {[regexp "Deleted." [isdeleted usd_hist $e]]} {
33 # check that all removed shapes are not present in the result
34 bsection sec_v res_verts rem_verts
35 if {[llength [explode sec_v v]]} {
36 puts "Error: the history of the removed vertices is incorrect."
39 bsection sec_e res_edges rem_edges
40 if {[llength [explode sec_e e]]} {
41 puts "Error: the history of the removed edges is incorrect."
44 # faces should not be removed at all
45 foreach f [explode a f] {
46 if {[regexp "Deleted." [isdeleted usd_hist $f]]} {
47 puts "Error: the faces should not be removed during unification."
55 # get all modified and not removed shapes into compound and
56 # compare the contents of the compound with the result shape
57 eval compound [explode a f] input_faces
59 compound all_hist_shapes
60 foreach comp {input_verts input_edges input_faces} {
61 foreach s [explode $comp] {
62 if {[regexp "Deleted." [isdeleted usd_hist $s]]} {
65 if {[regexp "The shape has not been modified." [modified s_mod usd_hist $s]]} {
66 add $s all_hist_shapes;
70 if {[regexp "COMPOUND" [whatis s_mod]]} {
71 foreach sm [explode s_mod] { add $sm all_hist_shapes }
73 add s_mod all_hist_shapes;
78 eval compound [explode result f] res_faces
79 compound all_res_shapes
80 foreach comp {res_verts res_edges res_faces} {
81 foreach s [explode $comp] { add $s all_res_shapes }
84 checknbshapes all_hist_shapes -ref [nbshapes all_res_shapes]
85 checkprops all_hist_shapes -s [lindex [sprops result -skip] 2] -l [lindex [lprops result -skip] 2] -skip