Skip to main content

A Jupyter widget to view cad objects

Project description

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

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cad_viewer_widget-2.0.2.tar.gz (473.1 kB view details)

Uploaded Source

Built Distribution

cad_viewer_widget-2.0.2-py3-none-any.whl (409.4 kB view details)

Uploaded Python 3

File details

Details for the file cad_viewer_widget-2.0.2.tar.gz.

File metadata

  • Download URL: cad_viewer_widget-2.0.2.tar.gz
  • Upload date:
  • Size: 473.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for cad_viewer_widget-2.0.2.tar.gz
Algorithm Hash digest
SHA256 efac7b4cbdb11d4404261354977e8f984002ecbbb0b90a7af106d8726cf2c1b5
MD5 6fb038b5a413147c88c2793cf3934645
BLAKE2b-256 1f5243e90a27b310333fd6ad3a32021e37b98167c5464ee9da940872ee587404

See more details on using hashes here.

File details

Details for the file cad_viewer_widget-2.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for cad_viewer_widget-2.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 181134681be4cf387d2c91605e7c93e8e1faeb60c80f5635f4b3ee2b72095310
MD5 6f08e352c84e73102622baf59627f51c
BLAKE2b-256 b12d7a2c5b8eb367f14d4b9b74429b8555a5d910880ebad162ddafcf4f4bbb06

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page