def handle_moveable(frame): name = frame.name parent_name = frame.parent try: # If parent frame is a placement surface, position is the # appropriate grid cell on the surface. parent_frame = scene[parent_name] if aa.frame_isa(parent_frame, "surface"): (x, i, j) = location_table(parent_frame,frame) conjunction.append(x) occupied[(parent_name,i,j)] = True else: add_on(name,parent_name) except NameError: add_on(name,parent_name)
def handle_moveable(frame): name = frame.name parent_name = frame.parent try: # If parent frame is a placement surface, position is the # appropriate grid cell on the surface. parent_frame = scene[parent_name] if aa.frame_isa(parent_frame, "surface"): trans = aa.translation(aa.frame_fixed_tf(frame)) i = int(round(trans[0] / RESOLUTION)) j = int(round(trans[1] / RESOLUTION)) position = tm.mangle(parent_name, i, j) conjunction.append(["ONTABLE", name, position]) occupied[(parent_name, i, j)] = True else: add_on(name, parent_name) except NameError: add_on(name, parent_name)
def handle_moveable(frame): name = frame.name parent_name = frame.parent position = parent_name try: # If parent frame is a placement surface, position is the # appropriate grid cell on the surface. parent_frame = scene[parent_name] if aa.frame_isa(parent_frame, "surface"): trans = aa.translation( aa.frame_fixed_tf(frame) ) i = int(round( trans[0] / RESOLUTION)) j = int(round( trans[1] / RESOLUTION)) position = tm.mangle(parent_name,i,j) except NameError: pass conjunction.append(["=", ["POSITION", name], position])
def handle_moveable(frame): parent_name = frame.parent parent = scene[parent_name] if aa.frame_isa(parent, "surface"): (x, i, j) = location_table(parent,frame) conjunction.append(x)
def collect_moveable(frame_name): frame = scene[frame_name] if aa.frame_isa(frame,"moveable"): moveable.append(frame)