1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00
occt/tests/bugs/caf/bug23766_5
luz paz 7b5e532f83 0031939: Coding - correction of spelling errors in comments [part 7]
Fix various typos

Fixed via codespell v2.1.dev
2021-01-20 21:27:44 +03:00

76 lines
2.2 KiB
Plaintext
Executable File

puts "=========="
puts "OCC23766"
puts "=========="
puts ""
########################################################
# Shape orientation processing mechanism, redesign
########################################################
## test for keeping Orientation (std)
erase
NewDocument D BinOcaf
#1 - create box
NewCommand D
set B2 [AddObject D]; ## add object
set F2 [AddFunction D $B2 Box]; ## add function
BoxDX D $B2 190; ## set arguments of this function
BoxDY D $B2 290
BoxDZ D $B2 390
InitLogBook D; ## initialize (clean) internal maps of labels
AddDriver D Box Attach
ComputeFun D $F2; ## compute the function
GetShape D $F2:2 Box2; ## check result
#2 - make selections keeping orientation
explode Box2 F
explode Box2_1 E
explode Box2_3 E
don Box2_1_1 Box2_3_4
set Sel1 [AttachShape D Box2_1_1 ${B2} ${B2} 1]; ## set attachment keeping orientation of the edge
set Sel2 [AttachShape D Box2_3_4 ${B2} ${B2} 1]; ## set attachment keeping orientation of the edge
#3 - check orientation of the selected shapes
GetShape D 0:1:2:1:2 E1
set info1 [whatis E1]
## to be: E1 is a shape EDGE FORWARD Modified Orientable
if { [regexp "FORWARD" $info1] != 1 } {
puts "Error: orientation of E1 is incorrect"
} else {
puts "OK: orientation of E1 is correct"
}
GetShape D 0:1:3:1:2 E2
set info2 [whatis E2]
## to be: E2 is a shape EDGE REVERSED Modified Orientable
if { [regexp "REVERSED" $info2] != 1 } {
puts "Error: orientation of E2 is incorrect"
} else {
puts "OK: orientation of E2 is correct"
}
#4 - test persistence: check orientation after retrieving (to be the same as before)
file delete -force ${imagedir}/bug23766_ttt1.cbf
NewCommand D
SaveAs D ${imagedir}/bug23766_ttt1.cbf
Close D
##unset D
Open ${imagedir}/bug23766_ttt1.cbf D
GetShape D 0:1:2:1:2 E1
set info3 [whatis E1]
## to be: E1 is a shape EDGE FORWARD Modified Orientable
if { [regexp "FORWARD" $info3] != 1 } {
puts "Error: orientation of E1 is incorrect"
} else {
puts "OK: orientation of E1 is correct"
}
GetShape D 0:1:3:1:2 E2
set info4 [whatis E2]
## to be: E2 is a shape EDGE REVERSED Modified Orientable
if { [regexp "REVERSED" $info4] != 1 } {
puts "Error: orientation of E2 is incorrect"
} else {
puts "OK: orientation of E2 is correct"
}