Re: [Video] LibreCAD DEVELOPER branch - Test apps
Posted by sand1024 on Dec 23, 2024; 9:01am
URL: https://forum.librecad.org/Video-LibreCAD-DEVELOPER-branch-Test-apps-tp5725868p5725875.html
Yes, I think I fully understand all challenges exposing LC internals for scripting...
Actually, that was the reason for my point - most probably, it will be necessary to create a specific sub-set API for scripting only (instead trying to feed existing one to SWIG).
As far as I can imagine, roughly such API may include something like this:
1) Scriptable proxies for entities / entity-properties modification functions
2) Utility functions (like support of undo/redo, moving relative points, invoking actions etc.)
3) Existing command scripting
4) Entities selection/catching (by id, by positions etc.)
5) Geometry utilities (selection, intersection, tangent, distance, angle etc.).
The major challenge for designing such API is achieving a balance between simplicity of scripting and features set (I still think that exposing existing object model "as is" will be more than complex for scripting)...