Skip to content Skip to sidebar Skip to footer

Binary Handling For 3d Printing Js-slicer (slacer.js)

Introduction Hey folks, i am currently working on a JavaScript-based 3d slicing tool (SLAcer.js - awesome work btw.), that can generate convenient print files for my cheap dlp-prin

Solution 1:

Issue could be fixed (still further testing is needed)

Problem could be solved by saving all data with {binary: true} option and using simple hex to string decoder method:

functionbin2string(array){
var result = "";
for(var i = 0; i < array.length; ++i){
result+= (String.fromCharCode(array[i]));
}
return result;
}

Annoyingly (in my case):

vararray = new Uint8Array(2);
array[1]=255;
(new TextDecoder("utf-8")).decode(array)

Did output: (NUL)(xFD)

But should have output: (NUL)(xFF)

This need to be discussed further more! (see also here)

Post a Comment for "Binary Handling For 3d Printing Js-slicer (slacer.js)"