ifire commited on
Commit
d356491
1 Parent(s): d2f23bc

Avoid more errors in 4 >= count polygons.

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -125,7 +125,8 @@ def prompt_to_layout(user_prompt, intensity, fpath=None):
125
  new_poly = []
126
  for point in poly:
127
  new_poly.append(list(map(int, point)))
128
- scaled_poly = scale(Polygon(new_poly), xfact=2, yfact=2, origin=(0,0))
 
129
  geom.append(scaled_poly)
130
  colors = []
131
  for space in spaces:
 
125
  new_poly = []
126
  for point in poly:
127
  new_poly.append(list(map(int, point)))
128
+ if len(new_poly) >= 4:
129
+ scaled_poly = scale(Polygon(new_poly), xfact=2, yfact=2, origin=(0,0))
130
  geom.append(scaled_poly)
131
  colors = []
132
  for space in spaces: