Skip to main content

Python add-on module for gdspy that can perform chamfering operation on GDSII files.

Project description

gdschamfer

gdschamfer is a Python add-on module for gdspy that can perform chamfering operation on GDSII files. It extends the fillet function in gdspy so that:

  • inside corners (i.e., concave bends) or outside corners (i.e., convex bends) can be selectively chamfered or filleted.

  • orthogonal corners can be selectively chamfered or filleted.

The operation of chamfering leads to corners being replaced with 45° slanting edges. An example of inside corners of a polygon being chamfered is shown below:

On the other hand, the filleting operation that gdspy's fillet() function does will result in concave curved corners for inside corners and convex (or rounded) corners for outside corners. When the fillet radius of curvature tends to infinity the resulting fillet starts to approximate a chamfer.

Usage

To use gdschamfer install its PyPI python distribution package using pip:

pip install gdschamfer

In your python scripts place the import statement

import gdschamfer

There are 3 functions available for use:

  1. gdschamfer.chamfer_polygons(...): Use this to perform chamfering of gdspy Polygon objects.

  2. gdschamfer.chamfer_cell(...): Use this to perform chamfering of gdspy Cell objects.

  3. gdschamfer.chamfer_gds(...): Use this to perform chamfering on GDSII file.

Chamfer style

To understand how the option chamfer_style modifies the corners consider the GDSII file demo/input.gds shown below:


a) When chamfer_style = "inside_corners":

GDSII with 3 polygons, with 2 on layer 20 and 1 on layer 22 showing chamfered inside corners


b) When chamfer_style = "outside_corners":

GDSII with 3 polygons, with 2 on layer 20 and 1 on layer 22 showing chamfered outside corners


c) When chamfer_style = "all_corners":

GDSII with 3 polygons, with 2 on layer 20 and 1 on layer 22 showing chamfered corners


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gdschamfer-0.2.0.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gdschamfer-0.2.0-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file gdschamfer-0.2.0.tar.gz.

File metadata

  • Download URL: gdschamfer-0.2.0.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.6

File hashes

Hashes for gdschamfer-0.2.0.tar.gz
Algorithm Hash digest
SHA256 732c0595d096c9b0038edeaa15476e9dae06b6617a90027ec23a243ab5c0f8f2
MD5 83664b08be8d63c6d87e87f0d3d35f96
BLAKE2b-256 f9be291e0daba77184c5fa3f2fce8c18ffb87b085f83b1e3eb92d96cc8b79824

See more details on using hashes here.

File details

Details for the file gdschamfer-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: gdschamfer-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.6

File hashes

Hashes for gdschamfer-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 317c3e19d336e9dc44e46127e53c3a0487bfc2919b7e773c9538ee813469c5a8
MD5 d38e15d24cf24838506be4f68e8bb936
BLAKE2b-256 d1826ee5a5e6b925271a71624293ea244ff909f8090c40b0229b2d8d84db63cc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page