

def attach_area_portal(self, index, target_index, points):
    'Attach an area portal to the area. This contains a target area, a target node and the portal points.'
    ((min_x, min_y, min_z), (max_x, max_y, max_z)) = vmath.v3s_min_max(points)
    center = (((max_x + min_x) / 2), ((max_y + min_y) / 2), ((max_z + min_z) / 2))
    halfextents = (((max_x - min_x) / 2), ((max_y - min_y) / 2), ((max_z - max_z) / 2))
    portal = {
        'area': target_index,
        'points': points,
        'center': center,
        'halfExtents': halfextents,
    }
    self.asset['areas'][index]['portals'].append(portal)

dataset/ETHPy150Open turbulenz/turbulenz_tools/turbulenz_tools/tools/asset2json.py JsonAsset.attach_area_portal/VarMisuse@104/190 `min_z`->`max_z`