Skip to content

Conversation

@phreakocious
Copy link

Refactors the export logic to map THREE.Group objects to 3MF component assemblies.

  • Previously, exports were often treated as a single object or split strictly by mesh, making it difficult to manipulate complex multi-mesh items as single units in a slicer.
  • Each top-level group is now exported as a distinct build item, and its children are grouped logically using 3MF components.
  • This allows slicers to recognize complex assemblies as single manipulatable objects on the plate while preserving their distinct geometry.
  • This is a non-breaking change that significantly improves compatibility with slicer workflows.
  • Includes general code quality improvements and internal refactoring.

…cing

Refactors the export logic to map `THREE.Group` objects to 3MF component assemblies.

- Previously, exports were often treated as a single object or split strictly by mesh, making it difficult to manipulate complex multi-mesh items as single units in a slicer.
- Each top-level group is now exported as a distinct build item, and its children are grouped logically using 3MF components.
- This allows slicers to recognize complex assemblies as single manipulatable objects on the plate while preserving their distinct geometry.
- This is a non-breaking change that significantly improves compatibility with slicer workflows.
- Includes general code quality improvements and internal refactoring.
@netlify
Copy link

netlify bot commented Dec 17, 2025

Deploy Preview for bekuto3d ready!

Name Link
🔨 Latest commit 5c036f4
🔍 Latest deploy log https://app.netlify.com/projects/bekuto3d/deploys/6944226b344e9c000817d4f3
😎 Deploy Preview https://deploy-preview-13--bekuto3d.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

- Replaces coordinate baking with native 3MF component transforms, preserving original geometry and improving modularity.
- Implements recursive transform accumulation to correctly position sub-components in deep hierarchies.
- Updates export logic to treat direct children of THREE.Scene as separate top-level objects while preserving THREE.Group objects as unified assemblies.
- Fixes layout issues where nested groups were previously stacked at the origin.
- Adds initial test suite for mesh, group, and scene export combinations.
@phreakocious
Copy link
Author

phreakocious commented Dec 18, 2025

Newly added tests passing:

  ✓ packages/three-3mf-exporter/test/exporter.test.ts (6 tests) 38ms
   ✓ three-3mf-exporter > should export a single Mesh as a single object
   ✓ three-3mf-exporter > should export a Group as an assembly with sub-components
   ✓ three-3mf-exporter > should export nested groups as nested assemblies
   ✓ three-3mf-exporter > should export a Scene with a single mesh as a single top-level object
   ✓ three-3mf-exporter > should export a Scene with a single group as a single top-level assembly
   ✓ three-3mf-exporter > should export a Scene with mixed content correctly (multiple meshes and groups)

 Test Files  1 passed (1)
      Tests  6 passed (6)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant