Python GDS layout and CAD geometry creation
Device.get_ports()
to be used with arraysnum_cpu
in the new pg.kl_boolean()
, pg.kl_offset
, pg.kl_invert()
functions. Global defaults for the number of CPU to be used can be set with e.g. phidl.config["NUM_CPU"] = 8
pg.flatten()
convenience function. This is identical to Device.flatten()
but instead of modifying the geometry in-place, returns a flattened copy (thanks Bas Nijholt @basnijholt)gdspy
where property keys are incorrectly interpreted as signed integers when importing GDS files using import_gds()
(thanks Bas Nijholt @basnijholt)pg.kl_invert()
function when tile_size
was too smallMajor optimization update!
pg.kl_boolean()
, pg.kl_offset
, etc. They utilize the excellent KLayout tile processor, which allows breaking down & parallelizing these operations--in a nutshell, these operations should be much, much faster.D.simplify()
, which allows you to significantly reduce memory usage of a geometry by discarding unnecessarily-precise points from all polygons within a Device. Uses the very robust Ramer–Douglas–Peucker algorithm for simplification.pg.gridsweep()
allows param_x
or param_y
to be integers, which creates copies of the same parameters in the x or y direction._merge_nearby_floating_points()
which should significantly speed up large operations (thanks Alex Tait @atait)rotate()
operation by as much as 150x(!) (thanks Bas Nijholt @basnijholt)pg.fill_rectangle()
examples and documentation
pg.grid()
to allow for empty shape
parameter (thanks Samuel Gyger @gyger)pg.grid()
spacing to be a single integer (thanks Samuel Gyger @gyger)pg.euler()
and pp.smooth()
for edge case of nearly-colinear pointsobject
to avoid numpy deprecation (thanks Bas Nijholt @basnijholt and Samuel Gyger @gyger)pg.union()
as it does not accept lists of Devices (improvement for future, thanks Samuel Gyger @gyger)pg.snspd_candelabra()
which creates an optimally-rounded SNSPD with low current crowding and arbtitrarily-high fill factor (thanks Dileep Reddy @dileepvr)matplotlib
, allowing loading the base phidl libraries much faster (thanks Joaquin Matres @joamatab)pg.boolean()
s othat OR
/union will merge all shapes within one Device, even if the second Device is None
(thanks Stijn Balk @sbalk)parent
of a DeviceReference
now correctly updates the reference cell (thanks Joaquin Matres @joamatab)pg.outline()
when distance < 0
(thanks @yoshi74ls181)pg.import_gds()
(thanks Bas Nijholt @basnijholt)D.remove_layers()
works also with GDS path objects (thanks Joaquin Matres @joamatab)Device.get_info()
that gathers the Device.info dictionaries from every sub-Device and returns them in a list. Useful for collecting information about every Device in a layoutreflect()
has been fully removed, use mirror()
insteadDevice.absorb()
now preserves labels from the parent component (thanks Joaquin Matres @joamatab)pp.spiral()
caused by overlapping pointspg.optimal_step()
, now works correctly when start_width == end_width
CrossSection.extrude()
since cross_section parameter renamed to width
phidl.routing
, including automatic manhattan routing with custom cross-sections! See the routing documentation for details. Big thanks to Jeffrey Holzgrafe @jolzgrafe for this contributionPath
s can now be used to produce sharp angles, in addition to smooth bends. See the Path documentation
Path()
constructor no longer forces the path to start at (0,0)quickplot()
is now disabled by default in Jupyter-type notebooks to avoid strange scrolling behavior. This can be manually changed using set_quickplot_options(interactive_zoom = True)
Hotfix to ensure Python 2 compatibility
pg.gridsweep()
function, allowing for easy creation of parameter sweeps on a grid. See the documentation for details.None
to prevent creation of polygonspg.litho_ruler()
for creation of lithographic rulers/measurementquickplot()
! Now you can use the mousewheel/trackpad scroll to zoom in and out, and right-click or left-click to zoom to a region.blocking
option for quickplot()
(thanks @giumc)set_quickplot_options()
smooth()
, which broke when sequential waypoints were co-linear (thanks @giumc)hash_geometry()
(thanks Joaquin Matres @joamatab)