Ejemplo n.º 1
0
    def save_to_json(self, node_data: dict):
        # generate flat data, and inject into incoming storage variable
        obj = self.node_dict.get(hash(self))
        if not obj:
            self.error('failed to obtain local geometry, can not add to json')
            return

        node_data['geom'] = json.dumps(flatten(obj))
Ejemplo n.º 2
0
 def storage_get_data(self, storage):
     # generate flat data, and inject into incoming storage variable
     obj = self.node_dict.get(hash(self))
     if not obj:
         print('failed to obtain local geometry, can not add to json')
         return
     
     storage['geom'] = json.dumps(flatten(obj))
Ejemplo n.º 3
0
 def storage_get_data(self, storage):
     # generate flat data, and inject into incoming storage variable
     obj = self.node_dict.get(hash(self))
     if not obj:
         print('failed to obtain local geometry, can not add to json')
         return
     
     storage['geom'] = json.dumps(flatten(obj))