Commit 9aed562990

9aed56299060625aa25f3438d99049a69d0ef306

parent: e03e518464

Verified · cmc

cmc <hello@cleberg.net> · 2026-10-22 20:44 UTC

Open reverse folds to 20° from flat by default

Ref #7

Layout: unified · split

Packages/FoldKit/Sources/FoldCompiler/FoldScript.swift +2 −1
@@ -28,7 +28,8 @@ public struct FoldScript: Codable, Sendable {
2828/// - `viewpoint`: defaults to the previous step's, or eye `[0, 0, 1]`, up `[0, 1, 0]` for step 1.
2929/// - `driver`: the crease held linear when the step's creases close a loop; defaults to the first.
3030/// - `faceOrders`, `faceOrdersMidFold`: corrections to the guessed layer order.
31/// - `spine`, `openAngle`: a reverse fold or sink, compiled by the non-rigid path.
31/// - `spine`, `openAngle`: a reverse fold or sink, compiled by the non-rigid path. `openAngle`
32/// defaults to 20.
3233public struct ScriptStep: Codable, Sendable {
3334 public let kind: StepKind
3435 public let technique: StepTechnique?
Packages/FoldKit/Sources/FoldCompiler/PopCompiler.swift +3 −2
@@ -2,8 +2,9 @@ import FoldFormat
22import Folding
33import simd
44
5/// The spine's fold angle when the flap is open, in degrees from flat, when the script gives none.
6private let defaultOpenAngle = 30.0
5/// The spine's fold angle when the flap is open, in degrees from flat, when the script gives none
6/// (decision 0003).
7private let defaultOpenAngle = 20.0
78/// The boundaries of the pop on the step's t (decision 0002).
89private let phases = [1.0 / 3, 2.0 / 3]
910/// The largest relative change in a render-mesh edge's length the pop may reach (decision 0002).
Packages/FoldKit/Tests/FoldCompilerTests/NonRigidTests.swift +1 −1
@@ -10,7 +10,7 @@ import FoldKitTestSupport
1010 let out = try compiled("reverse")
1111 let step = try #require(out.frames[2].step)
1212 #expect(step.nonRigid)
13 #expect(step.pop?.openAngle == 30)
13 #expect(step.pop?.openAngle == 20)
1414 #expect(step.technique == .insideReverse)
1515}
1616