You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We discovered a few random failures, and so commented out that line before the last one in the proc for now. The issue may occur when we insert new points with insertPoint(), and that new point is located on an existing edge. We have to investigate this issue carefully later, for now it seems to work without the assert. Actually we are using the CDT2 variant of this library, but it should be the same for initial CDT.
# Returns an edge e, s.t. either x is on e, or e is an edge of# a triangle containing x. The search starts from startingEdge# and proceeds in the general direction of x. Based on the# pseudocode in Guibas and Stolfi (1985) p.121.# http://www.karlchenofhell.org/cppswp/lischinski.pdf# if point is in face, we return the closest edge -- triArea(e.org.point, e.dest.point, p) >= 0procxlocatePoint(p: Vector; startEdge: Edge): Edge=var e = startEdge
assert e !=nilwhiletrue: #TODO: can we get an infinite loop -- and how to best fix it?if p == e.org.point or p == e.dest.point:
return e
elif p.rightOf(e):
e = e.sym
elifnot p.rightOf(e.onext):
e = e.onext
elifnot p.rightOf(e.dprev):
e = e.dprev
else:
breakassertnot p.rightOf(e)
let a =triArea(e.org.point, e.dest.point, p)
assert a >=0if a >0:
e =minValueByIt([e, e.onext.sym, e.dprev.sym], linePointDistSqr(it.org.point, it.dest.point, p))
###assert not p.rightOf(e)return e
The text was updated successfully, but these errors were encountered:
We discovered a few random failures, and so commented out that line before the last one in the proc for now. The issue may occur when we insert new points with insertPoint(), and that new point is located on an existing edge. We have to investigate this issue carefully later, for now it seems to work without the assert. Actually we are using the CDT2 variant of this library, but it should be the same for initial CDT.
The text was updated successfully, but these errors were encountered: