{"openapi":"3.1.0","info":{"title":"IOPO Paper Handle API","version":"1.0.0","description":"Compose a handwritten manuscript and replay handling operations on an independent sheet of paper. Submit the full ordered recipe on each request."},"externalDocs":{"description":"Paper Handle quickstart","url":"/paper-api.txt"},"servers":[{"url":"/"}],"paths":{"/api/paper/v1/capabilities":{"get":{"operationId":"getPaperHandleCapabilities","summary":"Paper Handle capabilities","responses":{"200":{"description":"Paper Handle capabilities","content":{"application/json":{"schema":{"type":"object","required":["apiVersion","materials","coordinates","limits","operations","links","writingFonts"],"properties":{"apiVersion":{"type":"integer","const":1},"materials":{"type":"array","items":{"type":"object"}},"coordinates":{"type":"object"},"limits":{"type":"object"},"operations":{"type":"array","items":{"type":"object"}},"writingFonts":{"type":"array","items":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"links":{"type":"object","additionalProperties":{"type":"string"}}}}}}}}},"head":{"operationId":"getPaperHandleCapabilitiesHeaders","summary":"Read headers for paper handle capabilities","responses":{"200":{"description":"The resource is available."}}}},"/api/paper/v1/openapi.json":{"get":{"operationId":"getPaperHandleOpenApi","summary":"Paper Handle OpenAPI document","responses":{"200":{"description":"Paper Handle OpenAPI document","content":{"application/json":{"schema":{"type":"object"}}}}}},"head":{"operationId":"getPaperHandleOpenApiHeaders","summary":"Read headers for paper handle openapi document","responses":{"200":{"description":"The resource is available."}}}},"/api/paper/v1/handle":{"post":{"operationId":"applyPaperHandles","summary":"Replay Paper Handle operations","description":"Applies operations in order to a fresh sheet and returns its pieces, pose, per-operation results, and manuscript when the recipe includes a write. The service stores no sheet data.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandleInput"},"example":{"operations":[{"type":"write","text":"Dear friend,\n\nA note from the writing desk."},{"type":"fold","from":[0,0.65],"to":[1,0.65],"side":1,"angle":0.75}]}}}},"responses":{"200":{"description":"Paper handling result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandleOutput"}}}},"400":{"description":"Malformed JSON or invalid API input.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandleError"}}}},"413":{"description":"The JSON request exceeds 64 KiB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandleError"}}}},"415":{"description":"The request must use application/json.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandleError"}}}},"422":{"description":"The operation could not be applied to the current sheet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandleError"}}}},"500":{"description":"The service could not complete the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandleError"}}}}}}}},"components":{"schemas":{"HandleInput":{"type":"object","properties":{"material":{"type":"string","const":"md-cotton","default":"md-cotton"},"operations":{"type":"array","maxItems":32,"items":{"$ref":"#/components/schemas/HandleOperation"}}},"required":["operations"],"additionalProperties":false},"HandleOperation":{"oneOf":[{"$ref":"#/components/schemas/HandleWriteOperation"},{"$ref":"#/components/schemas/HandleOrigamiOperation"},{"$ref":"#/components/schemas/HandleFoldOperation"},{"$ref":"#/components/schemas/HandleCreaseOperation"},{"$ref":"#/components/schemas/HandleTearOperation"},{"$ref":"#/components/schemas/HandleMoveOperation"},{"$ref":"#/components/schemas/HandleUnfoldOperation"},{"$ref":"#/components/schemas/HandleAdjustFoldOperation"},{"$ref":"#/components/schemas/HandleSwapFoldOperation"},{"$ref":"#/components/schemas/HandleCrumpleOperation"},{"$ref":"#/components/schemas/HandleAdjustGatherOperation"},{"$ref":"#/components/schemas/HandleReleaseOperation"},{"$ref":"#/components/schemas/HandleFlattenOperation"},{"$ref":"#/components/schemas/HandleWholeCrumpleOperation"},{"$ref":"#/components/schemas/HandleRotateOperation"},{"$ref":"#/components/schemas/HandleTurnOperation"},{"$ref":"#/components/schemas/HandleLiftOperation"},{"$ref":"#/components/schemas/HandleBendOperation"}]},"HandleWriteOperation":{"type":"object","properties":{"type":{"type":"string","const":"write"},"piece":{"type":"string","const":"sheet","default":"sheet"},"title":{"type":"string","maxLength":200,"default":"Untitled letter","description":"Manuscript title."},"text":{"type":"string","maxLength":4000,"description":"Plain manuscript text. An empty value clears the ink."},"fontId":{"type":"string","enum":["script","palmer","austen","lincoln","elizabeth-i","whitman","elizabeth-ii","courier","times","et-bembo","arial"],"description":"Built-in handwritten or typeset font.","default":"script"},"ink":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$","default":"#302d29","description":"Ink color as #RRGGBB."},"colorRuns":{"type":"array","maxItems":4000,"description":"Ink overrides in ascending, nonoverlapping ranges of the manuscript. Boundaries must fall between graphemes.","items":{"type":"object","properties":{"start":{"type":"integer","minimum":0,"maximum":8000,"description":"Inclusive UTF-16 offset into text."},"end":{"type":"integer","minimum":0,"maximum":8000,"description":"Exclusive UTF-16 offset into text."},"color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"}},"required":["start","end","color"],"additionalProperties":false}},"inkOpacity":{"type":"number","minimum":0.1,"maximum":1,"description":"Ink opacity.","default":1},"fontSize":{"type":"number","minimum":18,"maximum":52,"description":"Size on the 700 px letter layout. Defaults to 32 for handwriting and 20 for typesetting."},"lineSpacing":{"type":"number","minimum":1.1,"maximum":2,"description":"Line spacing as a multiple of font size. Defaults to 1.45 for handwriting and 1.25 for typesetting."},"align":{"type":"string","enum":["left","center","right"],"description":"Line alignment.","default":"left"},"page":{"type":"integer","minimum":0,"maximum":31,"description":"Zero-based page of the manuscript to place on the source sheet.","default":0}},"required":["type","text"],"additionalProperties":false,"title":"write","description":"Replace the manuscript on the original front of the source sheet. Ink follows that material through handling."},"HandleOrigamiOperation":{"type":"object","properties":{"type":{"type":"string","const":"origami"},"piece":{"type":"string","pattern":"^(sheet|piece-[1-9][0-9]{0,3})$","description":"Piece ID returned by a previous operation.","default":"sheet"},"model":{"type":"string","enum":["fortune-teller","crane","boat"],"description":"Coordinated origami pattern."},"progress":{"type":"number","minimum":0,"maximum":1,"description":"Progress through the complete fold sequence, starting from prepared flat stock."},"pinch":{"type":"number","minimum":-1,"maximum":1,"description":"Fortune teller pocket squeeze. Opposite signs exchange the open and closed pair."}},"required":["type","model","progress"],"additionalProperties":false,"title":"origami","description":"Prepare fresh A5 stock and follow a coordinated fold pattern. Replay the same model to change its progress."},"HandleFoldOperation":{"type":"object","properties":{"type":{"type":"string","const":"fold"},"piece":{"type":"string","pattern":"^(sheet|piece-[1-9][0-9]{0,3})$","description":"Piece ID returned by a previous operation.","default":"sheet"},"from":{"type":"array","minItems":2,"maxItems":2,"items":{"type":"number","minimum":0,"maximum":1,"description":"Normalized coordinate."},"description":"Material coordinate [u, v] on the original sheet."},"to":{"type":"array","minItems":2,"maxItems":2,"items":{"type":"number","minimum":0,"maximum":1,"description":"Normalized coordinate."},"description":"Material coordinate [u, v] on the original sheet."},"anchor":{"type":"array","minItems":2,"maxItems":2,"items":{"type":"number","minimum":0,"maximum":1,"description":"Normalized coordinate."},"description":"Point on the hinge and selected piece. Defaults to its midpoint."},"side":{"type":"integer","enum":[-1,1],"description":"Select the side of the directed line in material coordinates."},"angle":{"type":"number","minimum":0,"maximum":1,"description":"Fold angle as a fraction of 180 degrees."},"pressure":{"type":"number","minimum":0,"maximum":1,"description":"Pressure applied to set the paper.","default":0.8},"back":{"type":"boolean","default":false,"description":"Apply the operation from the reverse material face."},"layer":{"type":"string","enum":["packet","flap"],"description":"Fold all layers along the hinge, or turn a freely hinged material flap independently.","default":"packet"}},"required":["type","from","to","side","angle"],"additionalProperties":false,"title":"fold","description":"Place and turn a straight hinge."},"HandleCreaseOperation":{"type":"object","properties":{"type":{"type":"string","const":"crease"},"piece":{"type":"string","pattern":"^(sheet|piece-[1-9][0-9]{0,3})$","description":"Piece ID returned by a previous operation.","default":"sheet"},"path":{"type":"array","minItems":2,"maxItems":48,"items":{"type":"array","minItems":2,"maxItems":2,"items":{"type":"number","minimum":0,"maximum":1,"description":"Normalized coordinate."},"description":"Material coordinate [u, v] on the original sheet."},"description":"Sampled material-coordinate score."},"depth":{"type":"number","minimum":0,"maximum":1,"description":"Scoring depth."},"pressure":{"type":"number","minimum":0,"maximum":1,"description":"Pressure applied to set the paper.","default":0.8},"side":{"type":"integer","enum":[-1,1],"description":"Select the side of the directed line in material coordinates.","default":1},"back":{"type":"boolean","default":false,"description":"Apply the operation from the reverse material face."}},"required":["type","path","depth"],"additionalProperties":false,"title":"crease","description":"Press a straight or freehand score into the paper."},"HandleTearOperation":{"type":"object","properties":{"type":{"type":"string","const":"tear"},"piece":{"type":"string","pattern":"^(sheet|piece-[1-9][0-9]{0,3})$","description":"Piece ID returned by a previous operation.","default":"sheet"},"path":{"type":"array","minItems":2,"maxItems":24,"items":{"type":"array","minItems":2,"maxItems":2,"items":{"type":"number","minimum":0,"maximum":1,"description":"Normalized coordinate."},"description":"Material coordinate [u, v] on the original sheet."},"description":"Sampled material-coordinate tear. Stops when it leaves the selected piece or closes a loop."}},"required":["type","path"],"additionalProperties":false,"title":"tear","description":"Trace a tear from the selected piece and return any detached pieces."},"HandleMoveOperation":{"type":"object","properties":{"type":{"type":"string","const":"move"},"piece":{"type":"string","pattern":"^(sheet|piece-[1-9][0-9]{0,3})$","description":"Piece ID returned by a previous operation.","default":"sheet"},"dx":{"type":"number","minimum":-4,"maximum":4,"description":"Horizontal change in original sheet widths, positive to the right."},"dy":{"type":"number","minimum":-4,"maximum":4,"description":"Vertical change in original sheet widths, positive downward."}},"required":["type","dx","dy"],"additionalProperties":false,"title":"move","description":"Translate the selected piece on the desk."},"HandleUnfoldOperation":{"type":"object","properties":{"type":{"type":"string","const":"unfold"},"piece":{"type":"string","pattern":"^(sheet|piece-[1-9][0-9]{0,3})$","description":"Piece ID returned by a previous operation.","default":"sheet"},"index":{"type":"integer","minimum":0,"maximum":31,"description":"Zero-based index in the selected piece’s corresponding record array."},"angle":{"type":"number","minimum":0,"maximum":1,"description":"Fold angle as a fraction of 180 degrees.","default":0}},"required":["type"],"additionalProperties":false,"title":"unfold","description":"Open a fold while preserving its material memory. Defaults to the last fold with a positive angle."},"HandleAdjustFoldOperation":{"type":"object","properties":{"type":{"type":"string","const":"adjust-fold"},"piece":{"type":"string","pattern":"^(sheet|piece-[1-9][0-9]{0,3})$","description":"Piece ID returned by a previous operation.","default":"sheet"},"index":{"type":"integer","minimum":0,"maximum":31,"description":"Zero-based index in the selected piece’s corresponding record array."},"angle":{"type":"number","minimum":0,"maximum":1,"description":"Fold angle as a fraction of 180 degrees."},"depth":{"type":"number","minimum":0,"maximum":1,"description":"Scoring depth."},"pressure":{"type":"number","minimum":0,"maximum":1,"description":"Pressure applied to set the paper."}},"required":["type","index"],"additionalProperties":false,"title":"adjust-fold","description":"Adjust the angle of a fold, the depth of a crease, or the pressure on either.","anyOf":[{"required":["angle"]},{"required":["depth"]},{"required":["pressure"]}]},"HandleSwapFoldOperation":{"type":"object","properties":{"type":{"type":"string","const":"swap-fold"},"piece":{"type":"string","pattern":"^(sheet|piece-[1-9][0-9]{0,3})$","description":"Piece ID returned by a previous operation.","default":"sheet"},"index":{"type":"integer","minimum":0,"maximum":31,"description":"Zero-based index in the selected piece’s corresponding record array."}},"required":["type","index"],"additionalProperties":false,"title":"swap-fold","description":"Reverse which side of a fold moves."},"HandleCrumpleOperation":{"type":"object","properties":{"type":{"type":"string","const":"crumple"},"piece":{"type":"string","pattern":"^(sheet|piece-[1-9][0-9]{0,3})$","description":"Piece ID returned by a previous operation.","default":"sheet"},"at":{"type":"array","minItems":2,"maxItems":2,"items":{"type":"number","minimum":0,"maximum":1,"description":"Normalized coordinate."},"description":"Material coordinate [u, v] on the original sheet."},"radius":{"type":"number","minimum":0.05,"maximum":1,"description":"Gather radius in original sheet widths."},"amount":{"type":"number","minimum":0,"maximum":1,"description":"Strength of the deformation."},"heading":{"type":"number","minimum":-3.141592653589793,"maximum":3.141592653589793,"description":"Gather heading in radians in material space, with positive angles toward +v."},"seed":{"type":"integer","minimum":0,"maximum":2147483647,"description":"Deterministic gather pattern seed."}},"required":["type","at","radius","amount","heading","seed"],"additionalProperties":false,"title":"crumple","description":"Create a local gather with a repeatable pattern."},"HandleAdjustGatherOperation":{"type":"object","properties":{"type":{"type":"string","const":"adjust-gather"},"piece":{"type":"string","pattern":"^(sheet|piece-[1-9][0-9]{0,3})$","description":"Piece ID returned by a previous operation.","default":"sheet"},"index":{"type":"integer","minimum":0,"maximum":31,"description":"Zero-based index in the selected piece’s corresponding record array."},"radius":{"type":"number","minimum":0.05,"maximum":1,"description":"Gather radius in original sheet widths."},"amount":{"type":"number","minimum":0,"maximum":1,"description":"Strength of the deformation."}},"required":["type","index"],"additionalProperties":false,"title":"adjust-gather","description":"Adjust a local gather’s radius or compression.","anyOf":[{"required":["radius"]},{"required":["amount"]}]},"HandleReleaseOperation":{"type":"object","properties":{"type":{"type":"string","const":"release"},"piece":{"type":"string","pattern":"^(sheet|piece-[1-9][0-9]{0,3})$","description":"Piece ID returned by a previous operation.","default":"sheet"},"index":{"type":"integer","minimum":0,"maximum":31,"description":"Zero-based index in the selected piece’s corresponding record array."}},"required":["type","index"],"additionalProperties":false,"title":"release","description":"Release a local gather while preserving its material memory."},"HandleFlattenOperation":{"type":"object","properties":{"type":{"type":"string","const":"flatten"},"piece":{"type":"string","pattern":"^(sheet|piece-[1-9][0-9]{0,3})$","description":"Piece ID returned by a previous operation.","default":"sheet"}},"required":["type"],"additionalProperties":false,"title":"flatten","description":"Flatten the selected piece while retaining folds, creases, gathers and their permanent set."},"HandleWholeCrumpleOperation":{"type":"object","properties":{"type":{"type":"string","const":"whole-crumple"},"piece":{"type":"string","pattern":"^(sheet|piece-[1-9][0-9]{0,3})$","description":"Piece ID returned by a previous operation.","default":"sheet"}},"required":["type"],"additionalProperties":false,"title":"whole-crumple","description":"Crumple the entire selected piece."},"HandleRotateOperation":{"type":"object","properties":{"type":{"type":"string","const":"rotate"},"piece":{"type":"string","pattern":"^(sheet|piece-[1-9][0-9]{0,3})$","description":"Piece ID returned by a previous operation.","default":"sheet"},"degrees":{"type":"number","minimum":-360,"maximum":360,"description":"Clockwise desk rotation in degrees.","default":15}},"required":["type"],"additionalProperties":false,"title":"rotate","description":"Rotate the selected piece on the desk."},"HandleTurnOperation":{"type":"object","properties":{"type":{"type":"string","const":"turn"},"piece":{"type":"string","pattern":"^(sheet|piece-[1-9][0-9]{0,3})$","description":"Piece ID returned by a previous operation.","default":"sheet"}},"required":["type"],"additionalProperties":false,"title":"turn","description":"Turn the selected piece over."},"HandleLiftOperation":{"type":"object","properties":{"type":{"type":"string","const":"lift"},"piece":{"type":"string","pattern":"^(sheet|piece-[1-9][0-9]{0,3})$","description":"Piece ID returned by a previous operation.","default":"sheet"},"at":{"type":"array","minItems":2,"maxItems":2,"items":{"type":"number","enum":[0,1]},"description":"Original sheet corner [u, v]."},"amount":{"type":"number","minimum":0,"maximum":1,"description":"Strength of the deformation."}},"required":["type","at"],"additionalProperties":false,"title":"lift","description":"Lift an original sheet corner. Omit amount to toggle."},"HandleBendOperation":{"type":"object","properties":{"type":{"type":"string","const":"bend"},"piece":{"type":"string","pattern":"^(sheet|piece-[1-9][0-9]{0,3})$","description":"Piece ID returned by a previous operation.","default":"sheet"},"at":{"type":"array","minItems":2,"maxItems":2,"items":{"type":"number","enum":[0,1]},"description":"Original sheet corner [u, v]."},"amount":{"type":"number","minimum":0,"maximum":1,"description":"Strength of the deformation."}},"required":["type","at"],"additionalProperties":false,"title":"bend","description":"Bend an original sheet corner. Omit amount to toggle."},"HandleOutput":{"type":"object","properties":{"apiVersion":{"type":"integer","const":1},"material":{"type":"string","const":"md-cotton","default":"md-cotton"},"pieces":{"type":"array","items":{"$ref":"#/components/schemas/HandlePiece"}},"results":{"type":"array","items":{"$ref":"#/components/schemas/HandleResult"}},"pose":{"type":"object","description":"Renderer-compatible Paper Studio pose. Treat internal fields as opaque."},"writing":{"$ref":"#/components/schemas/HandleWriting"}},"required":["apiVersion","material","pieces","results","pose"],"additionalProperties":false},"HandleWriting":{"type":"object","properties":{"title":{"type":"string","maxLength":200,"default":"Untitled letter","description":"Manuscript title."},"text":{"type":"string","maxLength":4000,"description":"Plain manuscript text. An empty value clears the ink."},"fontId":{"type":"string","enum":["script","palmer","austen","lincoln","elizabeth-i","whitman","elizabeth-ii","courier","times","et-bembo","arial"],"description":"Built-in handwritten or typeset font.","default":"script"},"ink":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$","default":"#302d29","description":"Ink color as #RRGGBB."},"colorRuns":{"type":"array","maxItems":4000,"description":"Ink overrides in ascending, nonoverlapping ranges of the manuscript. Boundaries must fall between graphemes.","items":{"type":"object","properties":{"start":{"type":"integer","minimum":0,"maximum":8000,"description":"Inclusive UTF-16 offset into text."},"end":{"type":"integer","minimum":0,"maximum":8000,"description":"Exclusive UTF-16 offset into text."},"color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"}},"required":["start","end","color"],"additionalProperties":false}},"inkOpacity":{"type":"number","minimum":0.1,"maximum":1,"description":"Ink opacity.","default":1},"fontSize":{"type":"number","minimum":18,"maximum":52,"description":"Size on the 700 px letter layout. Defaults to 32 for handwriting and 20 for typesetting."},"lineSpacing":{"type":"number","minimum":1.1,"maximum":2,"description":"Line spacing as a multiple of font size. Defaults to 1.45 for handwriting and 1.25 for typesetting."},"align":{"type":"string","enum":["left","center","right"],"description":"Line alignment.","default":"left"},"page":{"type":"integer","minimum":0,"maximum":31,"description":"Zero-based page of the manuscript to place on the source sheet.","default":0},"paperId":{"type":"string","const":"cotton"},"stamp":{"type":"boolean","const":false}},"required":["title","text","fontId","ink","inkOpacity","fontSize","lineSpacing","align","page","paperId","stamp"],"additionalProperties":false},"HandlePiece":{"type":"object","properties":{"id":{"type":"string","pattern":"^(sheet|piece-[1-9][0-9]{0,3})$","description":"Piece ID returned by a previous operation."},"area":{"type":"number"},"bounds":{"type":"object","properties":{"minU":{"type":"number"},"minV":{"type":"number"},"maxU":{"type":"number"},"maxV":{"type":"number"}},"required":["minU","minV","maxU","maxV"],"additionalProperties":false},"offset":{"type":"array","minItems":2,"maxItems":2,"items":{"type":"number"}},"layer":{"type":"integer"},"rotation":{"type":"number"},"face":{"type":"string","enum":["front","back"]},"lift":{"type":"number","minimum":0,"maximum":1,"description":"Strength of the deformation."},"bend":{"type":"number","minimum":0,"maximum":1,"description":"Strength of the deformation."},"crumple":{"type":"number","minimum":0,"maximum":1,"description":"Strength of the deformation."},"memory":{"type":"number","minimum":0,"maximum":1,"description":"Permanent whole-piece crumple set."},"corner":{"type":"array","minItems":2,"maxItems":2,"items":{"type":"number","enum":[0,1]},"description":"Original sheet corner [u, v]."},"folds":{"type":"array","items":{"$ref":"#/components/schemas/HandleFold"}},"gathers":{"type":"array","items":{"$ref":"#/components/schemas/HandleGather"}},"origami":{"type":"object","properties":{"model":{"type":"string","enum":["fortune-teller","crane","boat"],"description":"Coordinated origami pattern."},"progress":{"type":"number","minimum":0,"maximum":1,"description":"Progress through the complete fold sequence, starting from prepared flat stock."},"pinch":{"type":"number","minimum":-1,"maximum":1,"description":"Fortune teller pocket squeeze. Opposite signs exchange the open and closed pair."}},"required":["model","progress"],"additionalProperties":false},"surface":{"$ref":"#/components/schemas/HandleOrigamiSurface"}},"required":["id","area","bounds","offset","layer","rotation","face","lift","bend","crumple","memory","folds","gathers"],"additionalProperties":false},"HandleOrigamiSurface":{"type":"object","properties":{"vertices":{"type":"array","items":{"type":"array","minItems":3,"maxItems":3,"items":{"type":"number"},"description":"[x,y,z] before desk transforms, in source-sheet widths, centred on A5, with z up."}},"uv":{"type":"array","items":{"type":"array","minItems":2,"maxItems":2,"items":{"type":"number","minimum":0,"maximum":1,"description":"Normalized coordinate."},"description":"Material coordinate [u, v] on the original sheet."}},"faces":{"type":"array","items":{"type":"array","minItems":3,"maxItems":3,"items":{"type":"integer","minimum":0}}},"drawOrder":{"type":"array","items":{"type":"integer","minimum":0,"description":"Face index in bottom-to-top order for coincident plies."}}},"required":["vertices","uv","faces"],"additionalProperties":false},"HandleFold":{"type":"object","properties":{"kind":{"type":"string","enum":["fold","crease"]},"from":{"type":"array","minItems":2,"maxItems":2,"items":{"type":"number","minimum":0,"maximum":1,"description":"Normalized coordinate."},"description":"Material coordinate [u, v] on the original sheet."},"to":{"type":"array","minItems":2,"maxItems":2,"items":{"type":"number","minimum":0,"maximum":1,"description":"Normalized coordinate."},"description":"Material coordinate [u, v] on the original sheet."},"side":{"type":"integer","enum":[-1,1],"description":"Select the side of the directed line in material coordinates."},"angle":{"type":"number","minimum":0,"maximum":1,"description":"Fold angle as a fraction of 180 degrees."},"pressure":{"type":"number","minimum":0,"maximum":1,"description":"Pressure applied to set the paper."},"back":{"type":"boolean","default":false,"description":"Apply the operation from the reverse material face."},"memory":{"type":"number","minimum":0,"maximum":1,"description":"Permanent set."},"anchor":{"type":"array","minItems":2,"maxItems":2,"items":{"type":"number","minimum":0,"maximum":1,"description":"Normalized coordinate."},"description":"Material coordinate [u, v] on the original sheet."},"layer":{"type":"string","enum":["packet","flap"],"description":"Fold all layers along the hinge, or turn a freely hinged material flap independently."},"depth":{"type":"number","minimum":0,"maximum":1,"description":"Scoring depth."},"path":{"type":"array","minItems":2,"maxItems":48,"items":{"type":"array","minItems":2,"maxItems":2,"items":{"type":"number","minimum":0,"maximum":1,"description":"Normalized coordinate."},"description":"Material coordinate [u, v] on the original sheet."},"description":"Sampled material-coordinate score."}},"required":["kind","from","to","side","angle","pressure","back","memory"],"additionalProperties":false},"HandleGather":{"type":"object","properties":{"at":{"type":"array","minItems":2,"maxItems":2,"items":{"type":"number","minimum":0,"maximum":1,"description":"Normalized coordinate."},"description":"Material coordinate [u, v] on the original sheet."},"radius":{"type":"number","minimum":0.05,"maximum":1,"description":"Gather radius in original sheet widths."},"heading":{"type":"number","minimum":-3.141592653589793,"maximum":3.141592653589793,"description":"Gather heading in radians in material space, with positive angles toward +v."},"amount":{"type":"number","minimum":0,"maximum":1,"description":"Strength of the deformation."},"seed":{"type":"integer","minimum":0,"maximum":2147483647,"description":"Deterministic gather pattern seed."},"memory":{"type":"number","minimum":0,"maximum":1,"description":"Permanent gather set."}},"required":["at","radius","heading","amount","seed","memory"],"additionalProperties":false},"HandleResult":{"type":"object","properties":{"type":{"type":"string","enum":["write","origami","fold","crease","tear","move","unfold","adjust-fold","swap-fold","crumple","adjust-gather","release","flatten","whole-crumple","rotate","turn","lift","bend"]},"piece":{"type":"string","pattern":"^(sheet|piece-[1-9][0-9]{0,3})$","description":"Piece ID returned by a previous operation."},"changed":{"type":"boolean"},"index":{"type":"integer","minimum":0,"maximum":31,"description":"Zero-based index in the selected piece’s corresponding record array."},"newPieceIds":{"type":"array","items":{"type":"string","pattern":"^(sheet|piece-[1-9][0-9]{0,3})$","description":"Piece ID returned by a previous operation."}}},"required":["type","piece","changed"],"additionalProperties":false},"HandleError":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"operationIndex":{"type":"integer","minimum":0,"maximum":31,"description":"Zero-based index in the selected piece’s corresponding record array."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}