parent
25551ef8b1
commit
dfedb3f6cd
|
@ -133,12 +133,19 @@ You can replace the space characters representing the floor by a "X" to remove t
|
||||||
|
|
||||||
def vFloor(self, x, y):
|
def vFloor(self, x, y):
|
||||||
"""Is there floor under vertical wall"""
|
"""Is there floor under vertical wall"""
|
||||||
return ((x > 0 and self.floors[y][x - 1]) or
|
if y >= len(self.y):
|
||||||
|
return False
|
||||||
|
|
||||||
|
return (
|
||||||
|
(x > 0 and self.floors[y][x - 1]) or
|
||||||
(x < len(self.x) and self.floors[y][x]))
|
(x < len(self.x) and self.floors[y][x]))
|
||||||
|
|
||||||
def hFloor(self, x, y):
|
def hFloor(self, x, y):
|
||||||
"""Is there foor under horizontal wall"""
|
"""Is there foor under horizontal wall"""
|
||||||
return ((y > 0 and self.floors[y - 1][x]) or
|
if x >= len(self.x):
|
||||||
|
return False
|
||||||
|
return (
|
||||||
|
(y > 0 and self.floors[y - 1][x]) or
|
||||||
(y < len(self.y) and self.floors[y][x]))
|
(y < len(self.y) and self.floors[y][x]))
|
||||||
|
|
||||||
@restore
|
@restore
|
||||||
|
@ -179,6 +186,7 @@ You can replace the space characters representing the floor by a "X" to remove t
|
||||||
|
|
||||||
self.edges["s"] = boxes.edges.Slot(self, self.hi / 2.0)
|
self.edges["s"] = boxes.edges.Slot(self, self.hi / 2.0)
|
||||||
self.edges["C"] = boxes.edges.CrossingFingerHoleEdge(self, self.hi)
|
self.edges["C"] = boxes.edges.CrossingFingerHoleEdge(self, self.hi)
|
||||||
|
self.edges["D"] = boxes.edges.CrossingFingerHoleEdge(self, self.hi, outset=t)
|
||||||
|
|
||||||
self.ctx.save()
|
self.ctx.save()
|
||||||
|
|
||||||
|
@ -208,9 +216,13 @@ You can replace the space characters representing the floor by a "X" to remove t
|
||||||
if self.hFloor(end, y):
|
if self.hFloor(end, y):
|
||||||
edges.append("f")
|
edges.append("f")
|
||||||
else:
|
else:
|
||||||
edges.append("e") # XXX E?
|
edges.append("E")
|
||||||
|
|
||||||
lengths.append(self.x[end])
|
lengths.append(self.x[end])
|
||||||
|
if (self.hFloor(end, y) == 0 and
|
||||||
|
self.hFloor(end+1, y) == 0):
|
||||||
|
edges.append("EDs"[self.vWalls(end + 1, y)])
|
||||||
|
else:
|
||||||
edges.append("eCs"[self.vWalls(end + 1, y)])
|
edges.append("eCs"[self.vWalls(end + 1, y)])
|
||||||
lengths.append(self.thickness)
|
lengths.append(self.thickness)
|
||||||
end += 1
|
end += 1
|
||||||
|
@ -254,9 +266,13 @@ You can replace the space characters representing the floor by a "X" to remove t
|
||||||
if self.vFloor(x, end):
|
if self.vFloor(x, end):
|
||||||
edges.append("f")
|
edges.append("f")
|
||||||
else:
|
else:
|
||||||
edges.append("e") # XXX E?
|
edges.append("E")
|
||||||
|
|
||||||
lengths.append(self.y[end])
|
lengths.append(self.y[end])
|
||||||
|
if (self.vFloor(x, end) == 0 and
|
||||||
|
self.vFloor(x, end + 1) == 0):
|
||||||
|
edges.append("EDs"[self.hWalls(x, end + 1)])
|
||||||
|
else:
|
||||||
edges.append("eCs"[self.hWalls(x, end + 1)])
|
edges.append("eCs"[self.hWalls(x, end + 1)])
|
||||||
lengths.append(self.thickness)
|
lengths.append(self.thickness)
|
||||||
end += 1
|
end += 1
|
||||||
|
@ -269,7 +285,8 @@ You can replace the space characters representing the floor by a "X" to remove t
|
||||||
"s": "s",
|
"s": "s",
|
||||||
"e": "e",
|
"e": "e",
|
||||||
"E": "e",
|
"E": "e",
|
||||||
"C": "e"}[e] for e in reversed(edges)]
|
"C": "e",
|
||||||
|
"D": "e"}[e] for e in reversed(edges)]
|
||||||
edges = ["e" if e == "s" else e for e in edges]
|
edges = ["e" if e == "s" else e for e in edges]
|
||||||
self.rectangularWall(sum(lengths), h, [
|
self.rectangularWall(sum(lengths), h, [
|
||||||
boxes.edges.CompoundEdge(self, edges, lengths),
|
boxes.edges.CompoundEdge(self, edges, lengths),
|
||||||
|
|
Loading…
Reference in New Issue