nicklockwood / Euclid

A Swift library for creating and manipulating 3D geometry
MIT License
644 stars 53 forks source link

How can I convert my own obj/stl file to Mesh #103

Closed jinxin1203 closed 1 year ago

jinxin1203 commented 1 year ago

How can I convert my own obj file to Mesh

nicklockwood commented 1 year ago

If you're using macOS or iOS you can use:

let url = URL(fileURLWithPath: "path/to/mymesh.obj")
let mesh = try Mesh(url: URL, ignoringTransforms: false)