scripting or? for multiple drawings

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

scripting or? for multiple drawings

zbilusic
Hi!

I was thinking about using LibreCAD for drawing some sewing patterns. Drawing a single pattern is not a problem but I need to draw multiple sizes of one pattern. All the lines in the pattern depend on three parameters, call them A, B, and C. So the lines positions and lengths can be calculated from these parameters, that differ for each size.

I can obviously create a drawing for each size manually, but that would be very tedious. I was trying to figure out how to create a script maybe, or a series of command lines that would calculate (formulas are of course known) my line positions and lengths and draw all sizes at once; or one at a time changing the values of A, B and C for each, before rendering.

Is something like that possible? Any examples out there?

Thank you!
Reply | Threaded
Open this post in threaded view
|

Re: scripting or? for multiple drawings

dxli
hi,

Please have a look at LibreCAD v3:  https://github.com/LibreCAD/LibreCAD_3/tree/master/luacmdinterface

For LibreCAD v2: it would be handy to do through the plugin interface:

For example, something similar to this one: https://github.com/LibreCAD/LibreCAD/tree/master/plugins/plotequation
zbilusic wrote
I was thinking about using LibreCAD for drawing some sewing patterns. Drawing a single pattern is not a problem but I need to draw multiple sizes of one pattern. All the lines in the pattern depend on three parameters, call them A, B, and C. So the lines positions and lengths can be calculated from these parameters, that differ for each size.

I can obviously create a drawing for each size manually, but that would be very tedious. I was trying to figure out how to create a script maybe, or a series of command lines that would calculate (formulas are of course known) my line positions and lengths and draw all sizes at once; or one at a time changing the values of A, B and C for each, before rendering.

Is something like that possible? Any examples out there?

Thank you!