-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement 3MF export for multi-color 3D printing of maps #3616
Conversation
When zooming really close one could see that there were small gaps in z direction between some floors. This was problematic for 3D Printing.
It looks like the sonar token is no available or set correctly in forks. Any idea how to resolve this? Maybe you can reopen this as a PR directly in the repository? @olexs |
Ideally we should reconfigure the workflow, so that Sonar is not ran for PRs from forks - as you say, the token is not available in forks, since it's a (secret) project variable that could otherwise be leaked to a modified workflow in a fork. If we want Sonar to run on all PRs, I could re-make this as a branch from the main repo, since I have contributor access. |
But if sonar is not active on forks, we can't really merge them, because the code quality can not be verified?
I would appreciate it, because it is the easiest/fastest way to get this awesome feature on main 🚀 |
It appears I do not have write permissions to the main repo after all, so I can't push the branch directly, only via my fork right now. How do we best go about this? |
I could add you as a maintainer or similar to the repository, then you could open a branch and PR with all those changes, and we can review and merge it. |
Yes, if it's ok please add me. I have already figured out the branch stuff, just need the permission to push. Thanks! |
I added you with 'Write', ping me if it is not enough. |
Thanks, looks like it worked. I'm closing this, new PR is #3630. |
…3616) (#3630) * Prototype: multi-color STL export feature * Multi-color export: group all greys into one (to keep the baseplate a single part) * Multi-color export: use openSCAD instead of multi-STL * Add 3MF export * Add baseplate * Add MW logo * Add multi colors to map * Objects are object parts * WIP * fix: different colors * fix: open edges * chore: move serialize3mf to service file * refactor: serializeGeometries method * feat: Add baseplate * feat: Add fronttext * feat: Add MW Logo * feat: Add print preview * fix: Open edges * fix: model file * feat: Check if ColorMode is absolute * feat: Add size slider * fix: Display correct size * feat: Add textfield to change frontText * feat: Serializer takes mesh position into account * feat: Add custom logo upload * fix: Logo and text have correct height * feat: Serializer ignores invisible meshs * feat: Consider scale attribute when serializing * feat: Add metrics back print * feat: The current Size is calculated only on map and baseplate, so e.g. overlapping text doesn't brake this calculation * feat: Add codeChartaLogo to back * feat: Add MW logo to back * feat: Rearrange back print * feat: Add option to directly change color mode to absolute * refactor: Separate extraction and string building * feat: Add values to metric text * feat: Add possibility to serialize child meshes * fix: Map not serialized correctly * feat: Colored text on back print * refactor: Make preview3DPrintMeshBuilder.ts a class so the font only needs to load once * fix: Not serializing baseplate * fix: Children not transformed correctly when serialized * feat: Add dropdown to select printer * feat: Change metadata of 3mf so it can be opened in BambuStudio * feat: Change metadata of 3mf so it can be opened in BambuStudio * refactor: geometryOptions is an attribute now * fix: reduce z-fighting of baseplate and back print * feat: add border around EVERY colorPicker to also be visible if color white is selected * feat: add color picker for custom logo * feat: custom logo options only visible if a file is chosen * feat: Shader material can be serialized * feat: default Shader material is applied to baseplate * fix: center metrics mesh * fix: svg text not loading correctly * fix: front text not changing * feat: colors change according to numberOfColors of selected printer * feat: backprint fits to selected printer size * fix: max map size calculation * refactor: use functions for color calculation * refactor: preview3DPrintMesh has printMesh now instead of the dialog * fix: moving of preview Mesh * feat: back print is invisible if there is only one color * refactor: geometryOptions is a parameter instead of an attribute * refactor: previewMesh has parts as attributes * fix: only listen to first color Mode change * test: add test for 3DMapButton * refactor: printer * refactor: remove store from 3DMapDialog * test: add first test for 3DMapDialog * refactor: createScene method for better testing * test: add first printMesh test * feat: download stl exports the previewMeshMap * fix: error in prusa slicer * fix: snap Map size to fit layer height * fix: back text visible for too long * feat: add ITS text * refactor: rename some methods * feat: make XL plate smaller for prime tower * fix: floating floors When zooming really close one could see that there were small gaps in z direction between some floors. This was problematic for 3D Printing. * Run prettier on export3DMapButton.module.ts * Clean up 3D print export dialog * Fix test expectation * Add changelog entry * Fix another test expectation * Add dependency back in * Apply prettier code formatting * Refactor xml function names * Extract static xml methods to reduce complexity in main service * Add " Clean up 3D print export dialog more" from @BenediktMehl * Add "Add remove logo button" from @BenediktMehl * #3mf Add unit test for updating number of colors in 3D print dialog on printer change * Add xml test to static resources * Add test to xml static model * Add export and test to color converter * (WIP) Add qrCode * Add scrollbar to dialog and second row previewMesh * Rename CustomVisibilityMesh to ManualVisibilityMesh * Move 3D preview related files to own folder * Fix position of front logos * WIP Create own Class for Baseplatemesh * WIP more refactoring for new design pattern * Fix failing printer change test * Add data types to service * Format with prettier * Add exceptions to file for eslint parsing so tests can run WIP * WIP Move MeshModel to own folder * WIP Fix backMWLogoMesh not changing size * WIP Add translate sizeChangeStrategy * WIP Add own class for itsTextMesh * WIP Add own class for QRCodeMesh * WIP Add own classes for CodeChartaMeshs * WIP Fix QRCode position * WIP Add own class for secondRowText * Fix secondRowText not showing * Fix dialog height for bigger screens * WIP Fix qrCodeMesh import * WIP Add own class for metricDescriptionsMesh * WIP Add colorChangeStrategies * Fix tests and clean code * Add own class for fronTextMesh * Add super class textMesh * Rename CreateFrontText to CreateText * Add own class for backMWLogoMesh * Add own class for customLogoMesh * Add own class for mapMesh * Refactor mesh names * WIP Clean up preview3DPrintMesh * WIP Add frontLogo class * Make pipeline green * Add constructVolume test * add unit tests for scaling slider and front text input changes * add unit tests for second row, qr-code and logo * Add test to constructTriangles * Add partial test for constructVertices WIP * Add parallel changeSize execution * Fix x side offset for front Logos * Add own class for metricDescriptionBlockMesh * Fix vertex position calculation and only calculate meshes with geometries * Add containers for front and back * Remove sizeChangeStrategies * Remove backTextSize from geometryOptions and make back print relative * Fix visibility because of size * Move visibility to colorChangeStrategy * Fix custom logo position and size * Move meshModels in Front and Back folders * Fix map scaling and floating areas * Fix QrCode position and scaling * Remove unused layerHeight parameter * Fix metric description not serialized * bug fix frontMesh for frontText and secondRowText * Add tests to groupMeshByColo and constructVertices * Add tests that verify recursion and appension of data structures * Reformat testData to reduce line bloat * Add test for extraData, grouped tree walking parts * Add test for complete service call with fake data * fix failed unit tests for 3d print dialog * Remove async declaration from changeSize * Set correct minSize for QRCodes * update unit test for frontText input changes * update unit test for second row input und visibility changes * update unit test for qrCode input und visibility changes * update unit test for logo, download 3mf and stl * WIP second test * WIP change html syntax, add getGL wrapper * fix font import and mock SVGs in test * chore: Add unit tests for color change strategies * chore: Run formatting * chore: Run lintin * chore: remove old test * Add template for integration test of the dialog * fix: fix dead condition in color change strategies * add unit tests für qrCodeMesh * add test for geometries for non-transparent QR code pixels * remove test for geometries for non-transparent QR code pixels * chore: add more tests for geometry strategy * chore: Refactor SVG parsing in createSvgGeometryStrategy.spec.ts * add tests for backPrintContainerMesh * add tests for backPrintContainerMesh * add tests for the frontText and SecondRow * test: Add CodeChartaLogoMesh and CodeChartaTextMesh tests * feat: Add BackBelowLogoTextMesh test * test: Add BackMWLogoMesh test * add tests for customlLogoMesh * add tests for frontLogo * test: Add MetricDescriptionsContainerMesh tests * test: Add MetricDescriptionBlockMesh tests * test: add preview 3d print mesh test * test: add baseplate mesh test * test: add textMesh test * test: Add customVisibilityMesh tests * test: Add GeneralMesh tests * test: Refactor MapMesh initialization and add tests * test: add tests for frontMWLogoMesh * test: Add FrontTextMesh and SecondRowTextMesh tests * test: add frontMWLogoMesh tests * test: add ColorMetricDescriptionBlockMesh tests * chore: Update export3DMapDialog.component.scss styles * Add additional setup to dialogTest to init all tests (WIP) * Add test to printer selector * chore: Update 3D map export dialog component tests * chore: Update 3D map export dialog component tests --------- Co-authored-by: Olexandr Savchuk <[email protected]> Co-authored-by: Benedikt Mehl <[email protected]> Co-authored-by: Phanlezz <[email protected]> Co-authored-by: VictoriaG <[email protected]> Co-authored-by: IhsenBouallegue <[email protected]> Co-authored-by: Ihsen Bouallegue <[email protected]>
Implement 3MF export for multi-color 3D printing of maps
Description
This PR implements a 3MF export in addition to the already existing STL export. This allows to print CodeCharta maps on multi-material printers like the BambuLabs machines or the Prusa XL in multiple colors.
Additionally, the printed map now includes a MW logo, a custom text line, an optional project logo, and a reverse side with a legend of included metrics and their values.
Definition of Done
A PR is only ready for merge once all the following acceptance criteria are fulfilled:
Screenshots