-
Notifications
You must be signed in to change notification settings - Fork 33
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
3MF exporter #120
3MF exporter #120
Conversation
Getting there with this; it now generates valid 3MF files. Just working on getting the child object traversal and relationships right, because at the moment running the example produces a version of |
OK, the root cause of my problem is in the OBJ loader, rather than the 3MF output, and I've filed it for a rainy day as #123. I'll update the converter example to use a simpler model, and then this should be done, at least for an initial basic form. |
This is also green now, I was missing a gem dependency for |
@danini-the-panini it's just occurred to me that while I'm writing mesh analysis code in https://github.com/manyfold3d/manyfold/pull/1981/files#diff-b33a35020b14550d6b315e9628edd985f88159a26555ab2f4027358e592ebfab, this is actually required to check that meshes are valid for 3MF files before exporting. Would you like me to PR that stuff into the mittsu core? It checks that meshes are manifold, and that they aren't inside out. |
As in, generic manifold checks for all meshes? I'm not sure that's necessary, since inside out meshes are useful in some cases, and are still valid in mittsu |
Yeah, that's what I was thinking, it's probably too specific as those things are totally valid unless you're trying to bring things into the real world. I wonder if that has similar implications for this PR, because it currently could produce invalid 3MF files. |
What with 3mf being non-threejs functionality, that might be another argument that this should be in a separate extension gem, not core. |
No i think it's fine in Core, at least for now |
it's already an indirect dependency because of minitest, so this seemed the neatest thing to use
@Floppy after thinking about this for a bit, I think it would make more sense as a separate gem, especially due to the extra dependency |
OK, cool, I can move it out. 👍 |
I'll probably create couple of addon gems; |
That sounds good 👍🏻 |
Right, I've got a gem nearly done for this at https://github.com/manyfold3d/mittsu-3mf. Just need to get it tested and publish, then I'll close this. I've also created https://github.com/manyfold3d/mittsu-mesh_analysis, which has the manifold checks in it, so that I can use them into the 3mf exporter. This approach works nicely! |
My current need for Mittsu is to be able to convert files into more efficient forms, as a feature for https://manyfold.app. So, I'm working on a 3MF exporter. This is NOT an existing THREE.js feature, so you may want it to be in a separate addon gem - up to you.
It adds two dependencies;
builder
which was already a transitive dependency fromminitest
, andrubyzip
which is completely new. It also usesrexml
in dev for testing the output.THREE.js annoyingly uses
parse
for exporting which makes no sense; I've rename itexport
and madeparse
an alias for consistency with the original.