|
Hello, I am a new user. In the past I have used AutoCAD quite a lot, including AutoLisp programming (which I really liked to do). Of course there was also the script in AutoCAD.
Now I am trying to work with LibreCAD (personal use), and was immediately drawn to command files which I can create in other applications, for example Google Sheet. In a way it is similar but the details are bugging me. I will post some question in the appropriate groups on this forum. BTW, developers are reading on this forum as well. The documentation seems pretty basic. Some sample command files (drawing recognazible things), would be very instructive. Thanks for all help in advance. eengebruiker |
|
Commands are not well designed, and that explains why they are not well documented. What we have are a collection of quick fixes for specific feature requests.
Good news is that initial Python support is expected soon.
|
|
This post was updated on .
Are you referring to https://forum.librecad.org/Python-LibreDcl-first-test-td5725735.html? I'd be much happier if I could run some [any] version of it in Windows. An Alpha release would be really good. I also think it would very much benefit from JSON-Based Configuration. |
|
In reply to this post by eengebruiker
https://forum.librecad.org/Self-Documenting-Tools-tp5725976p5728021.html and thereabouts seems to resonate with your comments. Are you prepared to sift through the code in the repository for details?
|
|
In reply to this post by flywire
@dxli. I approach you as a developer here. Is that correct?
You wrote "Commands are not well designed, and that explains why they are not well documented. What we have are a collection of quick fixes for specific feature requests." This looks pretty dangerous to me. How to get things straight once it has gone too far in the wrong direction? My idea: Feature request must be considered very carefully and hesitant to avoid future problems. All users will benefit from that attitude, including the requesters. You also wrote that Python support is due to arrive, Doesn't that ask for development skills of the user? (I barely know any python, so maybe a bit unfair to put it this way.) Do you present this as a substitute for scripting? If the intention really is to have a script language to run in LibreCAD, then all commands (all things avaliable to the user) should be present in that language. And should be kept level with every improvement or addition to LibreCAD. (Must be eveluated in every development plan.) You can read the above as the following request from me. "A solid and complete script language in LibreCAD that is kept stable and complete during all developments." I think it is very usefull to have this. Maybe it is necessary to start all over for once, with a new initiative. I think it is important to have this done, before serious developments in paperspace, 2 1/2D or solidmodelling are considered (I read something about this). Just an opinion. |
|
Getting python support is minimum effort towards a Turing complete scripting framework. As a bonus, lots of computation libraries can be used in python.
Yes, python is intended for advanced users. There's another possibility, get AI support. For example, user only describe the objective: draw a parabola tangent to x-axis and the line y=x; fillet at tangential points for r=0.1; the AI will find out the parabola and fillet parameters, so the commands and computational being delegated to an external AI. The current command system is not complete, but not too bad, after years of user experience.
|
|
@dxli. Thanks for the reply. There's an idea in the following but you don't have to reply.
I am suddenly asking myself if AutoCAD has a complete script language; if all functionality can be accessed by it. Maybe it has limits. I allways used AutoLISP and was quite good at it actually. Sometimes i wrote a piece of script with AutoLISP, to be picked up automatically by AutoCAD when restarted (to get something going at the start that could not be done with AutoLISP). Apart form this we made limited use of script in AutoCAD. This is why i am so interested in Clojure, which is a much better Lisp. Find it amazing. AI (chat GPT in my case) does amazing things. I thought Clojure was an obscure language but when I asked for a function for some task, it produced it flawless. Now I know there are quite a lot of users. [Start Idea] Simple example in AutoLISP: (setq p1 '(0 0) p2 '(100 100)) (command "LINE" p1 p2 "") This draws via the command system. This way ellipses, arcs, inserts, polylines, etc., could be drawn. It went fairly quick but to speed up you could write directly into the database using the DXF-codes. The entities to be forced into the database looked like '((0 . "LINE") (10 . 0.0 0.0) (11 . 100.0 100.0) (8 . "GEO1") . . .) (other codes where mandatory to get it accepted.) I was thinking . . . since drawings in LibreCAD are saved as DXF, will it become possible to do something similar with python? [End Idea] We could go on about this (scripting and programming) for a long time but it would be a waste of time for you. I would benefit mostly i guess. Thanks again. |
| Free forum by Nabble | Edit this page |
