Forums » Software development »
 Create preview for engrave simplecode
Create preview for engrave simplecode
Added by peteruithoven over 11 years ago
I'm working on a Simplecode previewer: 
https://github.com/peteruithoven/SimpleCodePreviewer
It can help a great deal with debugging issues.
I'd like to add support for engraving, but I'm having trouble with it's simplecode. 
Engrave lines are stored in lines like: 
9 1 320 0 251658240 254 0 0 0 0 0 0 0
Documentation:
Bitmap data <bpp> <width> <data-0> .. <data-n> Load bitmap data line of <width> pixels with each <bpp> bits per pixel. This is followed by [n] 32-bits datawords. Where [n] is rounded up to 32 bits using n = ceil(bpp*npixels/32). These pixels are clocked out during the next mark command (1). Pixel 1 is located at the LSB of the first dataword.
I'm having trouble with the <data-...> parts, I'm not very good with bits. Could someone help me create a visual preview?
Relevant code: 
Simplecode generation in VisiCut: 
https://github.com/t-oster/LibLaserCut/blob/develop/src/com/t_oster/liblasercut/drivers/LaosCutter.java#L569
Simplecode parsing in laos firmware: 
https://github.com/LaosLaser/Firmware/blob/master/laser/LaosMotion/LaosMotion.cpp#L319
Stepper controlin laos firmware: 
https://github.com/LaosLaser/Firmware/blob/a08bde1e29abb71e1deeaac4f8bbb17eabe8e06b/laser/LaosMotion/grbl/stepper.cpp#L340
| bitmap.simplecode (593 Bytes) bitmap.simplecode | |||
| bitmap.png (188 Bytes) bitmap.png | |||
| VisiCut engrave preview.png (11.4 KB) VisiCut engrave preview.png | 
Replies (2)
     RE: Create preview for engrave simplecode
    -
    Added by peteruithoven over 11 years ago
    RE: Create preview for engrave simplecode
    -
    Added by peteruithoven over 11 years ago
  
  I'm porting this to the web:
https://github.com/peteruithoven/Simplecodewebpreviewer
     RE: Create preview for engrave simplecode
    -
    Added by jaap over 11 years ago
    RE: Create preview for engrave simplecode
    -
    Added by jaap over 11 years ago
  
  How about this? http://webviewer.laoslaser.org/
I downloaded your GIT repository and set it up as a public website.
For users: drag your simplecode file on the display!