Skip to content

Commit

Permalink
Complete 'sweep' function
Browse files Browse the repository at this point in the history
  • Loading branch information
lycantropos committed May 19, 2020
1 parent 3193fd2 commit 2b68cbe
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions bentley_ottmann/core/planar.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@ def sweep(segments: Sequence[Segment],
events_queue=events_queue)
else:
event = event.complement
if event not in sweep_line:
continue
above_event, below_event = (sweep_line.above(event),
sweep_line.below(event))
sweep_line.remove(event)
if below_event is not None and above_event is not None:
yield from detect_intersection(below_event, above_event,
events_queue=events_queue)
if event in sweep_line:
above_event, below_event = (sweep_line.above(event),
sweep_line.below(event))
sweep_line.remove(event)
if below_event is not None and above_event is not None:
yield from detect_intersection(
below_event, above_event,
events_queue=events_queue)


def to_events_queue(segments: Sequence[Segment]) -> EventsQueue:
Expand Down

0 comments on commit 2b68cbe

Please sign in to comment.