jupyterscad


Namejupyterscad JSON
Version 1.0 PyPI version JSON
download
home_pageNone
SummarySolid 3D Cad (SCAD) renderer and viewer for Jupyter
upload_time2024-04-26 19:16:10
maintainerNone
docs_urlNone
authorJennifer Reiber Kyle
requires_python>=3.8
licenseGPLv3
keywords openscad scad jupyter jupyterlab notebook viewer render solidpython solidpython2
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Jupyter SCAD: SCAD in Jupyter


Jupyter SCAD provides rendering and interactive visualization for 3D objects described in [SolidPython2](https://github.com/jeff-dh/SolidPython) within a Jupyter notebook. Additionally, it provides interactive visualization for STLs.

This program is focused on the use case of generating stl files with Python (aka SolidPython2) interactively within a Jupyter notebook.

## Status: MATURE

This project has reached it's goal, a basic Jupyter notebook viewer for SolidPython2. Any further improvements are best served by just using the OpenSCAD
GUI (see Alternatives below).

At this time, the only work that is planned for this project is bugfixes. If you are interested in continuing to add functionality,
make an issue expressing your interest and we can discuss passing the baton.


## Documentation

Documentation is hosted at https://jreiberkyle.github.io/jupyterscad/.

## Quick Start

Jupyter SCAD can be installed with `pip`:

```console
pip install jupyterscad
```

An OpenSCAD object can be defined using SolidPython2, viewed in a Jupyter
notebook, and saved to an `stl` file with:

```python
from jupyterscad import view
from solid2 import cube

view(cube([1.5,2,1],center=True), outfile='cube.stl')
```

![render example](https://github.com/jreiberkyle/jupyterscad/blob/main/images/render_cube.png?raw=True)

## Alternatives

As an alternative to Jupyter SCAD, one could use a Jupyter notebook as an external editor, using SolidPython2 to update the SCAD file and OpenSCAD to visualize and render the SCAD file.
The benefit to this approach is that one can visualize the preview. The drawback is that the two-program workflow can feel distracting.
See more on using external editors for OpenSCAD [here](https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Using_an_external_Editor_with_OpenSCAD).

Or, one can use [ViewSCAD](https://github.com/nickc92/ViewSCAD), which was the motivation for this project. However the last time ViewSCAD was updated was 2019 (checked on 9/21/2023). It only supports SolidPython, not SolidPython2.

## Transitioning from ViewSCAD

This package was inspired by [ViewSCAD](https://github.com/nickc92/ViewSCAD) and therefore
maintains a very similar interface.

To transition from ViewSCAD, replace
```python
import viewscad

r = viewscad.Renderer()
r.render(obj)
```

with
```python
from jupyterscad import view

view(obj)
```

## Visualization Backend

This package uses [pythreejs](https://pythreejs.readthedocs.io/) for visualization.

Alternatives considered, ordered from closest fit to farthest:
- [pyvolume](https://pyvolume.readthedocs.io/): provides mesh visualization and interaction but (as of 2023.09.24) the latest release is alpha and documentation is sparse.
- [matplotlib mplot3d](https://matplotlib.org/2.2.2/mpl_toolkits/mplot3d/faq.html#toolkit-mplot3d-faq): provides mesh visualization and interaction but is slow.
- [pyvista](https://pyvista.org/): provides stl loading and visualization but visualization does not work in docker image.

## Acknowledgements

Thanks to [nickc92](https://github.com/nickc92) for creating [ViewSCAD](https://github.com/nickc92/ViewSCAD), which is the inspiration for this project.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "jupyterscad",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "openscad, scad, jupyter, jupyterlab, notebook, viewer, render, solidpython, solidpython2",
    "author": "Jennifer Reiber Kyle",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/7e/0a/641a66c17e2161e799123a92ccf30e0fee6fb9a52ead43fb05e96e11f6e9/jupyterscad-1.0.tar.gz",
    "platform": null,
    "description": "# Jupyter SCAD: SCAD in Jupyter\n\n\nJupyter SCAD provides rendering and interactive visualization for 3D objects described in [SolidPython2](https://github.com/jeff-dh/SolidPython) within a Jupyter notebook. Additionally, it provides interactive visualization for STLs.\n\nThis program is focused on the use case of generating stl files with Python (aka SolidPython2) interactively within a Jupyter notebook.\n\n## Status: MATURE\n\nThis project has reached it's goal, a basic Jupyter notebook viewer for SolidPython2. Any further improvements are best served by just using the OpenSCAD\nGUI (see Alternatives below).\n\nAt this time, the only work that is planned for this project is bugfixes. If you are interested in continuing to add functionality,\nmake an issue expressing your interest and we can discuss passing the baton.\n\n\n## Documentation\n\nDocumentation is hosted at https://jreiberkyle.github.io/jupyterscad/.\n\n## Quick Start\n\nJupyter SCAD can be installed with `pip`:\n\n```console\npip install jupyterscad\n```\n\nAn OpenSCAD object can be defined using SolidPython2, viewed in a Jupyter\nnotebook, and saved to an `stl` file with:\n\n```python\nfrom jupyterscad import view\nfrom solid2 import cube\n\nview(cube([1.5,2,1],center=True), outfile='cube.stl')\n```\n\n![render example](https://github.com/jreiberkyle/jupyterscad/blob/main/images/render_cube.png?raw=True)\n\n## Alternatives\n\nAs an alternative to Jupyter SCAD, one could use a Jupyter notebook as an external editor, using SolidPython2 to update the SCAD file and OpenSCAD to visualize and render the SCAD file.\nThe benefit to this approach is that one can visualize the preview. The drawback is that the two-program workflow can feel distracting.\nSee more on using external editors for OpenSCAD [here](https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Using_an_external_Editor_with_OpenSCAD).\n\nOr, one can use [ViewSCAD](https://github.com/nickc92/ViewSCAD), which was the motivation for this project. However the last time ViewSCAD was updated was 2019 (checked on 9/21/2023). It only supports SolidPython, not SolidPython2.\n\n## Transitioning from ViewSCAD\n\nThis package was inspired by [ViewSCAD](https://github.com/nickc92/ViewSCAD) and therefore\nmaintains a very similar interface.\n\nTo transition from ViewSCAD, replace\n```python\nimport viewscad\n\nr = viewscad.Renderer()\nr.render(obj)\n```\n\nwith\n```python\nfrom jupyterscad import view\n\nview(obj)\n```\n\n## Visualization Backend\n\nThis package uses [pythreejs](https://pythreejs.readthedocs.io/) for visualization.\n\nAlternatives considered, ordered from closest fit to farthest:\n- [pyvolume](https://pyvolume.readthedocs.io/): provides mesh visualization and interaction but (as of 2023.09.24) the latest release is alpha and documentation is sparse.\n- [matplotlib mplot3d](https://matplotlib.org/2.2.2/mpl_toolkits/mplot3d/faq.html#toolkit-mplot3d-faq): provides mesh visualization and interaction but is slow.\n- [pyvista](https://pyvista.org/): provides stl loading and visualization but visualization does not work in docker image.\n\n## Acknowledgements\n\nThanks to [nickc92](https://github.com/nickc92) for creating [ViewSCAD](https://github.com/nickc92/ViewSCAD), which is the inspiration for this project.\n",
    "bugtrack_url": null,
    "license": "GPLv3",
    "summary": "Solid 3D Cad (SCAD) renderer and viewer for Jupyter",
    "version": "1.0",
    "project_urls": {
        "Changelog": "https://github.com/jreiberkyle/jupyterscad/blob/main/CHANGELOG.md",
        "Documentation": "https://jreiberkyle.github.io/jupyterscad/",
        "Homepage": "https://jreiberkyle.github.io/jupyterscad/",
        "Repository": "https://github.com/jreiberkyle/jupyterscad"
    },
    "split_keywords": [
        "openscad",
        " scad",
        " jupyter",
        " jupyterlab",
        " notebook",
        " viewer",
        " render",
        " solidpython",
        " solidpython2"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4b838f7378d180d98e5d29772d93b29300d02ba8ee6859f3d182eda0e1d90b7d",
                "md5": "3e02769021f9be27d2d03d607b094f71",
                "sha256": "3e8dbeb376e48231dd5e8704a63c4ef858446d316aa4680beb8924810e94b47d"
            },
            "downloads": -1,
            "filename": "jupyterscad-1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3e02769021f9be27d2d03d607b094f71",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 20416,
            "upload_time": "2024-04-26T19:16:09",
            "upload_time_iso_8601": "2024-04-26T19:16:09.025694Z",
            "url": "https://files.pythonhosted.org/packages/4b/83/8f7378d180d98e5d29772d93b29300d02ba8ee6859f3d182eda0e1d90b7d/jupyterscad-1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7e0a641a66c17e2161e799123a92ccf30e0fee6fb9a52ead43fb05e96e11f6e9",
                "md5": "8d0ed6551e61db5edb5bfaea817b6154",
                "sha256": "01a916d3fc5cacab4797b7b80819c92ef30d70363f6a1b6d9fd6f378213ae2b3"
            },
            "downloads": -1,
            "filename": "jupyterscad-1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "8d0ed6551e61db5edb5bfaea817b6154",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 20815,
            "upload_time": "2024-04-26T19:16:10",
            "upload_time_iso_8601": "2024-04-26T19:16:10.630467Z",
            "url": "https://files.pythonhosted.org/packages/7e/0a/641a66c17e2161e799123a92ccf30e0fee6fb9a52ead43fb05e96e11f6e9/jupyterscad-1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-26 19:16:10",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jreiberkyle",
    "github_project": "jupyterscad",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "jupyterscad"
}
        
Elapsed time: 0.28358s