question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Now, 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:closed
  • Created a year ago
  • Reactions:1
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
bernhard-42commented, Jun 19, 2022

A solution based on ˋjupyter-cadqueryˋ is avaiable at https://framagit.org/roipoussiere/cadquery-vscode So closing this issue

1reaction
roipoussierecommented, Mar 31, 2022

It’s alive!

  • available on Open VSX Registry and VisualStudio marketplace;
  • preview is updated when saving;
  • reasonably fast (ie. a fraction of a second for basic models);
  • probably full of bugs - I need beta testers! Who’s in?

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? 😃

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

Extension API - Visual Studio Code
Visual Studio Code is built with extensibility in mind. From the UI to the editing experience, almost every part of VS Code can...
Read more >
20 Best VSCode Extensions To Improve Your Productivity
Considering Visual Studio Code is the most popular IDE, here are 20 VSCode extensions that will make you a more productive developer.
Read more >
Useful VS Code Extensions For Front-End Developers
The VSCode extension indexes the most relevant pieces of information from GitHub and Jira for a given block of code, to help you...
Read more >
Top 10 VSCode Extensions YOU MUST TRY! - YouTube
Check out my courses to become a PRO!https://developedbyed.com/In today's episode we will look at my top 10 best vscode extensions that you ...
Read more >
Sample code illustrating the VS Code extension API. - GitHub
VS Code Extension Samples · An explanation of its functionality · A gif or screenshot demonstrating its usage · Link to a guide...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found