Skip to content

Commit

Permalink
Adding pass through to rotate antenna in the antenna_structures class.
Browse files Browse the repository at this point in the history
  • Loading branch information
LyceanEM committed Jun 3, 2024
1 parent 813358d commit ce6e3b7
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions lyceanem/base_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,9 +429,9 @@ def export_all_structures(self):
objects[item] = GF.mesh_transform(objects[item], self.pose, False)

return objects
def rotate_antenna(self, rotation_vector):
self.structures.rotate_structures(rotation_vector)
self.points.rotate_points(rotation_vector)
def rotate_antenna(self, rotation_vector,rotation_centre=np.zeros((3, 1), dtype=np.float32)):
self.structures.rotate_structures(rotation_vector,rotation_centre)
self.points.rotate_points(rotation_vector,rotation_centre)

def translate_antenna(self,translation_vector):
self.structures.translate_structures(translation_vector)
Expand Down Expand Up @@ -461,9 +461,10 @@ def structure_cells(array):
return array

for item in triangle_meshes:
new_mesh = pv.PolyData(item.points, structure_cells(item.cells[0].data))
# need to transfer across the point data and cell data
structure_meshes.append(new_mesh)
if item is not None:
new_mesh = pv.PolyData(item.points, structure_cells(item.cells[0].data))
# need to transfer across the point data and cell data
structure_meshes.append(new_mesh)

point_sets = [self.export_all_points()]
for item in point_sets:
Expand Down

0 comments on commit ce6e3b7

Please sign in to comment.