Skip to content

Instantly share code, notes, and snippets.

View Hais's full-sized avatar
🥐
Brunchin'

Hais Deakin Hais

🥐
Brunchin'
View GitHub Profile
@epologee
epologee / Binary STL parser.swift
Last active August 17, 2023 14:44
Create SceneKit geometry from Binary STL files in Swift 4
import Foundation
import SceneKit
public enum BinarySTLParser {
public enum STLError: Error {
case fileTooSmall(size: Int)
case unexpectedFileSize(expected: Int, actual: Int)
case triangleCountMismatch(diff: Int)
}