LibreCAD / LibreCAD_3

LibreCAD 3 is a next generation 2D CAD application written to be modular, with a core independent from GUI toolkits. Scripting is possible with Lua.
http://librecad.org
Other
305 stars 102 forks source link

Multiple lines in single line command #222

Closed Guruprasad-Rane closed 5 years ago

Guruprasad-Rane commented 5 years ago

Current line command is able to create a single line. Usually CAD software provide options to create multiple line by typing single command. An any body guide on how it can be achieved?

feragon commented 5 years ago

LibreCAD 3 doesn't support that now, it needs some modifications on the line creation code.

If you need to create a line strip, you could modify this part: https://github.com/LibreCAD/LibreCAD_3/blob/master/lcUILua/createActions/lineoperations.lua#L45

Here, calling createEntity() calls close() which terminates the current operation. That should be removed and instead update the builder (new ID and startPoint = endPoint). The creation step will stay the same (ask for the 2nd point) so the user will be creating the second line.