Skip to content

Commit

Permalink
update breadth first search to add points clockwise to queue
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronalvarezcz committed Jul 23, 2024
1 parent 9689e0a commit 97f8c32
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions copylot/assemblies/photom/utils/pattern_tracing.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ def _pattern_bidirectional(
visited = set()
queue = deque([(center_x, center_y)])
directions = [
(horizontal_spacing, 0),
(-horizontal_spacing, 0),
(0, vertical_spacing),
(0, -vertical_spacing),
(0, -vertical_spacing), # up
(horizontal_spacing, 0), # right
(0, vertical_spacing), # down
(-horizontal_spacing, 0), # left
]

while queue and (num_points is None or len(self.ablation_points) < num_points):
Expand Down

0 comments on commit 97f8c32

Please sign in to comment.