geometry
¶
Geometry wrapper for gdsfactory components.
This module provides a Geometry class that wraps gdsfactory Components with computed properties useful for simulation setup.
Classes:
-
Geometry–Shared geometry wrapper for gdsfactory Component.
Geometry
¶
Bases: BaseModel
Shared geometry wrapper for gdsfactory Component.
This class wraps a gdsfactory Component and provides computed properties that are useful for simulation setup (bounds, ports, etc.).
Attributes:
-
component(Any) –The wrapped gdsfactory Component
Example
from gdsfactory.components import straight c = straight(length=100) geom = Geometry(component=c) print(geom.bounds) (0.0, -0.25, 100.0, 0.25)
Referenced by:
- API Guides Shared components guide Geometry
Methods:
-
get_port–Get a port by name.
bounds
cached
property
¶
Get bounding box (xmin, ymin, xmax, ymax) in um.