问题
How can you export a SceneKit scene as a STL file (for 3D printing)?
The write function from SCNScene
does not appear to support the STL format.
回答1:
you can use SCNScene
's write(to:options:delegate:progressHandler:)
.
While the online documentation only mentions Collada and SceneKit file formats, the header documentation states that:
macOS 10.10 and lower only supports exporting to .dae files.
Starting iOS 10 exporting supports .scn as well as all file formats supported by Model I/O.
Starting macOS 10.11 exporting supports .dae, .scn as well as file all formats supported by Model I/O.
回答2:
The export
function in ModelIO (MDLAsset) appears to support STL, but I've never tried it myself.
MDLAsset:export()
来源:https://stackoverflow.com/questions/39713365/scenekit-export-scene-as-stl-file-for-3d-printing