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"
}
|