Posted by
emanuel on
Dec 22, 2024; 9:19pm
URL: https://forum.librecad.org/Video-LibreCAD-DEVELOPER-branch-Test-apps-tp5725868p5725870.html
My first goal is to embed the two interpreters and the Dcl script language stably with as little intervention as possible.
I still have problems with the simplest LC commands :-D.
Speaking of commands.
At the beginning of the video the smiley is drawn with the Lisp command "Command", which can simply execute command line commands like in AutoCAD.
I did the user input with src in a similar way to the LibreCAD plugin class.
Unfortunately, of course, only keyboard input in the original command line works.
The Lisp command line is still blocked. This is all still very proto.
I've been trying to port the entire object model to Python for a long time (I have to install it all myself for Lisp anyway - or gain experience with the object model), and I've already gotten a lot across with swig. (see file attached)
Unfortunately, there are still a few problem children among them, such as RS_Settings.
This is a QObject class. In order to be able to port something like that, I have to port half of Qtbase.
I don't know yet whether this works with swig. QtPy itself uses shiboken for porting.
Freecad uses both swig and shiboken.
Let's see, I'll approach it carefully.
I would prefer it with swig, I know that. And all the DCL stuff I wrote myself works great too.
The nice thing about LibreCAD is that it starts as a binary file.
I believe FreeCAD starts itself as a Python script.
You had something like that with Lua too.
I have been developing software for satellite/... receivers for around 20 years, hence my experience in this area (interpreters). The huge disadvantage of "I start myself as a Python script" is that you have to restart the entire application every time you develop the script in order to test the changes in the script. This takes...
With LibreCAD I can simply reload the script n times in the IDE using the Run button. That's definitely 10 times faster.
And if an error occurs in the script, it is only reported to the console.
With the “I am a Python Script” method, it kills the entire app.
It's bad if a drawing wasn't saved.
Unless you do something bad like I did in the video^^
Merry Christmas to all of you and a happy new year 2025.
Best regards
Emanuel
librecad.zip