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
same_point is not defined and should be. Initiate to None, then throw an exception if still None after the two if statements. There are instances where a point of a polygon is on the edge of another polygon. That means their distances are equal, but have no common points. same_point therefore does not exist...
The text was updated successfully, but these errors were encountered:
if self.edge.p1 in other.edge:
same_point = self.edge.p1
elif self.edge.p2 in other.edge:
same_point = self.edge.p2
There's one thing I'm not sure about (which relates to this snippet).
Say we have self.edge = ((5.00, 4.00), (6.00, 3.00)) and other.edge = ((3.00, 0.00), (7.00, 4.00)).
When checking self.edge.p2 in other.edge you are checking (6.00, 3.00) in ((3.00, 0.00), (7.00, 4.00)), right? It gives false (so it goes on and ignores the same_point = ...) and the point (6.00, 3.00) lays on the segment. Is this OK?
I implemented Pyvisgraph with the assumption that all polygons are distinct, i.e. they do not overlap. That also means that the point of one polygon should not lie on the segment of another. Thats really the consequence here, the code snippet you linked should only be triggered when the two edges are of the same polygon, i.e. they share a common point and therefore their distance is equal.
same_point is not defined and should be. Initiate to None, then throw an exception if still None after the two if statements. There are instances where a point of a polygon is on the edge of another polygon. That means their distances are equal, but have no common points. same_point therefore does not exist...
The text was updated successfully, but these errors were encountered: