소스 검색

amend return format

chenhaiyang 5 년 전
부모
커밋
d3357e1632
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      adjacent.py

+ 3 - 1
adjacent.py

@@ -42,8 +42,10 @@ def calc_adjacent_relation(columns, segments, v_walls, walls):
                         space_relation.update(binary_space_relations)
 
     relations = []
+    result_key = ['from', 'to']
     for relation in space_relation:
-        relations.append(relation)
+        temp = dict(zip(result_key, relation.split('@')))
+        relations.append(temp)
 
     return relations