Skip to main content

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:

  1. three-cad-viewer This is the complete CAD viewer written in Javascript with threejs being the only dependency.

  2. 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

  3. 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:

Binder: Latest development version

Examples

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>=8 and notebook>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.4

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

Source distribution (sdist)

Source distribution for cad-viewer-widget 4.1.4
File Size Uploaded
cad_viewer_widget-4.1.4.tar.gz 792.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cad-viewer-widget 4.1.4
File Interpreter ABI Platform
cad_viewer_widget-4.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 1.5 MB

Release files / cad_viewer_widget-4.1.4.tar.gz

Download URL cad_viewer_widget-4.1.4.tar.gz
Size 792.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e321c30ef6cdce6c80fe4354dea1c69547a747d03671802b489137757e7c0156
BLAKE2b-256 checksum
How to use checksums
75bff4e5e423f9de02069c9ebea4c2a76deeb4fe11ad0db516ef1847015b94d3
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.4-py3-none-any.whl

Download URL cad_viewer_widget-4.1.4-py3-none-any.whl
Size 715.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7b13a494d6997313a8f6faa410e68a2726645aadc832279fda75a35147fcb0d2
BLAKE2b-256 checksum
How to use checksums
c86a4a9df5d9c0c75d864950e7316f003457bbc22dc3bf3a186033d18f2ddcf4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.12

Release history Release notifications | RSS feed

4.1.5

2 release files

This release

4.1.4 This release

2 release files

4.1.3

2 release files

4.1.2

2 release files

4.1.1

2 release files

3.0.2

2 release files

2.0.2

2 release files

2.0.0

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.5

2 release files

1.3.4

2 release files

1.3.3

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.10.3

2 release files

0.10.2

2 release files

0.10.1

2 release files

0.10.0

2 release files

0.9.11

2 release files

0.9.9

2 release files

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