File: B4

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 (46 lines) | stat: -rw-r--r-- 904 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
35
36
37
38
39
40
41
42
43
44
45
46
puts "============"
puts "OCC26874"
puts "============"
puts ""
#######################################################################
# Implementation of the Partition operator in OCCT
#######################################################################

# split face by set of edges

cylinder cyl 0 0 0 0 0 1 10
set height 20
mkface f cyl 0 2*pi -$height $height

bclearobjects
bcleartools
baddobjects f

# create tool edges
compound edges

set nb_uedges 10
set pi2 [dval 2*pi]
set ustep [expr $pi2/$nb_uedges]
for {set i 0} {$i <= $pi2} {set i [expr $i + $ustep]} {
  uiso c cyl $i
  mkedge e c -25 25
  add e edges
}

set nb_vedges 10
set vstep [expr 2*$height/$nb_vedges]
for {set i -20} {$i <= 20} {set i [expr $i + $vstep]} {
  viso c cyl $i
  mkedge e c
  add e edges
}

baddctools edges

bfillds
bapisplit result

checkshape result
checknbshapes result -face 100
checkprops result -s 2513.27