def compute_transformations(self): Scanner.compute_transformations(self) if self.allow_inversions: # derive the connections with inversion rotations, based on those # without inversion rotations new_connections = [] maximum = len(self.connections) for progress, connection in enumerate(self.connections): self.send(ProgressMessage("mirror", progress, maximum)) new = copy.deepcopy(connection) mirror = (Translation(connection.triangle1.center) * Rotation.from_properties( numpy.pi, connection.triangle1.normal, True) * Translation(-connection.triangle1.center)) new.set_transformation(mirror * new.transformation) new_connections.append(new) self.connections.extend(new_connections) self.send(ProgressMessage("mirror", maximum, maximum))
def compute_transformations(self): Scanner.compute_transformations(self) if self.allow_inversions: # derive the connections with inversion rotations, based on those # without inversion rotations new_connections = [] maximum = len(self.connections) for progress, connection in enumerate(self.connections): self.send(ProgressMessage("mirror", progress, maximum)) new = copy.deepcopy(connection) mirror = ( Translation(connection.triangle1.center) * Rotation.from_properties(numpy.pi, connection.triangle1.normal, True) * Translation(-connection.triangle1.center) ) new.set_transformation(mirror * new.transformation) new_connections.append(new) self.connections.extend(new_connections) self.send(ProgressMessage("mirror", maximum, maximum))