I made a plugin to render JSCAD in JupyterLab!
I started to use JSCAD quite recently and wish to see the geometries step by step. But the JSCAD website seems a bit inflexible for this purpose. With this plugin, one can display geometries generated by each step before doing, say, a huge boolean operation.
It could be a little bit tricky to import
@jscad/modeling in a Node.js notebook. There are two ways:
@jscad/modelinglocally in a folder and create your Node.js notebook inside that folder.
- Install globally by
npm install -g @jscad/modeling, and set the environment variable
NODE_PATHto your global installation path (can be found by
npm root -g). See https://stackoverflow.com/questions/15636367/nodejs-require-a-global-module-package.
Personally, I used the second way.
I haven't uploaded this project to pip. But anyone can download the packed
whl file from the release page and run
pip install [path to the .whl file].
After installation, running
jupyter labextension list would list
@jupyterlab/jscad-extension as one of your extensions. You probably need to run
jupyter lab build if it prompts you to do so.
To check whether your installation is successful, you can run the example notebook locally and you should be able to see a nice logo of JSCAD!
Hope you all enjoy this project! Let me know if there are any bugs or ideas for improving it!