- fixed an error due of missing attribute of PlotCanvasLegacy when using Legacy2D graphic engine
- solving deprecation warnings issued by Shapely - made sure that the Gerber Object geometry is always flattened
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
"""Paths and patches"""
|
||||
|
||||
import numpy as np
|
||||
from matplotlib.patches import PathPatch
|
||||
from matplotlib.path import Path
|
||||
from numpy import asarray, concatenate, ones
|
||||
@@ -45,7 +45,10 @@ def PolygonPath(polygon):
|
||||
vals[0] = Path.MOVETO
|
||||
return vals
|
||||
|
||||
vertices = concatenate([asarray(this.exterior)] + [asarray(r) for r in this.interiors])
|
||||
# vertices = concatenate([asarray(this.exterior)] + [asarray(r) for r in this.interiors])
|
||||
# codes = concatenate([coding(this.exterior)] + [coding(r) for r in this.interiors])
|
||||
|
||||
vertices = concatenate([np.array(this.exterior.coords)] + [np.array(r.coords) for r in this.interiors])
|
||||
codes = concatenate([coding(this.exterior)] + [coding(r) for r in this.interiors])
|
||||
return Path(vertices, codes)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user