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:
-
gdschamfer.chamfer_polygons(...): Use this to perform chamfering of gdspy Polygon objects. -
gdschamfer.chamfer_cell(...): Use this to perform chamfering of gdspy Cell objects. -
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":
b) When chamfer_style = "outide_corners":
c) When chamfer_style = "all_corners":
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gdschamfer-0.1.0.tar.gz.
File metadata
- Download URL: gdschamfer-0.1.0.tar.gz
- Upload date:
- Size: 10.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd9bdcb1dacc933452857fd00cf6f4df93458360f84c6f8fd29711f7e4a33fcc
|
|
| MD5 |
ed9bc16852e160d3b6e86aa427b5696b
|
|
| BLAKE2b-256 |
5fb2294613c22b8096926192d193d301eb2fe08723462f76d8a84dac37513e35
|
File details
Details for the file gdschamfer-0.1.0-py3-none-any.whl.
File metadata
- Download URL: gdschamfer-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a8848ad0a6e34c8b45a7db6733550c93a4add11249cb0afaaa43a9c6f84050bb
|
|
| MD5 |
b0a2aed04e54d0e25ccf0369da5fee28
|
|
| BLAKE2b-256 |
3410adb94f82de256ce6516afdf31603bfac6018f74b60ba09df154cb02f4042
|