0025138: SIGSEGV when sweeping along helix
[occt.git] / tests / bugs / xde / bug27447
CommitLineData
6f21399c
MS
1puts "========"
2puts "OCC27447"
3puts "========"
4puts ""
5##########################################
6# Add support for long IGES entity names
7##########################################
8
9pload OCAF
10
11# Part of samples/tcl/xde.tcl
12pcylinder pin 1 10
13pcylinder nut 2 2
14compound nut nut nuts
15explode nuts
16ttranslate nuts_1 0 0 7
17ttranslate nuts_2 0 0 1
18compound pin nuts_1 nuts_2 link
19NewDocument D XCAF
20XAddShape D link
21SetName D [XFindShape D pin] "Pin"
22SetName D [XFindShape D nut] "Nut"
23# Modification of label "Link" to "Very long link name" according to bug's description
24SetName D [XFindShape D link] "Very long link name"
25SetName D [XFindShape D link]:1 "Pin instance"
26SetName D [XFindShape D link]:2 "Nut instance 1"
27SetName D [XFindShape D link]:3 "Nut instance 2"
28
29# Write IGES file
30catch {exec rm ${imagedir}/bug27447_link.igs}
31WriteIges D ${imagedir}/bug27447_link.igs
32
33# Processing of IGES file
34set is_bug27447_fixed "FALSE"
35set file_27447 [open ${imagedir}/bug27447_link.igs RDONLY]
36while {[eof $file_27447] == 0} {
37 set file_27447_line [string trim [gets $file_27447]]
38 if {[string first "Very long link name" $file_27447_line] != -1} {
39 set is_bug27447_fixed "TRUE"
40 }
41}
42close $file_27447
43
44# Results validation
45if {[string compare $is_bug27447_fixed "FALSE"] == 0} {
46 puts "ERROR: OCC27447 is reproduced. Long labels in IGES files are not supported."
47}