gdsfactory.geometry.outline

Contents

gdsfactory.geometry.outline#

gdsfactory.geometry.outline(elements, distance=1, precision: float = 0.001, join: str = 'miter', tolerance: int = 2, join_first: bool = True, open_ports: bool | float = False, layer=0) Component[source]#

Returns Component containing the outlined polygon(s).

Creates an outline around all the polygons passed in the elements argument. elements may be a Component, Polygon, or list of Components.

Parameters:
  • elements – Component(/Reference), list of Component(/Reference), or Polygon Polygons to outline or Component containing polygons to outline.

  • distance – int or float Distance to offset polygons. Positive values expand, negative shrink.

  • precision – float Desired precision for rounding vertex coordinates.

  • join – {‘miter’, ‘bevel’, ‘round’} Type of join used to create the offset polygon.

  • tolerance – int or float For miter joints, this number must be at least 2 and it represents the maximal distance in multiples of offset between new vertices and their original position before beveling to avoid spikes at acute joints. For round joints, it indicates the curvature resolution in number of points per full circle.

  • open_ports – bool or float If not False, holes will be cut in the outline such that the Ports are not covered. If True, the holes will have the same width as the Ports. If a float, the holes will be be widened by that value (useful for fully clearing the outline around the Ports for positive-tone processes

  • layer – int, array-like[2], or set Specific layer(s) to put polygon geometry on.).