i run code in https://github.com/mrdoob/three.js/blob/master/examples/webgl_loader_3mf.html,
it works well with
https://raw.githubusercontent.com/mrdoob/three.js/master/examples/models/3mf/cube_gears.3mf
but i try my 3mf file which build by microsoft 3d build,it doesn't work.in console it show me:
Uncaught TypeError: Cannot read property 'triangles' of undefined
at buildMesh (:475:58)
at buildMeshes (:564:27)
at THREE.ThreeMFLoader.parse (:599:16)
at Object.onLoad (:23:18)
at XMLHttpRequest.(three.min.js?v=cockg0o1gkc:644)
my 3mf file is here,
i want to show this but,i don't know how to fix this problem
I don't have any experience with 3MF but you may have better luck with 3D Builder's OBJ export. STL and PLY are also supported by three.js.
/ping @technohippy
@donmccurdy I don't have experience with .3mf too.I want show people 3d module which build by Microsoft 3d paint. Now I change to babylon.js show .glb file.
Now I change to babylon.js show .glb file.
Do you mean you've switched your project to BabylonJS and used a .glb export instead? Just FYI you can also load .glb in three.js using THREE.GLTFLoader. I just tested an export from Paint 3D here.
I did not know .glb file is gltf format before, so I searched the relevant tutorials, found BabylonJS can help me. When I finished some of the projects I discovered that .glb is actually a gltf file.
I found same problem about load 3mf file by three.js.
https://github.com/technohippy/3MFLoader/issues/1
but it no answer.
experiencing error with materials and colors:
Cannot read property 'triangles' of undefined
@kpetrow if you can share the file, that will allow someone to help debug this. Note that you can drag .ZIP files into GitHub comments.
Thanks, I will fix this bug hopefully this weekend.
Thank you. Now that windows has 3d builder, being able to use their preferred format is very helpful. Windows 3d builder obj/mat is very buggy. Thank you
@technohippy any progress? Thanks for the help
@mrdoob @WestLangley There are a whole bunch of errors in the 3MF parser. Maybe a warning with "beta" or something in the example would be helpful? Big issues are handling materials(they are a child node of resources and the loader doesnt check for child type it just parses children as if all are objects) and empty objects that are children of resources.
any news on this?
edit: reason I ask is this format is becoming very popular in the 3D Printing industry. It's common for users to repair stl files in Microsoft's 3D builder, or their online Azure service. That service converts STL files to 3MF after repair. 3MF offers many advantages over STL.