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