From 1d4911c153969b9bbaaf41f4014bdc5cb64e7439 Mon Sep 17 00:00:00 2001 From: Kyle Davis Date: Sun, 2 Jul 2023 12:22:11 -0600 Subject: [PATCH 1/2] download filename is based on scad filename --- src/components/Footer.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/Footer.tsx b/src/components/Footer.tsx index 020a732..6e06126 100644 --- a/src/components/Footer.tsx +++ b/src/components/Footer.tsx @@ -15,8 +15,9 @@ import { confirmDialog } from 'primereact/confirmdialog'; function downloadOutput(state: State) { if (!state.output) return; - - const fileName = state.output!.isPreview ? 'preview.stl' : 'render.stl'; + const sourcePathParts = state.params.sourcePath.split('/'); + const sourceFileName = sourcePathParts.slice(-1)[0]; + const fileName = [sourceFileName, state.output!.isPreview ? 'preview.stl' : 'render.stl'].join('.'); const doDownload = () => { const a = document.createElement('a') a.href = state.output!.stlFileURL From 6168db816e6710c960d0e0a5621dccf80d34d5ef Mon Sep 17 00:00:00 2001 From: Kyle Davis Date: Sun, 2 Jul 2023 12:24:32 -0600 Subject: [PATCH 2/2] removes item from roadmap on README --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index be2b125..0b77fca 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,6 @@ Licenses: see [LICENSES](./LICENSE). - Rebuild w/ (and sync) ochafik@'s filtered kernel (https://github.com/openscad/openscad/pull/4160) to fix(ish) 2D operations - Replace Makefile w/ something that reads the libs metadata - Proper Preview rendering: have OpenSCAD export the preview scene to a rich format (e.g. glTF, with some parts being translucent when prefixed w/ % modifier) and display it using https://modelviewer.dev/ maybe) -- Better names for downloads (matching source) - Model /home fs in shared state. have two clear paths: /libraries for builtins, and /home for user data. State pointing to /libraries paths needs not store the data except if there's overrides (flagged as modifications in the file picker) - Drag and drop of files (SCAD, STL, etc) and Zip archives. For assets, auto insert the corresponding import. - Fuller PWA support w/ link Sharing, File opening / association to *.scad files...