cad-viewer-widget
A Jupyter widget to view CAD objects
cad-viewer-widgets has its origin in Jupyter-CadQuery, which now
has been split into 3 layers. This repo being the middle layer:
-
three-cad-viewer This is the complete CAD viewer written in Javascript with threejs being the only dependency.
-
cad-view-widget (this repository) A thin layer on top of cad-viewer-widget that wraps the CAD viewer into an ipywidget. The API documentation can be found here
-
Jupyter-CadQuery A CadQuery viewer, collecting and tessellating CadQuery objects, using cad-view-widget to visualize the objects
Click on the "launch binder" icon to start cad-viewer-widget on binder:
Examples
- Tests and demos: Demonstrating the features using the sample tesssellations in ./examples
- Classic OCC Bottle: A real CAD example based on python-occ
Installation
To install use pip:
$ pip install cad_viewer_widget
For a development installation (requires [Node.js](https://nodejs.org >=21.1.0) and Yarn version 1),
$ git clone https://github.com/bernhard-42/cad-viewer-widget.git
$ cd cad-viewer-widget
$ pip install -e .
$ jupyter labextension develop . --overwrite
When actively developing your extension for JupyterLab, run the command:
$ jupyter labextension develop --overwrite cad_viewer_widget
Then you need to rebuild the JS when you make a code change:
$ cd js
$ yarn run build
You then need to refresh the JupyterLab page when your javascript changes:
- save your notebook
- restart the kernel
- delete all output cells
- refresh the browser page
Build step
hatch build
Changes
2023-08-14
- Adapt to ocp-tessellate
- Support version 1.8.6 of three-cad-viewer
- Supports
jupyterlab>=4,ipywidgets>=8andnotebook>7 - Dropped support for
notebook < 7.0 - Build process now uses pyproject.toml and hatch
2023-01-03
- Added pyparsing as dependency
- Pinned traitlets to ~5.8
- Upgraded bottle example to occt 7.6.2
Metadata
Release files for cad-viewer-widget 4.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cad_viewer_widget-4.1.2.tar.gz | 791.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cad_viewer_widget-4.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.5 MB
Release files / cad_viewer_widget-4.1.2.tar.gz
| Download URL | cad_viewer_widget-4.1.2.tar.gz |
|---|---|
| Size | 791.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6188dce45ad836979cdca17d34a479a968f05e090bbd9a090a9f3ca070572e51
|
|
BLAKE2b-256 checksum How to use checksums |
8f7ae24cd78118a897804a22be9c892e880bac4885e904c54a287738b6652505
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.12
|
Release files / cad_viewer_widget-4.1.2-py3-none-any.whl
| Download URL | cad_viewer_widget-4.1.2-py3-none-any.whl |
|---|---|
| Size | 714.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8971a757e6e26fac6cc235aca8b6b5ed4b59b7a911cc2a36c7deaf5374c14401
|
|
BLAKE2b-256 checksum How to use checksums |
fa82041110fd2bd7e34e4b8d5b243fedcdec46f3b7aa8dba150a65e8e46c2352
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.12
|