|
@@ -8,7 +8,7 @@ from operator import itemgetter
|
|
|
import numpy as np
|
|
|
import vg
|
|
|
|
|
|
-from .utils import BinaryRelationItem, BinaryRelationCollection
|
|
|
+from utils import BinaryRelationItem, BinaryRelationCollection
|
|
|
|
|
|
np.seterr(divide='ignore', invalid='ignore')
|
|
|
|
|
@@ -21,6 +21,7 @@ def calc_adjacent_relation(columns, segments, v_walls, walls):
|
|
|
columns_dic = list_to_dict(columns)
|
|
|
v_walls_dic = list_to_dict(v_walls)
|
|
|
walls_dic = list_to_dict(walls)
|
|
|
+
|
|
|
unit_dic = ChainMap(
|
|
|
columns_dic,
|
|
|
walls_dic,
|
|
@@ -137,10 +138,10 @@ def are_adjacent(segment1, segment2, units):
|
|
|
|
|
|
|
|
|
def load_location(x):
|
|
|
- x['location'] = json.loads(x['location'])
|
|
|
+ x['location'] = json.loads(str(x['location']).replace('\'', '"'))
|
|
|
return x
|
|
|
|
|
|
|
|
|
def load_curve(x):
|
|
|
- x['curve'] = json.loads(x['curve'])
|
|
|
+ x['curve'] = json.loads(str(x['curve']).replace('\'', '"'))
|
|
|
return x
|