Preserve filename in output

This commit is contained in:
ochafik 2024-12-25 12:41:26 +00:00 committed by Olivier Chafik
commit 0a99893f77

View file

@ -126,7 +126,8 @@ export const render =
const content = [...prefixLines, source.content].join('\n');
const actualRenderFormat = renderFormat == 'glb' || renderFormat == '3mf' ? 'off' : renderFormat;
const outFile = 'out.' + actualRenderFormat;
const stem = scadPath.replace(/\.scad$/, '').split('/').pop();
const outFile = `${stem}.${actualRenderFormat}`;
const args = [
scadPath,
"-o", outFile,