Skip to content
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

Add support for 3mf files #95

Merged
merged 5 commits into from
Sep 18, 2024
Merged

Conversation

gyscos
Copy link
Contributor

@gyscos gyscos commented Sep 12, 2024

This PR adds basic support for 3mf file using the threemf crate.

It merges all models in the 3mf file, and recalculates normals.
It does not attempt to reuse vertices from different triangles.

@gyscos
Copy link
Contributor Author

gyscos commented Sep 12, 2024

Fixes #48

@gyscos
Copy link
Contributor Author

gyscos commented Sep 12, 2024

Note that threemf has a compatibility issue with some 3mf files, in particular the ones exported by onshape.
We may want to wait until hannobraun/3mf-rs#54 is merged, as it'll be a breaking change.

@unlimitedbacon
Copy link
Owner

This is fantastic! Yes, lets wait a bit and see if that change to threemf gets merged.

@gyscos
Copy link
Contributor Author

gyscos commented Sep 13, 2024

I added a commit to adjust for the upcoming breaking change in threemf - currently tracking the git repo. Once they release 0.6.0 (maybe next week) we can update this PR to use that.

Added a new test and cube.3mf test data as well.

@gyscos
Copy link
Contributor Author

gyscos commented Sep 18, 2024

threemf has now released 0.6.0 with the required fix, and I updated this PR to use this new version. Everything should be ready to merge.

Note: it may make sense to rebase #92 after this PR and merge it if possible, as it will certainly help to keep the codebase up to date.

@unlimitedbacon unlimitedbacon merged commit c188578 into unlimitedbacon:master Sep 18, 2024
1 of 3 checks passed
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.

2 participants