gdsfactory.geometry.invert#
- gdsfactory.geometry.invert(elements, border: float = 10.0, precision: float = 0.0001, layer: LayerSpec = (1, 0)) Component [source]#
Returns inverted version of input shapes with additional border around the edges.
- Parameters:
elements – Component(/Reference), list of Component(/Reference), or Polygon A Component containing the polygons to invert.
border – Size of the border around the inverted shape (border value is the distance from the edges of the boundary box defining the inverted shape to the border, and is applied to all 4 sides of the shape).
precision – Desired precision for rounding vertex coordinates.
layer – Specific layer(s) to put polygon geometry on.
- Returns
Component with inverted version of the input shape(s) and the border(s).
import gdsfactory as gf e1 = gf.components.ellipse(radii=(6, 6)) c = gf.geometry.invert(e1) c.plot_matplotlib()
(
Source code
,png
,hires.png
,pdf
)