Having got the raster working correctly I would like to combine the imagetogcode.py and the thlaser.py.
I made some changes to both of these files:
imagetogcode:
Add M649 command, f.write("M649 S100.0 L60000 P20 B2 D0\nG28\nG0 X130 Y10 F1500\n");
Use "$" instead of "N" for the direction setting, f.write("\nG7 $1 ")
thlaser:
Put ";" at the start of all comments so that the version of Pronterface that works with the raster Gcode also works with the vector Gcode
Pass the layer name as laser intensity (0 to 100)
Use PPM and feed (can't remember if I changed that or not)
Layer name now has to be (for example) 20 [ppm=40,feed=300] meaning 20% laser power, 40 pulses per mm, 300 mm per minute.
At the moment thlaser gives an error if it meets a bitmap and no vectors and ignores layers that have a bitmap and no vectors. What needs to happen is that it calls the imagetogcode.py if a layer has a bitmap in. Layer name can still pass laser power as this is required for the raster image.
If this is done then it will be possible (for example) to raster an image, add some vector text then cut the piece out all from one Inkscape drawing.
I had a look at both scripts but can't even work out how the imagetogcode gets the data from the bitmap, nor can I work out how to make the layer with bitmap pass the info to the imagetogcode script inside the thlaser.
I don't mind blundering about in the dark trying until I manage but I am sure that there are people on here a lot better qualified to do this than I am.
Anyone care to give me a few pointers?