mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-03 17:56:21 +03:00
46 lines
984 B
Plaintext
46 lines
984 B
Plaintext
puts "=========="
|
|
puts "OCC29338: Add Planes for Tolerance zones in Geometric tolerances"
|
|
puts "=========="
|
|
puts ""
|
|
|
|
pload ALL
|
|
|
|
box b 1 1 1
|
|
XNewDoc D
|
|
XAddShape D b
|
|
explode b f
|
|
XAddGeomTolerance D b_1
|
|
plane p 1 2 3 0 1 0
|
|
XSetGDTAffectedPlane D 0:1:4:1 p 2
|
|
set aTmpFile ${imagedir}/${casename}.xbf
|
|
SaveAs D $aTmpFile
|
|
Close D
|
|
XOpen $aTmpFile DD
|
|
set type [XGetGDTAffectedPlane DD 0:1:4:1 plane]
|
|
if {[lindex $type 0] != "orientation"} {
|
|
puts "Error: wrong affected plane type"
|
|
}
|
|
|
|
set res [dump plane]
|
|
set check [split $res {:, }]
|
|
if {[lindex $check 8] != 1} {
|
|
puts "Error: wrong affected plane"
|
|
}
|
|
if {[lindex $check 10] != 2} {
|
|
puts "Error: wrong affected plane"
|
|
}
|
|
if {[lindex $check 12] != 3} {
|
|
puts "Error: wrong affected plane"
|
|
}
|
|
if {[lindex $check 19] != 0} {
|
|
puts "Error: wrong affected plane"
|
|
}
|
|
if {[lindex $check 21] != 1} {
|
|
puts "Error: wrong affected plane"
|
|
}
|
|
if {[lindex $check 23] != 0} {
|
|
puts "Error: wrong affected plane"
|
|
}
|
|
Close DD
|
|
file delete -force $aTmpFile
|