VSCode Extension
See original GitHub issueNow, with Jupyter-CadQuery 3 the actual CAD viewer is full written in Javascript three-cad-viewer. So it should be possible to write a (native) VS Code extension:
One would use python code from this repo. For assemblies this would be
from jupyter_cadquery.utils import numpy_to_json
from jupyter_cadquery.cad_objects import to_assembly
from jupyter_cadquery.base import _tessellate_group
result = numpy_to_json(_tessellate_group(to_assembly(a)))
See https://github.com/bernhard-42/jupyter-cadquery/blob/7ed5ff2ba484ea6cb96f5ea999a88484dfb6b1c1/jupyter_cadquery/cad_objects.py#L616-L622 and https://github.com/bernhard-42/jupyter-cadquery/blob/7ed5ff2ba484ea6cb96f5ea999a88484dfb6b1c1/jupyter_cadquery/base.py#L482
The output is the format of the three-cad-viewer component. So one needs to run the python code above from VS Code and then push the resulting json object into three-cad-viewer which runs in a web view of VS Code.
However, I don’t have time to maintain another project. But I am happy to help if someone gives it a try 😉
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:12 (12 by maintainers)
A solution based on ˋjupyter-cadqueryˋ is avaiable at https://framagit.org/roipoussiere/cadquery-vscode So closing this issue
It’s alive!
A big thank to @bernhard-42 for its reactivity on the issues I created for this.
Also, I’m not on the CadQuery Google Group, anyone here to publish a message about this? 😃