Relative positioning in EDC files

This snippet is a very simple demonstration how to position parts in .edc file relatively to other parts.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
collections {
   group { name: "main";
      parts {
         part { 
            name: "rectangle_center";
            type: RECT;
            description{ 
               state: "default" 0.0;
               color: 0 0 0 255;
               rel1.relative: 0.4 0.45;
               rel2.relative: 0.6 0.55;
            }
         }
         part { 
            name: "rectangle_upper";
            type: RECT;
            description{ 
               state: "default" 0.0;
               color: 200 200 200 255;
               rel1 {
                  relative: 0 -1;
                  to: "rectangle_center";
               }
               rel2 {
                  relative: 1 0;
                  offset: 0 -10;
                  to: "rectangle_center";
               }
            }
         }
         part { 
            name: "rectangle_lower";
            type: RECT;
            description{ 
               state: "default" 0.0;
               color: 200 200 200 255;
               rel1 {
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX