Skip to main content

gdsblenderpy

Translate GDS to Blender files

Dependencies

While not an explicit dependency, KLayout is a fantastic open source tool for viewing and creating GDS files.

Installing Blender

Follow instructions to install Blender

Add blender to path, to allow for commands from the terminal. The executable exists in these locations (by default).

Windows

  • 64-bit

C:\Program Files\Blender Foundation\Blender\blender.exe

  • 32-bit

C:\Program Files (x86)\Blender Foundation\Blender\blender.exe

Linux

/usr/bin/blender

MacOS

/Applications/blender/blender.app/Contents/MacOS/blender

Installation of this Package

These instructions help to install pip into the python that comes with blender, since python is not released with pip in the first place. More detail can be found here or with a differently worded google search.

  1. First cd into your blender path:

    cd /path/to/blender-2.8/2.80/python

  2. Run ensurepip for your blender's python:

    /bin/python3.7m lib/python3.7/ensurepip

    • in MacOS, ./python3.7m will run the executable instead of just the filename
  3. Now you have pip and can install modules by:

    bin/pip3 install --target lib/python3.6 packageName

  4. Install the dependencies manually:

    bin/pip3 install --target lib/python3.6 numpy

    bin/pip3 install --target lib/python3.6 gdspy

    bin/pip3 install --target lib/python3.6 phidl

  5. Run setup.py for this project after downloading from git (untested)

ALTERNATIVELY (WORKING)

  1. Install this module:

    bin/pip3 install --target lib/python3.6 gdsblenderpy

Creating layer_stack file

See the example.

In essence, add the layers you are interested in capturing for your blender project, give them, initial height (z), thickness, color and an etch_target if the layer is intended to cut into another layer (as opposed to being extruded).

At the end of the file (currently - will be changed in the future), add the layer stack and run the draw in blender command.

Then when you run the translator like below, it should work as the example does.

Running Translator

blender filename.blend --python layerstack-file.py

Where the layerstack-file.py file has been created following instructions. See example

TODO

Use

  • Neaten plotting of cross section

  • Figure out way to do dopings?

  • Fix plot cross section

Function

Release files for gdsblenderpy 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gdsblenderpy 0.0.3
File Size Uploaded
gdsblenderpy-0.0.3.tar.gz 6.1 kB Details

Release files / gdsblenderpy-0.0.3.tar.gz

Download URL gdsblenderpy-0.0.3.tar.gz
Size 6.1 kB
Tags Source
SHA-256 checksum
How to use checksums
cbace07838ab6254d6740f46def4a6318d269fa493a6c25afef36921c7731f1f
BLAKE2b-256 checksum
How to use checksums
2b3874a72c783968de5dd044e8a988da3da8bc6c86159c064fa9ed157c8775a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.9

Release history Release notifications | RSS feed

This release

0.0.3 This release

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page