gdsfactory.geometry.fillet#
- gdsfactory.geometry.fillet(operand: ComponentReference | Component | Polygon | list[Polygon], radius: float | list[float], tolerance: float = 0.01) list[Polygon] [source]#
Perform a fillet operation and return the list of resulting Polygons.
- Parameters:
operand – polygon, list of Polygons, Component, or ComponentReference.
radius – Fillet radius. You can also define a value for each vertex.
tolerance – for calculating the polygonal approximation of the filleted corners.
import gdstk import gdsfactory as gf points = [(0, 0), (1.2, 0), (1.2, 0.3), (1, 0.3), (1.5, 1), (0, 1.5)] p0 = gdstk.Polygon(points, datatype=1) p1 = gdstk.Polygon(points, datatype=1) p1 = gf.geometry.fillet(p1, radius=1.0) c = gf.Component("demo") c.add_polygon(p0, layer=(1, 0)) c.add_polygon(p1, layer=(2, 0)) c.plot_matplotlib() c.show()
(
Source code
,png
,hires.png
,pdf
)