LibLaserCut icon indicating copy to clipboard operation
LibLaserCut copied to clipboard

Add LaserScript-Interpreter as MainClass

Open t-oster opened this issue 12 years ago • 3 comments
trafficstars

As soon as I have time, I will do the following: Create a Java-Class with main-method (i.e. make the liblasercut.jar executable) which is a command-line-tool for executing LaserScript (see https://github.com/t-oster/VisiCut/pull/78).

Syntax will be like java -jar LibLaserCut.jar --driver com.t-oster.liblasercut.laos.LAOS --set hostname=127.0.0.1 --set port=5900 --set someotherpropertyoflaosdriver=bla --disable-sandbox /path/to/laserscript.ls

Suggestions? Should be pretty easy to implement, maybe i have time tomorrow.

t-oster avatar Feb 23 '13 14:02 t-oster

Do we really want this? I fear this could cause two limitations in the long term:

  • restricts laserScript to the rather simple features that LibLaserCut offers (no interactivity, no SVG loading etc.). I envision something like a script that asks you for your name and lasercuts a badge with your name.
  • (maybe?) bloats LibLaserCut by introducing additional dependencies - LibLaserCut should easily be usable on Android or other environments

mgmax avatar Feb 23 '13 14:02 mgmax

Well... I think the dependency is not that big because the script engine is part of java... but we have to check for android.

Having this tool would enable you to script exactly such tools without VisiCut. The question is, if we want the script to be more like a file-format (like in openScad) or more like a VisiCut scripting engine which controls the program...

we could still achieve your goals by introducing script-parameters....

and even if the core is in LibLaserCut, the script interpreter can be enhanced in visicut. what i had in mind was to make it easy to create custom laser tools in any language and for executing just pass a script to this tool...

The design-goals of laser-script have to be discussed...

t-oster avatar Feb 23 '13 21:02 t-oster

You should remove the LaserScript stuff. If the LibLaserCut library is well done and clean. A properly scripting language would be a great example application that uses LibLaserCut. Much better than the one in Example that shouldn't really be part of the library either.

tatarize avatar Jun 19 '19 23:06 tatarize