File: A9

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 (56 lines) | stat: -rw-r--r-- 1,086 bytes parent folder | download | duplicates (5)
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
52
53
54
55
56
puts "REQUIRED All: Faulty shapes in variables faulty_1 to faulty_2"

box b1 10 10 10
box b2 5 0 0 10 10 10

shape s1 So
shape s2 So
shape sh1 Sh
shape sh2 Sh

foreach f [lrange [explode b1 f] 0 4] { add $f sh1 }
foreach f [lrange [explode b2 f] 0 4] { add $f sh2 }

add sh1 s1
add sh2 s2

polyline p 1 1 1 1 9 1 1 9 9 1 1 9 1 1 1
mkplane f p
orientation f I
shape shell_int1 Sh
add f shell_int1
add shell_int1 s1

copy shell_int1 shell_int2
ttranslate shell_int2 13 0 0
add shell_int2 s2

bclearobjects
bcleartools
baddobjects s1
baddtools s2
bfillds

bbop r0 0
bbop r1 1
bbop r2 2
bbop r3 3

foreach r {r0 r1 r2 r3} {
  checkshape $r
  if {![regexp "OK" [bopcheck $r]]} {
    puts "Error: shape is self-interfered"
  }
}

checknbshapes r0 -vertex 8 -edge 12 -wire 5 -face 5 -shell 1 -solid 1
checkprops r0 -s 350

checknbshapes r1 -vertex 16 -edge 26 -wire 11 -face 11 -shell 1 -solid 1
checkprops r1 -s 650

# results of CUT operations should contain an extra shell
foreach r {r2 r3} {
  checknbshapes $r -vertex 12 -edge 16 -wire 6 -face 6 -shell 2 -solid 1
  checkprops $r -s 414
}