()
| 709 | .replace(/\(/g, '%28') |
| 710 | .replace(/\)/g, '%29') |
| 711 | .replace(/'/g, '%27') |
| 712 | .replace(/\[/g, '%5B') |
| 713 | .replace(/\]/g, '%5D'); |
| 714 | } catch (error) { |
| 715 | console.error('Error encoding file path:', error); |
| 716 | return `file://${filePath.replace(/\\/g, '/').replace(/#/g, '%23').replace(/\s/g, '%20')}`; |
| 717 | } |
| 718 | } |
| 719 | |
| 720 | const MAX_STL_TRIANGLES = 10000000; |
| 721 | |
| 722 | function validateSTLBuffer(buffer) { |
| 723 | if (buffer.byteLength < 84) throw new Error('STL file too small to be valid'); |
| 724 | const dv = new DataView(buffer); |
nothing calls this directly
no outgoing calls
no test coverage detected