0027455: Implementation of connection points
[occt.git] / tests / gdt / dimensions / A9
1 # test connection points
2 box b 10 10 10
3 explode b e
4
5 NewDocument D_init
6 XAddShape D_init b
7 XAddDimension D_init b_1 b_2
8 #0:1:4:1
9 XSetDimensionType D_init 0:1:4:1 2
10 XSetDimensionValue D_init 0:1:4:1 10
11 # Connection points
12 vertex v1 1 0 0
13 vertex v2 9 0 0 
14 XSetDimensionPoints D_init 0:1:4:1 v1 v2
15
16 # Export
17 set isOK 1
18 set filename $imagedir/${casename}_D_init.stp
19 if { [catch { WriteStep D_init $filename } catch_result] } {
20   puts "Error: File was not written - exception"
21   set isOK 0
22   }
23 # Import
24 if {$isOK} {
25   if { [catch { ReadStep D $filename } catch_result] } {
26     puts "Error: File was not read - exception"
27     set isOK 0
28     }
29   }
30 # Reference data
31 if {$isOK} {
32   set c_value "10"
33   set c_type "Location_LinearDistance"
34   set c_pnts "1;0;0 9;0;0"
35 }