0031685: Data Exchange, STEPCAFControl_Reader - NULL dereference on translating PLACE...
[occt.git] / tests / bugs / step / bug31685_3
1 puts "==================================================="
2 puts " 0031685: Data Exchange, STEPCAFControl_Reader - NULL dereference on translating PLACED_DATUM_TARGET_FEATURE "
3 puts "==================================================="
4 puts ""
5
6 pload DCAF
7
8 # Read file
9 ReadStep D [locate_data_file bug31685_3.stp] 
10 XGetOneShape res D
11
12 # Checking
13 checkshape res f
14 set dump [XDumpNbDGTs D f]
15 set info "
16
17  NbOfDimensions          : 60
18   NbOfDimensionalSize    : 20
19   NbOfDimensionalLocation: 2
20   NbOfAngular            : 0
21   NbOfWithPath           : 0
22   NbOfCommonLabels       : 1
23  NbOfTolerances          : 38
24   NbOfGTWithModifiers    : 3
25   NbOfGTWithMaxTolerance : 0
26   NbOfGTWithDatums       : 35
27  NbOfDatumFeature        : 15
28  NbOfAttachedDatum       : 109
29  NbOfDatumTarget         : 4
30 "
31 set isOK 1;
32 set nb_ref [llength $dump]
33 for { set i 0 } { $i < $nb_ref } { incr i } {
34   set refstr [lindex $info $i]
35   set curstr [lindex $dump $i]
36   if {[string equal $refstr $curstr] == 0} {
37     set isOK 0
38   }
39 }
40 if {$isOK == 0} {
41   puts "Error: wrong translate DGT"
42 }
43
44 Close D