File: A8

package info (click to toggle)
opencascade 7.5.1%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 290,544 kB
  • sloc: cpp: 1,190,524; tcl: 15,703; cs: 5,173; java: 1,557; ansic: 1,174; sh: 901; xml: 699; perl: 54; makefile: 27
file content (51 lines) | stat: -rw-r--r-- 1,136 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
box b1 10 10 10
box b2 5 0 0 10 10 10

# fuse boxes
bfuse r b1 b2

# save Fuse history
savehistory fuse_hist

# simplify result
unifysamedom ru r

# save USD history
savehistory usd_hist


# check modifications of the faces of the boxes in two histories
explode b1 f
explode b2 f

foreach i {3 4 5 6} {
  if {[regexp "The shape has not been modified." [modified m1 fuse_hist b1_$i]]} {
    puts "Error: Incorrect history of Fuse";
    continue;
  }
  checknbshapes m1 -face 2

  if {[regexp "The shape has not been modified." [modified m2 fuse_hist b2_$i]]} {
    puts "Error: Incorrect history of Fuse";
    continue;
  }
  checknbshapes m2 -face 2

  # each face of the m1 and m2 should have been modified into the same face during USD

  compound usd_face

  foreach f [join [list [explode m1 f] [explode m2 f] ] ] {
    if {[regexp "The shape has not been modified." [modified u usd_hist $f]]} {
      puts "Error: Incorrect history of USD";
      continue;
    }
    checknbshapes u -vertex 4 -edge 4 -wire 1 -face 1
    checkprops u -s 150
    add u usd_face
  }

  checknbshapes usd_face -face 1
  checkprops u -s 150 -skip
  
}