Commit b5d54bec authored by ronan's avatar ronan
Browse files

BreakPoint corrigé

parent 0d84bf69
......@@ -97,34 +97,34 @@ class Fortune:
self.vertex.append(vSite.center)
# AJout des breakpoints
if p1 is not None:
if p1 is not None and (vSite.type == 0 or p1 is not vSite.on):
# On supprime les evenements liés aux anciens points
self.removeEvent(p1, pi, vSite)
min = findMinCircle(p1, pi, pk)
if min.point.getY() > vSite.point.getY():
min.on = on
vertexVerif(min)
assert(min.type != 1 or vSite.type != 0), "Que faire?"
assert(min.on != None or min.type != 1)
assert(min.on is not None or min.type != 1)
min.on = on
self.addEvent(min)
if p2 is not None:
if p2 is not None and (vSite.type == 0 or p2 is not vSite.on):
# On supprime les evenements liés aux anciens points
self.removeEvent(vSite, pk, p2)
min = findMinCircle(pi, pk, p2)
if min.point.getY() > vSite.point.getY():
min.on = on
vertexVerif(min)
assert(min.type != 1 or vSite.type != 0), "Que faire?"
assert(min.on != None or min.type != 1)
assert(min.on is not None or min.type != 1)
min.on = on
self.addEvent(min)
else:
print("normal?")
# Ajouter controle au cas ou cas déjà traité
#removeEvent
......
......@@ -110,16 +110,18 @@ def vertexVerif(min):
min.type = 0
edge = None
i = 0
while edge == None:
while edge is None:
if min.sites[0].edges[i] in min.sites[1].edges:
edge = min.sites[0].edges[i]
i += 1
min.edges.append(edge)
edge = None
i = 0
while edge == None:
while edge is None:
if min.sites[2].edges[i] in min.sites[1].edges:
edge = min.sites[2].edges[i]
i += 1
min.edges.append(edge)
......@@ -128,33 +130,38 @@ def vertexVerif(min):
edge = None
i = 0
while edge == None:
while edge is None:
if min.sites[0].edges[i] in min.sites[2].edges:
edge = min.sites[0].edges[i]
i += 1
min.edges.append(edge)
# L'autre on cherche
edge = None
i = 0 # A régler
while edge == None:
while edge is None:
if min.sites[1].edges[i] in min.on.edges:
edge = min.sites[1].edges[i]
i += 1
min.edges.append(edge)
else:
min.type = 0
edge = None
i = 0
while edge == None:
while edge is None:
if min.sites[0].edges[i] in min.sites[1].edges:
edge = min.sites[0].edges[i]
i += 1
min.edges.append(edge)
edge = None
i = 0
while edge == None:
while edge is None:
if min.sites[2].edges[i] in min.sites[1].edges:
edge = min.sites[2].edges[i]
i += 1
min.edges.append(edge)
......
......@@ -30,6 +30,8 @@ class Node:
return self.right.insert(p0)
def remove(self, p0):
if self.site is not None and self.site.name == "p8":
pass
if p0.sites[1] is self.site:
piN = self.last()
if piN.site in p0.sites:
......
......@@ -2,6 +2,7 @@ from tkinter import *
from Fortune import Fortune
from Vector3D import Vector3D
from VSite import VSite
import time
import math
"""
def clavier(event):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment