From 0a99893f776655800755dd61aaea73e970456dee Mon Sep 17 00:00:00 2001 From: ochafik Date: Wed, 25 Dec 2024 12:41:26 +0000 Subject: [PATCH] Preserve filename in output --- src/runner/actions.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/runner/actions.ts b/src/runner/actions.ts index 7e892f3..93f2f2a 100644 --- a/src/runner/actions.ts +++ b/src/runner/actions.ts @@ -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,