1
0
Fork 0
mirror of https://github.com/maziggy/bambuddy.git synced 2026-05-09 08:25:54 +02:00

[PR #196] [MERGED] Feature/stl thumbnail #958

Closed
opened 2026-05-07 00:15:11 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/maziggy/bambuddy/pull/196
Author: @MisterBeardy
Created: 1/30/2026
Status: Merged
Merged: 1/30/2026
Merged by: @maziggy

Base: 0.1.6-finalHead: feature/stl_thumbnail


📝 Commits (3)

  • c291e3a feat: Add STL thumbnail generation functionality
  • 7382ee1 Add frontend tests for STL thumbnails, update README and CHANGELOG
  • ed046a0 Merge 0.1.6-final into feature/stl_thumbnail

📊 Changes

11 files changed (+1103 additions, -11 deletions)

View changed files

📝 CHANGELOG.md (+8 -0)
📝 README.md (+2 -1)
📝 backend/app/api/routes/library.py (+129 -0)
📝 backend/app/schemas/library.py (+29 -0)
backend/app/services/stl_thumbnail.py (+140 -0)
📝 backend/tests/integration/test_library_api.py (+236 -0)
backend/tests/unit/services/test_stl_thumbnail.py (+204 -0)
📝 frontend/src/__tests__/pages/FileManagerPage.test.tsx (+196 -0)
📝 frontend/src/api/client.ts (+36 -4)
📝 frontend/src/pages/FileManagerPage.tsx (+118 -6)
📝 requirements.txt (+5 -0)

📄 Description

feat: Add STL thumbnail generation functionality

  • Implemented batch STL thumbnail generation API endpoint.
  • Added Pydantic schemas for batch thumbnail requests and responses.
  • Created service for generating thumbnails from STL files using trimesh and matplotlib.
  • Updated file upload and ZIP extraction endpoints to include thumbnail generation option.
  • Enhanced frontend to support STL thumbnail generation during file uploads and ZIP extractions.
  • Added integration and unit tests for the new thumbnail generation features.
  • Updated requirements to include necessary libraries for STL processing.
  • Thumbnail auto refreshes after generation

Description

Added generation of thumbnails on STL file uploads also those in ZIP files.
Added button to generate thumbnails for pre existing STL files
Updated context menu on individual files for generating thumbnail

Fixes #156

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • Test addition or update

Changes Made

  • Added thumbnail auto generation on either upload or pre existing files

Screenshots

Screenshot 2026-01-29 at 8 57 31 AM Screenshot 2026-01-29 at 8 57 42 AM Screenshot 2026-01-29 at 9 01 25 AM Screenshot 2026-01-30 at 9 48 36 AM

Testing

Uploaded STL file and choose not to generate thumbnail
Upload STL and choose generation of thumbnail
Used ... to manually generate for several STL files
Used the Generate Thumbnails for existing STL files and verified those were created
Upload ZIP file and check generate thumbnail and images were created

  • I have tested this on my local machine
  • I have tested with my printer model:

Checklist

  • My code follows the project's coding style
  • I have commented my code where necessary
  • I have updated the documentation (if needed)
  • My changes generate no new warnings
  • I have tested my changes thoroughly

Additional Notes


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/maziggy/bambuddy/pull/196 **Author:** [@MisterBeardy](https://github.com/MisterBeardy) **Created:** 1/30/2026 **Status:** ✅ Merged **Merged:** 1/30/2026 **Merged by:** [@maziggy](https://github.com/maziggy) **Base:** `0.1.6-final` ← **Head:** `feature/stl_thumbnail` --- ### 📝 Commits (3) - [`c291e3a`](https://github.com/maziggy/bambuddy/commit/c291e3a0a86725327f304902934e43b4b7799ffb) feat: Add STL thumbnail generation functionality - [`7382ee1`](https://github.com/maziggy/bambuddy/commit/7382ee1b20fc9bfd44ac235e3cf5e3b932e7a250) Add frontend tests for STL thumbnails, update README and CHANGELOG - [`ed046a0`](https://github.com/maziggy/bambuddy/commit/ed046a062bc0199a2527139a10b67d1741a66d66) Merge 0.1.6-final into feature/stl_thumbnail ### 📊 Changes **11 files changed** (+1103 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+8 -0) 📝 `README.md` (+2 -1) 📝 `backend/app/api/routes/library.py` (+129 -0) 📝 `backend/app/schemas/library.py` (+29 -0) ➕ `backend/app/services/stl_thumbnail.py` (+140 -0) 📝 `backend/tests/integration/test_library_api.py` (+236 -0) ➕ `backend/tests/unit/services/test_stl_thumbnail.py` (+204 -0) 📝 `frontend/src/__tests__/pages/FileManagerPage.test.tsx` (+196 -0) 📝 `frontend/src/api/client.ts` (+36 -4) 📝 `frontend/src/pages/FileManagerPage.tsx` (+118 -6) 📝 `requirements.txt` (+5 -0) </details> ### 📄 Description feat: Add STL thumbnail generation functionality - Implemented batch STL thumbnail generation API endpoint. - Added Pydantic schemas for batch thumbnail requests and responses. - Created service for generating thumbnails from STL files using trimesh and matplotlib. - Updated file upload and ZIP extraction endpoints to include thumbnail generation option. - Enhanced frontend to support STL thumbnail generation during file uploads and ZIP extractions. - Added integration and unit tests for the new thumbnail generation features. - Updated requirements to include necessary libraries for STL processing. - Thumbnail auto refreshes after generation ## Description Added generation of thumbnails on STL file uploads also those in ZIP files. Added button to generate thumbnails for pre existing STL files Updated context menu on individual files for generating thumbnail ## Related Issue <!-- Link to the issue this PR addresses (if applicable) --> Fixes #156 ## Type of Change <!-- Mark the relevant option with an "x" --> - [ ] Bug fix (non-breaking change that fixes an issue) - [X] New feature (non-breaking change that adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update - [ ] Code refactoring - [ ] Performance improvement - [ ] Test addition or update ## Changes Made - Added thumbnail auto generation on either upload or pre existing files ## Screenshots <img width="1201" height="906" alt="Screenshot 2026-01-29 at 8 57 31 AM" src="https://github.com/user-attachments/assets/969169f1-a182-482c-9227-11d88d80b021" /> <img width="166" height="213" alt="Screenshot 2026-01-29 at 8 57 42 AM" src="https://github.com/user-attachments/assets/cf455697-8f2c-42ac-ac49-703dd6726934" /> <img width="418" height="46" alt="Screenshot 2026-01-29 at 9 01 25 AM" src="https://github.com/user-attachments/assets/3cf242c0-ea84-4fb5-b659-8cd07549ce5f" /> <img width="417" height="537" alt="Screenshot 2026-01-30 at 9 48 36 AM" src="https://github.com/user-attachments/assets/92e8e0e3-e8b7-4138-8adb-51b2597b1081" /> ## Testing Uploaded STL file and choose not to generate thumbnail Upload STL and choose generation of thumbnail Used ... to manually generate for several STL files Used the Generate Thumbnails for existing STL files and verified those were created Upload ZIP file and check generate thumbnail and images were created - [X] I have tested this on my local machine - [ ] I have tested with my printer model: <!-- e.g., X1C, P1S, A1 --> ## Checklist - [X] My code follows the project's coding style - [ ] I have commented my code where necessary - [ ] I have updated the documentation (if needed) - [X] My changes generate no new warnings - [X] I have tested my changes thoroughly ## Additional Notes <!-- Add any additional information that reviewers should know --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-07 00:15:11 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/bambuddy-maziggy-1#958
No description provided.