Scene kit command

mesh.bisect

Bisect

Cuts the whole edited mesh, whatever is selected, along the plane through `point` (the selection's centre when left out) with `normal`, optionally filling the cut and clearing one side.

Kit
Scene 0.1.0 (.kscene)
Changes the document
yes

Parameters

Parameters of mesh.bisect
NameTypeRequiredDescription
clearInnerbooleannoDelete what lies behind the plane
clearOuterbooleannoDelete what lies in front of the plane
elementsobjectnoRuns the command in this mesh's edit mode on these elements and puts the mode and the selections back afterwards, so no `mode.set` or `mesh.select` step is needed: `object` (the mesh, an id or a name), `vertices` and `faces` (indices from 0, as `mesh.select` takes them; every vertex when both are left out)
fillbooleannoClose the cut with a face (with clearing)
normalnumber[]noThe plane's normal, in the object's own axes ([0, 0, 1]) [x, y, z]
pointnumber[]noA point on the cutting plane, in the object's own axes (the selection's centre) [x, y, z]

Call through scene_run

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

The required parameters, with placeholders for their types: not a tested example. Optional: clearInner, clearOuter, elements, fill, normal, point. 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": {
    "clearInner": {
      "description": "Delete what lies behind the plane",
      "type": "boolean"
    },
    "clearOuter": {
      "description": "Delete what lies in front of the plane",
      "type": "boolean"
    },
    "elements": {
      "additionalProperties": false,
      "description": "Runs the command in this mesh's edit mode on these elements and puts the mode and the selections back afterwards, so no `mode.set` or `mesh.select` step is needed: `object` (the mesh, an id or a name), `vertices` and `faces` (indices from 0, as `mesh.select` takes them; every vertex when both are left out)",
      "properties": {
        "faces": {
          "description": "Face indices, from 0",
          "items": {
            "type": "integer"
          },
          "type": "array"
        },
        "object": {
          "description": "The mesh object",
          "oneOf": [
            {
              "description": "the object's id",
              "type": "integer"
            },
            {
              "description": "the object's name",
              "type": "string"
            }
          ],
          "x-khp-name": "name",
          "x-khp-role": "object",
          "x-khp-types": [
            "Object"
          ]
        },
        "vertices": {
          "description": "Vertex indices, from 0",
          "items": {
            "type": "integer"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "fill": {
      "description": "Close the cut with a face (with clearing)",
      "type": "boolean"
    },
    "normal": {
      "description": "The plane's normal, in the object's own axes ([0, 0, 1]) [x, y, z]",
      "items": {
        "type": "number"
      },
      "type": "array"
    },
    "point": {
      "description": "A point on the cutting plane, in the object's own axes (the selection's centre) [x, y, z]",
      "items": {
        "type": "number"
      },
      "type": "array"
    }
  },
  "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.