Beispiel #1
0
 def __init__(self, send, geometry1, geometry2, action_radius,
              hit_tolerance, rotation2):
     Scanner.__init__(self, send, geometry1, geometry2, action_radius,
                      hit_tolerance)
     if rotation2 is None:
         self.rotation2 = Rotation.identity()
     else:
         self.rotation2 = rotation2
Beispiel #2
0
 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))
Beispiel #3
0
 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))
Beispiel #4
0
 def __init__(self, send, geometry1, geometry2, action_radius,
              hit_tolerance, allow_inversions, minimum_trianlge_area):
     Scanner.__init__(self, send, geometry1, geometry2, action_radius,
                      hit_tolerance)
     self.allow_inversions = allow_inversions
     self.minimum_trianlge_area = minimum_trianlge_area
Beispiel #5
0
 def __init__(self, send, geometry1, geometry2, action_radius, hit_tolerance, rotation2):
     Scanner.__init__(self, send, geometry1, geometry2, action_radius, hit_tolerance)
     if rotation2 is None:
         self.rotation2 = Rotation.identity()
     else:
         self.rotation2 = rotation2
Beispiel #6
0
 def __init__(
     self, send, geometry1, geometry2, action_radius, hit_tolerance, allow_inversions, minimum_trianlge_area
 ):
     Scanner.__init__(self, send, geometry1, geometry2, action_radius, hit_tolerance)
     self.allow_inversions = allow_inversions
     self.minimum_trianlge_area = minimum_trianlge_area