diff --git a/Sources/Mesh+STL.swift b/Sources/Mesh+STL.swift index d68c9d9f..3efc290d 100644 --- a/Sources/Mesh+STL.swift +++ b/Sources/Mesh+STL.swift @@ -25,7 +25,7 @@ private extension Polygon { facet normal \(plane.normal.stlString) \touter loop \(vertices.map { - "\t\t\($0.position.stlString)" + "\t\tvertex \($0.position.stlString)" }.joined(separator: "\n")) \tendloop endfacet diff --git a/Tests/MeshTests.swift b/Tests/MeshTests.swift index d09dea9b..63b9ae88 100644 --- a/Tests/MeshTests.swift +++ b/Tests/MeshTests.swift @@ -338,86 +338,86 @@ class MeshTests: XCTestCase { solid Foo facet normal 1 0 0 \touter loop - \t\t1 0 1 - \t\t1 0 0 - \t\t1 1 0 + \t\tvertex 1 0 1 + \t\tvertex 1 0 0 + \t\tvertex 1 1 0 \tendloop endfacet facet normal 1 0 0 \touter loop - \t\t1 0 1 - \t\t1 1 0 - \t\t1 1 1 + \t\tvertex 1 0 1 + \t\tvertex 1 1 0 + \t\tvertex 1 1 1 \tendloop endfacet facet normal -1 0 0 \touter loop - \t\t0 0 0 - \t\t0 0 1 - \t\t0 1 1 + \t\tvertex 0 0 0 + \t\tvertex 0 0 1 + \t\tvertex 0 1 1 \tendloop endfacet facet normal -1 0 0 \touter loop - \t\t0 0 0 - \t\t0 1 1 - \t\t0 1 0 + \t\tvertex 0 0 0 + \t\tvertex 0 1 1 + \t\tvertex 0 1 0 \tendloop endfacet facet normal 0 1 0 \touter loop - \t\t0 1 1 - \t\t1 1 1 - \t\t1 1 0 + \t\tvertex 0 1 1 + \t\tvertex 1 1 1 + \t\tvertex 1 1 0 \tendloop endfacet facet normal 0 1 0 \touter loop - \t\t0 1 1 - \t\t1 1 0 - \t\t0 1 0 + \t\tvertex 0 1 1 + \t\tvertex 1 1 0 + \t\tvertex 0 1 0 \tendloop endfacet facet normal 0 -1 0 \touter loop - \t\t0 0 0 - \t\t1 0 0 - \t\t1 0 1 + \t\tvertex 0 0 0 + \t\tvertex 1 0 0 + \t\tvertex 1 0 1 \tendloop endfacet facet normal 0 -1 0 \touter loop - \t\t0 0 0 - \t\t1 0 1 - \t\t0 0 1 + \t\tvertex 0 0 0 + \t\tvertex 1 0 1 + \t\tvertex 0 0 1 \tendloop endfacet facet normal 0 0 1 \touter loop - \t\t0 0 1 - \t\t1 0 1 - \t\t1 1 1 + \t\tvertex 0 0 1 + \t\tvertex 1 0 1 + \t\tvertex 1 1 1 \tendloop endfacet facet normal 0 0 1 \touter loop - \t\t0 0 1 - \t\t1 1 1 - \t\t0 1 1 + \t\tvertex 0 0 1 + \t\tvertex 1 1 1 + \t\tvertex 0 1 1 \tendloop endfacet facet normal 0 0 -1 \touter loop - \t\t1 0 0 - \t\t0 0 0 - \t\t0 1 0 + \t\tvertex 1 0 0 + \t\tvertex 0 0 0 + \t\tvertex 0 1 0 \tendloop endfacet facet normal 0 0 -1 \touter loop - \t\t1 0 0 - \t\t0 1 0 - \t\t1 1 0 + \t\tvertex 1 0 0 + \t\tvertex 0 1 0 + \t\tvertex 1 1 0 \tendloop endfacet endsolid Foo