Antyos / vscode-openscad

An OpenSCAD extension for VS Code
GNU General Public License v3.0
118 stars 18 forks source link

Proposal: Controlling OpenSCAD via DBus commands #6

Open tanius opened 3 years ago

tanius commented 3 years ago

I came across this interesting functionality and thought to propose it here in case you'd like to add it to your to-do list. Not expecting this to happen soon, of course.

There is a DBus input driver in OpenSCAD, which allows to control the OpenSCAD process at runtime from the outside via the Linux-based inter-process messaging system DBus. It allows to access more or less all functions available from the OpenSCAD menu items, and some more.

I found a reference implementation (a small Qt GUI program) and an OpenSCAD integration for Emacs using this functionality.

Useful ways to use this for your OpenSCAD integration in VS Code include:

(P.S.: Thank you for your work on this extension! It provides me with the currently best OpenSCAD development environment under Linux :slightly_smiling_face:)

Antyos commented 3 years ago

Thanks for the suggestion! I really like the idea of this!

I'd recently been thinking about making an option to have the OpenSCAD window take focus when saving a .scad file in VS Code, but I wasn't sure how to do that. This looks like it could potentially have some nice pay-offs. I'll look into it a bit further when I have some free time (meaning after my exams in a few weeks).

I'm glad you like the extension! Although I'm on Windows, there wasn't a good editing experience for OpenSCAD that I knew of. Even the other OpenSCAD extensions for VS Code left a lot to be wanted. There are still some features I want to add (that I haven't had the time for), but it means a lot to know that people appreciate all the hard work I put in to this extension! (which is the first and only thing I've ever written in TypeScript)