Skip to content

Commit

Permalink
fix issue with 3mf export
Browse files Browse the repository at this point in the history
  • Loading branch information
hrgdavor committed Jun 29, 2024
1 parent d95fa09 commit 49991b6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions apps/jscad-web/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,15 @@ const exportModel = async (format, extension) => {
return
}

const { data } = (await workerApi.jscadExportData({ format })) || {}
let { data } = (await workerApi.jscadExportData({ format })) || {}
if (data) {
save(new Blob([data], { type: 'text/plain' }), `${projectName}.${extension}`)
if(!(data instanceof Array)) data = [data]
console.log('save', `${projectName}.${extension}`, data)
let type = 'text/plain'
if(format == '3mf') type = 'application/zip'

// save(data, `${projectName}.${extension}`)
save(new Blob(data, { type }), `${projectName}.${extension}`)
}
}

Expand Down

0 comments on commit 49991b6

Please sign in to comment.