File: C4

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 (34 lines) | stat: -rw-r--r-- 1,035 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
restore [locate_data_file bug29481_boxes.brep] s
explode s f

# remove the hole inside compsolid

compound s_30 s_31 s_32 s_60 s_39 s_54 s_48 s_58 s_7 s_12 s_46 s_25 s_21 s_40 s_9 s_38 s_45 s_13 s_59 s_8 s_22 s_51 s_52 s_18 hole
removefeatures result s hole
checkshape result
checkprops result -s 4800 -v 8000
checknbshapes result -vertex 27 -edge 54 -wire 36 -face 36 -shell 8 -solid 8
CheckIsFeatureRemoved hole {v e f}

# check that the shape is still a compsolid
if {![regexp "COMPSOLID" [whatis result]]} {
  puts "Error: the type of input shape is lost during feature removal"
}

# check that the sharing is kept
if {![regexp "OK" [bopcheck result]]} {
  puts "Error: sharing is lost after feature removal"
}

# get history of the operation
savehistory rf_hist

# check modification of the solids
foreach solid [explode s so] {
  modified msol rf_hist $solid
  checkprops msol -s 600 -v 1000
  checknbshapes msol -vertex 8 -edge 12 -wire 6 -face 6 -shell 1 -solid 1 -t

  bcommon com msol $solid
  checkprops com -equal $solid
}