File: A4

package info (click to toggle)
opencascade 7.8.1%2Bdfsg1-7
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 293,924 kB
  • sloc: cpp: 1,249,635; tcl: 15,974; cs: 5,173; java: 1,554; sh: 1,354; ansic: 821; xml: 737; makefile: 30; javascript: 22
file content (41 lines) | stat: -rw-r--r-- 829 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
# Multiple cut of the plate by the rectangular tool

boptions -default
bsimplify -e 1 -f 1

box plate 100 20 20

explode plate e
mkcurve curve plate_10

set nbp 100
bounds curve t1 t2
set delta [dval ($t2-10-$t1)/$nbp]

for {set i 0} {$i < $nbp} {incr i} {
  set t [dval $t1+[dval $delta*$i]]
  cvalue curve $t x y z
  # create tool 
  box tool x y z 10 10 10
  # move it inside
  ttranslate tool 0 0 -5

  bclearobjects
  bcleartools
  baddobjects plate
  baddtools tool
  bfillds
  bapibop plate 2

  checkshape plate
  # number of faces should be the same from operation to operation
  checknbshapes plate -vertex 14 -edge 21 -wire 9 -face 9 -shell 1 -solid 1
}

# restore default values
boptions -default

checkshape plate
checkprops plate -s 8800 -v 35045

checkview -display plate -2d -path ${imagedir}/${test_image}_2.png