Use grid furthest from blockages when blocked pin. Enclose multiple connectors.

This commit is contained in:
Matt Guthaus
2018-11-19 17:32:55 -08:00
parent 20d4e390f6
commit b8299565eb
5 changed files with 61 additions and 19 deletions
+5 -1
View File
@@ -164,8 +164,12 @@ class vector3d():
return vector3d(min(self.x,other.x),min(self.y,other.y),min(self.z,other.z))
def distance(self, other):
""" Return the planar distance between two values """
""" Return the manhattan distance between two values """
return abs(self.x-other.x)+abs(self.y-other.y)
def euclidean_distance(self, other):
""" Return the euclidean distance between two values """
return math.sqrt((self.x-other.x)**2+(self.y-other.y)**2)
def adjacent(self, other):