Пример #1
0
 def loc_to_xyz(self,loc):
     [ node, name ] = separate_node(loc)
     module = [self.modules[m] for m in self.modules if self.modules[m].id == node]
     if not module: return None
     module = module[0]
     if name == "Inside": return module.location
     return module.getXYZ(module.nodes[loc])
Пример #2
0
 def get_module_from_loc(self, loc, percolate=True):
     [ node, name ] = separate_node( loc )
     module = [ self.modules[ m ] for m in self.modules if self.modules[ m ].id == node ]        
     if not module: 
         if percolate:
             for s in self.docked_stations:
                 new_loc = s.get_module_from_loc(loc,False)
                 if new_loc != None: return new_loc
         return None
     return module[ 0 ]
Пример #3
0
 def loc_to_xyz(self,loc, percolate=True):
     [ node, name ] = separate_node(loc)
     module = self.get_module_from_loc(loc, percolate)
     if name == "Inside": return module.location
     return module.getXYZ(module.nodes[loc])
Пример #4
0
 def get_module_from_loc(self, loc):
     [ node, name ] = separate_node( loc )
     module = [ self.modules[ m ] for m in self.modules if self.modules[ m ].id == node ]        
     if not module: return None
     return module[ 0 ]