mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-08-09 07:20:52 +08:00
0911d065ff
In order to avoid using empty strings in the names of the assemblies in the XCAF document after reading step file for cases when description or name is defined by only 1 space character method TCollection_AsciiString::Length() was replaced on the method TCollection_AsciiString::UsefullLength(). Test case for issue CR27169 Eliminating warning
48 lines
1.2 KiB
Plaintext
48 lines
1.2 KiB
Plaintext
puts "=========="
|
|
puts "OCC27169"
|
|
puts "=========="
|
|
puts ""
|
|
########################################################################
|
|
# Suspitious behavior of importing names during STEP import
|
|
########################################################################
|
|
|
|
pload DCAF
|
|
|
|
ReadStep D [locate_data_file bug27169_robot01.step]
|
|
|
|
set label_1 0:1:1:1:1
|
|
set label_2 0:1:1:1:2
|
|
set label_3 0:1:1:1:3
|
|
set label_4 0:1:1:1:4
|
|
|
|
set Name_1 [GetName D ${label_1}]
|
|
set Name_2 [GetName D ${label_2}]
|
|
set Name_3 [GetName D ${label_3}]
|
|
set Name_4 [GetName D ${label_4}]
|
|
|
|
puts "Name_1='${Name_1}'"
|
|
puts "Name_2='${Name_2}'"
|
|
puts "Name_3='${Name_3}'"
|
|
puts "Name_4='${Name_4}'"
|
|
|
|
if (![regexp {NAUO1} ${Name_1}]) {
|
|
puts "Error: Name of entitie ${label_1} is bad"
|
|
} else {
|
|
puts "OK: Name of entitie ${label_1} is good"
|
|
}
|
|
if (![regexp {NAUO2} ${Name_2}]) {
|
|
puts "Error: Name of entitie ${label_2} is bad"
|
|
} else {
|
|
puts "OK: Name of entitie ${label_2} is good"
|
|
}
|
|
if (![regexp {NAUO3} ${Name_3}]) {
|
|
puts "Error: Name of entitie ${label_3} is bad"
|
|
} else {
|
|
puts "OK: Name of entitie ${label_3} is good"
|
|
}
|
|
if (![regexp {NAUO4} ${Name_4}]) {
|
|
puts "Error: Name of entitie ${label_4} is bad"
|
|
} else {
|
|
puts "OK: Name of entitie ${label_4} is good"
|
|
}
|