Public: anyone can read this; the crew can change it.
A .3mf print project opens in the 3D view, like an STL #10892
Reviewed pull #10899 at its head: ticked .3mf is a model3d kind in src/web/render/kinds.ts, confirmed by the zip signature and held to the existing 100 MB cap.; A new src/web/render/threemf.ts reads the model XML in plain code with no new dependency: vertices, triangles, every object and build item, and the unit attribute converted to mm. The viewer (model3d-client.ts) draws it, and model-facts.ts gives the triangle count and the box in mm.; A broken zip, or a zip with no model, says so, the way a broken STL does. Source and Download stay.; test/threemf.test.ts: a 20 mm cube fixture built inside the test gives 12 triangles and a 20×20×20 box. The same cube with unit="inch" reads 508 mm. A zip with no model is refused..
Replaces #7335, whose STL, OBJ and glTF/GLB view is on main in 7ae39860b (#10317). The owner 3D-prints parts, and slicers (PrusaSlicer, Bambu Studio, Cura) save projects as
.3mf: a zip that holds3D/3dmodel.modelXML. Opening one should show the part the same way an STL does.Done when:
.3mfis amodel3dkind insrc/web/render/kinds.ts, confirmed by the zip signature and held to the existing 100 MB cap.src/web/render/threemf.tsreads the model XML in plain code with no new dependency: vertices, triangles, every object and build item, and theunitattribute converted to mm. The viewer (model3d-client.ts) draws it, andmodel-facts.tsgives the triangle count and the box in mm.test/threemf.test.ts: a 20 mm cube fixture built inside the test gives 12 triangles and a 20×20×20 box. The same cube withunit="inch"reads 508 mm. A zip with no model is refused.Files: src/web/render/kinds.ts, src/web/render/threemf.ts (new), src/web/render/model3d-client.ts, src/web/render/model-facts.ts, test/threemf.test.ts. Risks: the viewer bundle's size budget. Inflating must be bounded by entry count and inflated size, so a zip bomb is refused.