File: bug24869

package info (click to toggle)
oce 0.18.3-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 301,548 kB
  • sloc: cpp: 1,190,609; ansic: 67,225; sh: 11,630; tcl: 7,954; cs: 5,221; python: 2,867; java: 1,522; makefile: 342; xml: 292; perl: 37
file content (66 lines) | stat: -rw-r--r-- 1,187 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
puts "=========="
puts "OCC24869"
puts "=========="
puts ""
###################################################
# OCAF testing framework extending
###################################################

NewDocument D MDTV-Standard

#1 - create box1
NewCommand D
set B1 [AddObject D]
set F1 [AddFunction D $B1 Box]
BoxDX D $B1 100
BoxDY D $B1 200
BoxDZ D $B1 300
InitLogBook D
AddDriver D Box Section PTxyz
ComputeFun D $F1
GetShape D $F1:2 Box1

#1 - create box2
NewCommand D
set B2 [AddObject D]
set F2 [AddFunction D $B2 Box]
BoxDX D $B2 150
BoxDY D $B2 200
BoxDZ D $B2 300
ComputeFun D $F2

NewCommand D
set FTr2 [PTranslateDXYZ D $B2 30 40 50]
ComputeFun D $FTr2
# get modified result
GetShape D $FTr2:2 Box2

#3 Make Section Box1 Box2
NewCommand D
set CS [AddSection D $B1 $B2]
ComputeFun D $CS
erase
GetShape D $CS:2 S

# Check result
NewCommand D
erase
ExploreShape D $CS:2:1 R

# should be 12 edges
set l1 [llength [directory R_*] ]

# should be 12 faces
set l2 [llength [directory oldR_*] ]

if { ${l1} == 12 } {
  puts "OK: Good edge number"
} else {
  puts "Error: Bad edge number"
}

if { ${l2} == 12 } {
  puts "OK: Good face number"
} else {
  puts "Error: Bad face number"
}