gdsfactory.path.Path#
- class gdsfactory.path.Path(path=None)[source]#
You can extrude a Path with a CrossSection to create a Component.
- Parameters:
path – array-like[N][2], Path, or list of Paths.
Methods
__init__
([path])Creates an empty path.
append
(path)Attach Path to the end of this Path.
copy
()Returns a copy of the Path.
curvature
()Calculates Path curvature.
dmirror
([p1, p2])Mirrors the Path across the line formed between the two specified points.
dmove
([origin, destination, axis])Moves the Path from the origin point to the destination.
dmovex
([origin, destination])Moves an object by a specified x-distance.
dmovey
([origin, destination])Moves an object by a specified y-distance.
drotate
([angle, center])Rotates all Polygons in the Component around the specified center point.
extrude
([cross_section, layer, width, ...])Returns Component by extruding a Path with a CrossSection.
hash_geometry
([precision])Computes an SHA1 hash of the points in the Path and the start_angle and end_angle.
length
()Return cumulative length.
offset
([offset])Offsets Path so that it follows the Path centerline plus an offset.
plot
()Plot path in matplotlib.
Attributes
dbbox
Returns the bounding box of the Path.
dcenter
Returns the center of the bounding box.
dsize
Returns the (x, y) size of the bounding box.
dx
Returns the x-coordinate of the center of the bounding box.
dxmax
Returns the maximum x-value of the bounding box.
dxmin
Returns the minimum x-value of the bounding box.
dy
Returns the y-coordinate of the center of the bounding box.
dymax
Returns the maximum y-value of the bounding box.
dymin
Returns the minimum y-value of the bounding box.
xsize
Returns the horizontal size of the bounding box.
ysize
Returns the vertical size of the bounding box.