{ "info": { "author": "T. Kramer", "author_email": "code@tkramer.ch", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: GNU Affero General Public License v3", "Programming Language :: Python :: 3", "Topic :: Scientific/Engineering", "Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)", "Topic :: Scientific/Engineering :: Visualization" ], "description": "# gds3xtrude\nA simple layout to 3D converter.\n\ngds3xtrude takes the layers of your layout and converts them into 3D volumes by extrusion.\n\n`gds3xtrude` is intended to be used in two different ways:\n* as KLayout extension: Show 3D model of the active view.\n* as standalone tool: Convert GDS to OpenSCAD/Blender from the command line.\n\n![Screenshot](./examples/freepdk45_screenshot.png \"Screenshot\")\n\n## Dependencies\n* OpenSCAD: 3D modelling tool. Can be installed using the package manager of most linux distributions.\n* solidpython: Python library for creating OpenSCAD models.\n* klayout: Python module of KLayout used for GDS input/output and polygon operations.\n\n## Install (Linux)\n\n### As KLayout package\nUse the KLayout package manager to install `gds3xtrude`.\nDependencies (gds3xtrude python package, OpenSCAD) must be installed manually:\n\n```sh\napt install openscad\npip3 install --user gds3xtrude\n```\n\n### As standalone tool\nWhen used as a standalone tool `gds3xtrude` additionally depends on the klayout Python package.\n\n```sh\npip3 install --user gds3xtrude\npip3 install --user klayout\n```\n\n### Install from Git (instead of installing using pip)\n```sh\ngit clone [this repo]\ncd gds3xtrude\npython3 setup.py install --user\n```\n\n## Install (Windows)\nWindows is currently not supported but very likely you can get gds3xtrude running there with some tweaks.\nHere are some ideas how to install it:\n* Install Python and pip\n* Get OpenSCAD: http://www.openscad.org/downloads.html\n* Rest should be similar to the Linux install instructions.\n\n## Usage\n\n### As KLayout module\n\n* Open a layout.\n* Zoom in to the region you want to pass to gds3xtrude.\n* Select `Tools -> gds3xtrude -> run script`\n* Select the layerstack file for your technology. (Example for FreePDK45 can be found in `examples/freepdk45.layerstack`)\n\n\n### As standalone tool\nExample usage:\n```sh\n# Get layerstack file for FreePDK45.\nwget https://codeberg.org/tok/gds3xtrude/raw/branch/master/examples/freepdk45.layerstack\n\n# Get a GDS file.\nwget https://codeberg.org/tok/gds3xtrude/raw/branch/master/examples/NAND2X1.gds\n\n# Run gds3xtrude\ngds3xtrude --tech freepdk45.layerstack --input NAND2X1.gds --view\n```\n\nIf you get an error like `gds3xtrude: command not found` the program is probably not in your `PATH` environment variable.\nTry to add the pip binary directory to the PATH variable first:\n```sh\nPATH=$PATH:$HOME/.local/bin\n# And now again: gds3xtrude ...\n```\n\n### Layer stack definition\nTo convert a 2D layout into a 3D model some information about the physical layer stack is necessary.\nThis information must be passed to gds3xtrude as a file. An example of a simple layer stack description\nfor the FreePDK45 can be found in `examples/freepdk45.layerstack`. Use this file as a starting point and adapt it to your needs.\n\nEssentially a layerstack file is just a python script that defines some data structures.\n\nExample:\n```python\nfrom gds3xtrude.include import layer, Material\n\n# Define layers\npoly = layer(15)\ncontact = layer(16)\nmetal1 = layer(21)\n\n# Define materials and colors\nm_poly = Material('poly', color=(0.8, 0.2, 0.2))\nm_metal1 = Material('metal1', color=(0.8, 0.2, 0.2))\n\n# Assign materials\npoly.material = m_poly\nmetal1.material = m_metal1\n\n# Define additional layers from boolean operation\ncontact_to_silicon = contact - poly\n\n# Define layer stack structure as a list of (layer thickness, [masks, ...]).\n# The 3D model is created layer by layer from bottom to top.\nlayerstack = [\n (10, contact_to_silicon),\n (20, [contact, poly]),\n (50, contact),\n (50, metal1),\n]\n```\n\nThe crossection of the layer stack described in the example above is shown here. Note that the contact from metal1 down to silicon (which is not shown nor included in the example) consists of three parts. This is only due to the layer by layer creation of the 3D model but it is important to understand for writing the layerstack definition. For instance on the lowest layer there is only a piece of contact down to silicon. Contacts wich have polysilicon below do not reach this lowest layer. This is modelled as the boolean difference `contact_to_silicon = contact - poly`.\nMasks can be merged by putting them into a list as used for the second layer (`[contact, poly]`).\n\n![layer stack illustration](./doc/layerstack_doc.png \"layer stack\")\n\n## Blender\n3D models can also be generated in blender. Use the command line tool for this:\n```sh\ngds3xtrude --tech freepdk45.layerstack --input NAND2X1.gds --cad blender\n```\nNote that the current implementation over the Blender scripting API is very slow and therefore only small things such as standard cells can be visualized.\n\n## FreeCAD\nThe generated OpenSCAD models (.scad) can be imported into FreeCAD.\n\n### Color Issue\nWhen applying a boolean union FreeCAD strips away colors. Therefore an exported .obj model will by totally gray. There is a workaround:\n* Open the OpenSCAD model in FreeCAD\n* Open the `Model` tab in `Combo View`\n* Expand the list of the imported model which is likely to be named `Unnamed`\n* Find a child node labelled `union`, select and delete it\n* Select the full model to be exported (Ctrl-A)\n* Now you can export to .obj without loosing color information\n\nAdditionally to the .obj file FreeCAD will also create a .mtl file containing material/color information. Blender will automatically read it when importing the .obj file.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://codeberg.org/tok/gds3xtrude", "keywords": "gds openscad 3d viewer layout klayout", "license": "AGPL", "maintainer": "", "maintainer_email": "", "name": "gds3xtrude", "package_url": "https://pypi.org/project/gds3xtrude/", "platform": "", "project_url": "https://pypi.org/project/gds3xtrude/", "project_urls": { "Homepage": "https://codeberg.org/tok/gds3xtrude" }, "release_url": "https://pypi.org/project/gds3xtrude/0.0.8/", "requires_dist": [ "solidpython", "klayout ; extra == 'standalone'" ], "requires_python": "", "summary": "3D GDS viewer based on OpenSCAD", "version": "0.0.8" }, "last_serial": 4998281, "releases": { "0.0.3": [ { "comment_text": "", "digests": { "md5": "19faaa22d37bb38e5fe8fac4c213c971", "sha256": "e621fc379634f54e1a8a752c853868954441615385352978f3950b21366b6237" }, "downloads": -1, "filename": "gds3xtrude-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "19faaa22d37bb38e5fe8fac4c213c971", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 35465, "upload_time": "2018-12-09T17:08:20", "url": "https://files.pythonhosted.org/packages/e8/30/465b4004831410cb933b3a7e1a926f2c7fb0869882519d30a56b7116d494/gds3xtrude-0.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a9161a3ae0c3dbdbf565dbdae1f3b0ee", "sha256": "457e70478f223f7e356519abf7accc1e55a95f2eb5b4596d344c12fcdfa67597" }, "downloads": -1, "filename": "gds3xtrude-0.0.3.tar.gz", "has_sig": false, "md5_digest": "a9161a3ae0c3dbdbf565dbdae1f3b0ee", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9372, "upload_time": "2018-12-09T17:08:22", "url": "https://files.pythonhosted.org/packages/0e/1b/e8eb935848eb92911435084cf3fdf8e08bf2acdbafbe19cc497923eae173/gds3xtrude-0.0.3.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "64fbbfff85006e09a83f4cd51a188a4c", "sha256": "43f2412068acd3869c8e0de13eb4088abf0a0788ae4528babaf7efe7fd93248b" }, "downloads": -1, "filename": "gds3xtrude-0.0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "64fbbfff85006e09a83f4cd51a188a4c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 35722, "upload_time": "2018-12-30T21:53:46", "url": "https://files.pythonhosted.org/packages/01/97/f5bcaa767e38564d94910321cf7a0552f26dd497d78c2dab487f2209dbd5/gds3xtrude-0.0.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "adbc4c6242c1c40033edd9a46ab91eb6", "sha256": "c76632a9664e6c67e8ce592e8aa3892b058396e778f9df9b132496b7f9b2a091" }, "downloads": -1, "filename": "gds3xtrude-0.0.5.tar.gz", "has_sig": false, "md5_digest": "adbc4c6242c1c40033edd9a46ab91eb6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 40985, "upload_time": "2018-12-30T21:53:48", "url": "https://files.pythonhosted.org/packages/e6/ae/5b90aec4589539171951ac0f529a63c449ec10e9a44fdc12b875ee924460/gds3xtrude-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "821dc3b92c1261d19308cb8eaba31473", "sha256": "3e13bfa0e6e9b1d0b85c501cbf70802f22827e813104424f5c3f4fe7f1f1cec6" }, "downloads": -1, "filename": "gds3xtrude-0.0.6-py3-none-any.whl", "has_sig": false, "md5_digest": "821dc3b92c1261d19308cb8eaba31473", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 36299, "upload_time": "2019-01-08T13:15:31", "url": "https://files.pythonhosted.org/packages/cc/20/bc687590da5ebea501a0b0d15209c072973f3a96de9cc2bdbba7b503e19d/gds3xtrude-0.0.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e5cd3e10a2c4df9f0ef9622443d5b0d0", "sha256": "9a7f8b91d7cb9a79172ffa6b6d033bf47b639a38615ce0f900548e587cfaba17" }, "downloads": -1, "filename": "gds3xtrude-0.0.6.tar.gz", "has_sig": false, "md5_digest": "e5cd3e10a2c4df9f0ef9622443d5b0d0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12031, "upload_time": "2019-01-08T13:15:33", "url": "https://files.pythonhosted.org/packages/cd/5f/d1d1066c45cc70d7ac4acd44d4dc0b6b53c82b6614c8e93dfb87dab35587/gds3xtrude-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "7635ed7af9a7160f570377611f5a2bfa", "sha256": "0f28a152c12176432323b30b92715d092ba262398ac213c319d7b81b38ecb6df" }, "downloads": -1, "filename": "gds3xtrude-0.0.7-py3-none-any.whl", "has_sig": false, "md5_digest": "7635ed7af9a7160f570377611f5a2bfa", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 36743, "upload_time": "2019-03-01T14:06:38", "url": "https://files.pythonhosted.org/packages/5f/9a/92f3423238487ed03e2358c6eb01631cc507dc53a09b0013b3d485b627d5/gds3xtrude-0.0.7-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ac5295a0bcfabd3c18075fef5449b774", "sha256": "1f3ac76d626d860f7676323268a699764c0e8c3ac112db146330385f564495ab" }, "downloads": -1, "filename": "gds3xtrude-0.0.7.tar.gz", "has_sig": false, "md5_digest": "ac5295a0bcfabd3c18075fef5449b774", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24003, "upload_time": "2019-03-01T14:06:39", "url": "https://files.pythonhosted.org/packages/3b/0d/f7a63b884bf45c78fd065e7705721d78244cacafcc9eaf4babb69475689e/gds3xtrude-0.0.7.tar.gz" } ], "0.0.8": [ { "comment_text": "", "digests": { "md5": "b87b81898c79fac349c7351c8d4bbf79", "sha256": "919f2dca25c43922013e3a295e4994f927c0f4646523a1186b497b2eba29ff63" }, "downloads": -1, "filename": "gds3xtrude-0.0.8-py3-none-any.whl", "has_sig": false, "md5_digest": "b87b81898c79fac349c7351c8d4bbf79", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 47734, "upload_time": "2019-03-28T15:26:30", "url": "https://files.pythonhosted.org/packages/bd/b5/806f52e452a68f1956000f65b9c8116b620e4985fc43216c1baad9b81634/gds3xtrude-0.0.8-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "55aa168df415f7d7f7d228b10baccf60", "sha256": "d83f75c5628a841a20a85adefc0f2b2c4cdcdb381503f027264b92e6e407fac6" }, "downloads": -1, "filename": "gds3xtrude-0.0.8.tar.gz", "has_sig": false, "md5_digest": "55aa168df415f7d7f7d228b10baccf60", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 29495, "upload_time": "2019-03-28T15:26:32", "url": "https://files.pythonhosted.org/packages/2b/e1/cb6eeb7e11a583e4a8f05efbf731104b2affb472ca8fcba17810aa423ca7/gds3xtrude-0.0.8.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b87b81898c79fac349c7351c8d4bbf79", "sha256": "919f2dca25c43922013e3a295e4994f927c0f4646523a1186b497b2eba29ff63" }, "downloads": -1, "filename": "gds3xtrude-0.0.8-py3-none-any.whl", "has_sig": false, "md5_digest": "b87b81898c79fac349c7351c8d4bbf79", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 47734, "upload_time": "2019-03-28T15:26:30", "url": "https://files.pythonhosted.org/packages/bd/b5/806f52e452a68f1956000f65b9c8116b620e4985fc43216c1baad9b81634/gds3xtrude-0.0.8-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "55aa168df415f7d7f7d228b10baccf60", "sha256": "d83f75c5628a841a20a85adefc0f2b2c4cdcdb381503f027264b92e6e407fac6" }, "downloads": -1, "filename": "gds3xtrude-0.0.8.tar.gz", "has_sig": false, "md5_digest": "55aa168df415f7d7f7d228b10baccf60", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 29495, "upload_time": "2019-03-28T15:26:32", "url": "https://files.pythonhosted.org/packages/2b/e1/cb6eeb7e11a583e4a8f05efbf731104b2affb472ca8fcba17810aa423ca7/gds3xtrude-0.0.8.tar.gz" } ] }