diff --git a/svg-demo/svg_dump.py b/svg-demo/svg_dump.py
index ed579f6..46392c5 100755
--- a/svg-demo/svg_dump.py
+++ b/svg-demo/svg_dump.py
@@ -1,15 +1,17 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
-CASE_WIDTH = 24
-CASE_HEIGHT = 36
+CASE_WIDTH = 48
+CASE_HEIGHT = 72
-CASE_DISTANCE_X = 40
-CASE_DISTANCE_Y = 20
+CASE_DISTANCE_X = 80
+CASE_DISTANCE_Y = 40
MAIN_MARGIN_X = 10
MAIN_MARGIN_Y = 8
+LINK_OFFSET = 1
+
layer = [
["603EDF5CAFFF5E2"], # layer 0
["61BEC75CAFFF5E2","0C3EDF5CAFFF5E2"], # layer 1
@@ -61,24 +63,49 @@ def case_address(layer_num: int, layer_index: int) -> (int, int):
)
+def link_address(start_layer_num: int, start_layer_index: int, end_layer_num: int, end_layer_index: int) -> (int, int, int, int):
+
+ x1, y1 = case_address(start_layer_num, start_layer_index)
+ x2, y2 = case_address(end_layer_num, end_layer_index)
+
+ return (
+ x1 + int(CASE_WIDTH / 2),
+ y1 + CASE_HEIGHT + LINK_OFFSET,
+ x2 + int(CASE_WIDTH / 2),
+ y2 - LINK_OFFSET,
+ )
+
+
def svg_rect(left: int, top: int, width: int, height: int):
return '' % (
left, top, width, height
)
-print('