File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,10 @@ def getEndPoint(geom):
63
63
# Rectangle is closed, so it starts at the same point as it ends
64
64
point = geom .GetStart ()
65
65
else :
66
- point = geom .GetStart () if geom .IsClosed () else geom .GetEnd ()
66
+ if hasattr (geom , 'IsClosed' ):
67
+ point = geom .GetStart () if geom .IsClosed () else geom .GetEnd ()
68
+ else :
69
+ point = geom .GetEnd ()
67
70
return point
68
71
69
72
class CoincidenceList (list ):
@@ -233,7 +236,8 @@ def shapePolyToShapely(p: pcbnew.SHAPE_POLY_SET) \
233
236
polygons = []
234
237
for pIdx in range (p .OutlineCount ()):
235
238
kOutline = p .Outline (pIdx )
236
- assert kOutline .IsClosed ()
239
+ if hasattr (kOutline , 'IsClosed' ):
240
+ assert kOutline .IsClosed ()
237
241
outline = shapeLinechainToList (kOutline )
238
242
holes = []
239
243
for hIdx in range (p .HoleCount (pIdx )):
You can’t perform that action at this time.
0 commit comments