fix ply and stl exports (#1141)

* fix ply and stl exports

* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)

* trigger ci

* explanation comment

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Kurt Hutten
2023-11-29 13:24:09 +11:00
committed by GitHub
parent 7c11b7b739
commit 58d1303468
9 changed files with 813 additions and 32 deletions

View File

@ -75,7 +75,11 @@ export const ExportButton = ({ children, className }: ExportButtonProps) => {
},
}
}
if (values.type === 'obj' || values.type === 'stl') {
if (
values.type === 'obj' ||
values.type === 'stl' ||
values.type === 'ply'
) {
values.units = baseUnit
}
if (
@ -86,6 +90,9 @@ export const ExportButton = ({ children, className }: ExportButtonProps) => {
// Set the storage type.
values.storage = storage
}
if (values.type === 'ply' || values.type === 'stl') {
values.selection = { type: 'default_scene' }
}
engineCommandManager.sendSceneCommand({
type: 'modeling_cmd_req',
cmd: {
@ -177,13 +184,13 @@ export const ExportButton = ({ children, className }: ExportButtonProps) => {
<option value="standard">standard</option>
</>
)}
{type === 'ply' && (
{type === 'stl' && (
<>
<option value="ascii">ascii</option>
<option value="binary">binary</option>
</>
)}
{type === 'stl' && (
{type === 'ply' && (
<>
<option value="ascii">ascii</option>
<option value="binary_little_endian">