0026874: Implementation of the Partition operator in OCCT
[occt.git] / tests / boolean / splitter / B4
1 puts "============"
2 puts "OCC26874"
3 puts "============"
4 puts ""
5 #######################################################################
6 # Implementation of the Partition operator in OCCT
7 #######################################################################
8
9 # split face by set of edges
10
11 cylinder cyl 0 0 0 0 0 1 10
12 set height 20
13 mkface f cyl 0 2*pi -$height $height
14
15 bclearobjects
16 bcleartools
17 baddobjects f
18
19 # create tool edges
20 compound edges
21
22 set nb_uedges 10
23 set pi2 [dval 2*pi]
24 set ustep [expr $pi2/$nb_uedges]
25 for {set i 0} {$i <= $pi2} {set i [expr $i + $ustep]} {
26   uiso c cyl $i
27   mkedge e c -25 25
28   add e edges
29 }
30
31 set nb_vedges 10
32 set vstep [expr 2*$height/$nb_vedges]
33 for {set i -20} {$i <= 20} {set i [expr $i + $vstep]} {
34   viso c cyl $i
35   mkedge e c
36   add e edges
37 }
38
39 baddctools edges
40
41 bfillds
42 bapisplit result
43
44 checkshape result
45 checknbshapes result -face 100
46 checkprops result -s 2513.27