Skip to content
renebohne edited this page Feb 25, 2013 · 25 revisions

Besides reading design files like eps, svg etc. VisiCut can now also read and execute a javascript like language from a .ls file. This gives people a very flexible way to make lots of variation in things like speed and power.

As this currently still under development you'll have to install a NightlyBuild version of Visicut: http://137.226.142.25:5080/wwwshare/VisiCutNightly/

Usage

You can open a .ls file just like you do other files. For mapping you can select the Everything cut profile. You could position and/or resize it. Press execute.

If the order in which parts are lasercutted is important you can alter the cut profile's Optimization setting from NEAREST to file. You can find this under: Edit > Settings > Manage Laserprofiles... > cut.
You could also add a new Line Profile for this.

Laserscript

Methods

move(x,y);

Move to a x, y coordinate.

line(x,y);

Lasercut a line from the previous position (set with line or move) to a new x,y coordinate.

set(property, value);

Use for setting properties like speed and power e.g.:

set("power",50);
set("speed",50);
echo(message);

Create a alert like message for debugging purposes.

Sandbox

For security reasons you can only use a subset of Java. The Math class is accessible, so you do for example:

var five = Math.abs(-5);

In the future it will be posible to disable this limit in preferences.

##Example

var space      	= 5;
var lineHeight 	= 5;
var numLines	= 5;
var x 		= 0;
var speedStep	= 100/(numLines-1);

set("power",100);
for (var i = 0; i < numLines; i++)
{
	set("speed",i*speedStep);
	line(x,lineHeight);
	move(x+=space,0);
}

#Future Go at it! Pull requests and suggestions are welcome!
Keep an eye on the issue queue for further developments.