All Projects → amccaugh → Phidl

amccaugh / Phidl

Licence: mit
Python GDS layout and CAD geometry creation

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Phidl

Shape-Your-Music
A web application for drawing music.
Stars: ✭ 106 (+89.29%)
Mutual labels:  geometry, shape, polygon
pymadcad
Simple yet powerful CAD (Computer Aided Design) library, written with Python.
Stars: ✭ 63 (+12.5%)
Mutual labels:  geometry, cad
MidcurveNN
Computation of Midcurve of Thin Polygons using Neural Networks
Stars: ✭ 19 (-66.07%)
Mutual labels:  geometry, cad
Nurbs Python
Object-oriented pure Python B-Spline and NURBS library
Stars: ✭ 295 (+426.79%)
Mutual labels:  cad, geometry
bpmn-layout-generators
Tools for generating missing BPMNDiagram elements in BPMN files
Stars: ✭ 27 (-51.79%)
Mutual labels:  shape, layout
polygon-splitter
A small (<10kb minified) javascript library for splitting polygons by a polyline.
Stars: ✭ 20 (-64.29%)
Mutual labels:  geometry, polygon
Shapeofview
Give a custom shape to any android view, Material Design 2 ready
Stars: ✭ 2,977 (+5216.07%)
Mutual labels:  shape, layout
martinez-src
Mirrored implementations of polygon clipping/CSG/operations algorithm, in C (original, by Martínez et al) and ActionScript3 (port, by Mahir Iqbal)
Stars: ✭ 34 (-39.29%)
Mutual labels:  geometry, polygon
Earcut.hpp
Fast, header-only polygon triangulation
Stars: ✭ 447 (+698.21%)
Mutual labels:  polygon, geometry
Leaflet.freedraw
🌏 FreeDraw allows the free-hand drawing of shapes on your Leaflet.js map layer – providing an intuitive and familiar UX for creating geospatial boundaries similar to Zoopla and others. Included out-of-the-box is the concaving of polygons, polygon merging and simplifying, as well as the ability to add edges and modify existing shapes.
Stars: ✭ 446 (+696.43%)
Mutual labels:  polygon, shape
Wicket
A modest library for moving between Well-Known Text (WKT) and various framework geometries
Stars: ✭ 484 (+764.29%)
Mutual labels:  polygon, geometry
Geometry2d
Unity3D: A set of helper classes for 2D geometric calculations.
Stars: ✭ 40 (-28.57%)
Mutual labels:  polygon, geometry
euclid
Vector math, geometry, reference frame, and shapes 2D & 3D
Stars: ✭ 22 (-60.71%)
Mutual labels:  geometry, shape
ludigraphix.github.io
Documentation for Ludigraphix
Stars: ✭ 21 (-62.5%)
Mutual labels:  geometry, polygon
geofeatures2
A lightweight, high performance geometry library in Swift.
Stars: ✭ 18 (-67.86%)
Mutual labels:  geometry, polygon
SharpMath2
2D math / geometry collision library for C#, compatable with monogame.
Stars: ✭ 36 (-35.71%)
Mutual labels:  geometry, polygon
Sharpmath
A small .NET math library.
Stars: ✭ 36 (-35.71%)
Mutual labels:  polygon, geometry
envelope ex
Utilities for calculating and comparing envelopes from geometries
Stars: ✭ 15 (-73.21%)
Mutual labels:  geometry, polygon
EsriRESTScraper
A Python class that scrapes ESRI Rest Endpoints and exports data to a geodatabase
Stars: ✭ 43 (-23.21%)
Mutual labels:  geometry, polygon
Dotscad
Reduce the burden of mathematics when playing OpenSCAD
Stars: ✭ 344 (+514.29%)
Mutual labels:  cad, geometry

Build Status

PHIDL

GDS scripting that's intuitive, fast, and powerful. For Python 2 and 3.

Gallery

Installation / requirements

  • Install or upgrade with pip install -U phidl
  • Python 2 >=2.6 or Python 3 >=3.5
  • If you are on Windows or Mac and don't already have gdspy installed, you will need a C++ compiler

About PHIDL

fiddle (verb) - /ˈfidl/ - to make minor manual movements, especially to adjust something

PHIDL is an open-source GDS-based CAD tool for Python 2 and 3 that significantly extends the excellent gdspy. The base installation includes a large library of simple shapes (e.g. rectangles, circles), photonic structures (e.g. sine curve waveguides), and superconducting nanowire shapes (e.g. single photon detectors) that are fully parameterized. It also has a built-in quick-plotting function based on matplotlib (or Qt) that allows you view the state of any GDS object, useful when scripting geometry-making functions. It also has a geometry library reference and a set of very thorough tutorials that will walk you through the process of getting acquainted with PHIDL.

The goal is to bring the usability of Illustrator / Inkscape drawing programs to the GDS scripting world. Like Python itself, it aims to be readable, and intuitive. For instance, when building a geometry you don't have to worry about what the exact coordinates are anymore. If you want to separate two ellipses in the x direction by 5 units, you can do things like this:

ellipse1.xmin = ellipse2.xmax + 5

or if you want to move then rotate one ellipse by 45 degrees you can do

ellipse2.move([1,7]).rotate(45)

There's a few dozen shortcuts like this that make life easier built into PHIDL--they're simple, but they make a world of difference when you just want to e.g. space a ring resonator some distance from a waveguide without having to track each and every coordinate of the shape.

phidl example image

There's also a "port" functionality that allows you to snap together geometry like Legos without caring about where exactly the absolute coordinates of either geometry is. For instance, connecting the above misaligned rectangles is a two-line command:

phidl example image

It also allows you to do things like add text and create smooth or straight routing curves between "ports" of different devices, convenient for making electrical or optical connections:

phidl example image phidl example image

Other useful functionality available are standard operations like booleans:

phidl example image

and less standard ones like creating outlines. A whole layout can be outlined directly in the GDS without requiring you to use Beamer (useful for positive-tone resist structures):

pg.outline(D, distance = 0.7, layer = 4)

phidl example image

The geometry library also has useful resolution test-structures built into it, for instance

pg.litho_calipers(num_notches = 7, offset_per_notch = 0.1)
pg.litho_steps(line_widths = [1,2,4,8,16])
pg.litho_star(num_lines = 16, line_width = 3)

phidl example image

There are also handy functions to help pack shapes into as small an area as possible:

pg.packer(D_list, spacing = 1.25, aspect_ratio = (2,1))

phidl example image

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].