bernhard-42 / vscode-ocp-cad-viewer

A viewer for OCP based Code-CAD (CadQuery, build123d) integrated into VS Code
Apache License 2.0
78 stars 9 forks source link

Request: Auto-restart open viewers when launching VSCode #35

Closed MatthiasJ1 closed 5 months ago

MatthiasJ1 commented 8 months ago

If there is a viewer tab already open when VSCode is launched, you need to manually go to the OCP Cad Viewer menu and restart the viewer before it works.

bernhard-42 commented 7 months ago

A faster way is pressing cmd-k v on Mac or ctrl-k v on windows

bernhard-42 commented 5 months ago

@MatthiasJ1 Now that OCP CAD Viewer starts the viewer e.g. on save, and typically on opening a Python file, is this still open?

zwn commented 5 months ago

For me it does not work. I get messages like

image

even though I have workspace and editors open. When I try to open the viewer, I get a message stating that I should first open a file in my project. I need to first click into the editor area and only then I can try starting the viewer. It tries to start but tells me

Viewer backend started
[Errno 111] Connection refused

and quits. Then I go check my terminals and I see several OCP backend open, one of them with existing backend. Only when I go and close the viewer window (which is black, not showing anything), I can open the viewer and get it working. I also get some editor doublings and windows reshuffling when I close the IDE and start it again.

My setup involves 3 python files open in tabs, each split into two cells (as suggested in readme), each attached to its own kernel, and one viewer window. Once I get it started, it works like a charm but getting there takes some effort. I am on debian 12.

bernhard-42 commented 5 months ago

Let's check a scenario that works:

Is it working then?

zwn commented 5 months ago

I can confirm this scenario works for me.

bernhard-42 commented 5 months ago

Closing for now. Please reopen if you feel that it does't work as expected