File: A2

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 (80 lines) | stat: -rw-r--r-- 1,577 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
polyline p 0 0 0 10 0 0 10 0 10 5 0 10 5 0 5 0 0 5 0 0 0
mkplane f p
prism s f 0 5 0

# make the shape periodic
makeperiodic sp s -x 10 -z 10 -y 5

checkshape sp
checknbshapes sp -vertex 16 -edge 24 -wire 10 -face 10 -shell 1 -solid 1 -t
checkprops sp -s 350 -v 375

# get history of the operation
savehistory h

# check modification of the bottom and side faces
explode s f
modified m h s_1

checknbshapes m -vertex 6 -edge 7 -wire 2 -face 2 -t
explode m f
periodictwins t1 m_1
periodictwins t2 m_2

compound t1 t2 t
checknbshapes t -face 1 -t


explode s f
modified m h s_2

checknbshapes m -vertex 6 -edge 7 -wire 2 -face 2 -t
explode m f
periodictwins t1 m_1
periodictwins t2 m_2

compound t1 t2 t
checknbshapes t -face 1 -t


# repeat the shape
repeatshape res -x 1 -y 2

checkshape res
checknbshapes res -vertex 56 -edge 102 -wire 53 -face 53 -shell 6 -solid 6 -t
checkprops res -s 2100 -v 2250


# get repetition history
savehistory h

# get generations of bottom face
generated g h s_1

checkshape g
checknbshapes g -vertex 20 -edge 31 -wire 12 -face 12 -t
checkprops g -s 300

# get generations of the top face
generated g h s_3

checkshape g
checknbshapes g -vertex 16 -edge 20 -wire 6 -face 6 -t
checkprops g -s 150

foreach f [explode g f] {
  periodictwins t $f
  checkshape t
  checknbshapes t -wire 11 -face 11 -t
  checkprops t -s 275
}

# clear repetitions
clearrepetitions

savehistory h

# now generated for bottom face should be empty
if {![regexp "No shapes were generated from the shape." [generated g1 h s_1]]} {
  puts "Error: history is not cleared"
}