jsstl icon indicating copy to clipboard operation
jsstl copied to clipboard

Gives RangeError when using different STL file

Open lponniah opened this issue 9 years ago • 3 comments

Hi,

I tried this code to display a different STL file like gato_3.stl. But it gives the below error

ArrayBuffer { byteLength: 519716 } RangeError: argument 1 accesses an index that is out of range

Could you kindly help resolve this?

Thanks

lponniah avatar Apr 12 '15 17:04 lponniah

I ran into the same problem, however if you look at the code and the samples. it only parses binary stl format, it gives me an error also when i use ascii stl

jdpsl avatar Sep 18 '15 16:09 jdpsl

parseStlBinary = function(stl) {

on line 40

jdpsl avatar Sep 18 '15 16:09 jdpsl

I got openscad ascii models to render.

Add geo.computeFaceNormals(); in the parsestl function above mesh = new THREE.Mesh( Below console.log(rep);, Change parseStlBinary(rep); to parseStl(rep); Set xhr.responseType = "string"; (instead of arraybuffer) Uncomment the xhr.setRequestHeader lines to include text content type stuff

5ilver avatar Mar 08 '16 21:03 5ilver