Scene kit command

curve.set

Curve Settings

Changes curve `object`: dimensions, resolution, extrude, bevel depth and resolution, fill, cyclic.

Kit
Scene 0.1.0 (.kscene)
Changes the document
yes
Acts on
object (one id), which a run step’s on fills

Parameters

Parameters of curve.set
NameTypeRequiredDescription
bevelDepthnumbernoThe radius of the round profile swept along the curve, metres
bevelResolutionintegernoSegments in each quarter of the bevel's profile (4)
cyclicbooleannoClose every spline on itself
dimensions"2d" | "3d"no2d keeps the curve flat and fills closed splines
extrudenumbernoHalf the height the curve is extruded to, metres
fillCapsbooleannoClose the ends of an open bevelled curve
fillMode"full" | "half" | "both" | "front" | "back" | "none"no3D: full or half profile; 2D: which faces fill a closed curve
objectinteger | stringnoThe curve or text; the active or edited one when left out
offsetnumbernoMoves the curve along its normals, metres
picknumber[]noInstead of `object`/`objects`: a world point [x, y, z] in metres; the command acts on the object there now (the smallest whose mesh's bounds hold the point, else the nearest light, camera, empty, curve, text, lattice or armature whose origin is within 0.25 m). A place: with `basis`, a write by it is refused when what is at the point is no longer what was there (moved away, another moved in, its parent moved)
resolutionintegernoSamples per segment, for every spline (12)

Call through scene_run

text
scene_run {
  "path": "<file>.kscene",
  "steps": [{ "command": "curve.set" }]
}

The required parameters, with placeholders for their types: not a tested example. Optional: bevelDepth, bevelResolution, cyclic, dimensions, extrude, fillCaps, fillMode, object, offset, pick, resolution. scene_run answers the step’s result in completed[i].result.

Result

The kit gives no result schema for this command.

Parameter schema

json
{
  "additionalProperties": false,
  "properties": {
    "bevelDepth": {
      "description": "The radius of the round profile swept along the curve, metres",
      "type": "number"
    },
    "bevelResolution": {
      "description": "Segments in each quarter of the bevel's profile (4)",
      "type": "integer"
    },
    "cyclic": {
      "description": "Close every spline on itself",
      "type": "boolean"
    },
    "dimensions": {
      "description": "2d keeps the curve flat and fills closed splines",
      "enum": [
        "2d",
        "3d"
      ],
      "type": "string"
    },
    "extrude": {
      "description": "Half the height the curve is extruded to, metres",
      "type": "number"
    },
    "fillCaps": {
      "description": "Close the ends of an open bevelled curve",
      "type": "boolean"
    },
    "fillMode": {
      "description": "3D: full or half profile; 2D: which faces fill a closed curve",
      "enum": [
        "full",
        "half",
        "both",
        "front",
        "back",
        "none"
      ],
      "type": "string"
    },
    "object": {
      "description": "The curve or text; the active or edited one when left out",
      "oneOf": [
        {
          "description": "the object's id",
          "type": "integer"
        },
        {
          "description": "the object's name",
          "type": "string"
        }
      ],
      "x-khp-name": "name",
      "x-khp-types": [
        "Object"
      ]
    },
    "offset": {
      "description": "Moves the curve along its normals, metres",
      "type": "number"
    },
    "pick": {
      "description": "Instead of `object`/`objects`: a world point [x, y, z] in metres; the command acts on the object there now (the smallest whose mesh's bounds hold the point, else the nearest light, camera, empty, curve, text, lattice or armature whose origin is within 0.25 m). A place: with `basis`, a write by it is refused when what is at the point is no longer what was there (moved away, another moved in, its parent moved)",
      "items": {
        "type": "number"
      },
      "type": "array"
    },
    "resolution": {
      "description": "Samples per segment, for every spline (12)",
      "type": "integer"
    }
  },
  "type": "object"
}

Generated from the command list of @kition/[email protected] and the kit itself (scene_commands through @kition/[email protected], built from KitionAI/kition-scene@4d06faf). As data: commands.jsonl.