diff --git a/spec.json b/spec.json index c5edcb2..f5ec2d9 100644 --- a/spec.json +++ b/spec.json @@ -5590,34 +5590,6 @@ ], "type": "object" }, - "Extrude": { - "description": "Command for extruding a solid.", - "properties": { - "cap": { - "description": "Whether to cap the extrusion with a face, or not. If true, the resulting solid will be closed on all sides, like a dice. If false, it will be open on one side, like a drinking glass.", - "type": "boolean" - }, - "distance": { - "description": "How far off the plane to extrude", - "format": "double", - "type": "number" - }, - "target": { - "allOf": [ - { - "$ref": "#/components/schemas/ModelingCmdId" - } - ], - "description": "Which sketch to extrude. Must be a closed 2D solid." - } - }, - "required": [ - "cap", - "distance", - "target" - ], - "type": "object" - }, "FileCenterOfMass": { "description": "A file center of mass result.", "properties": { @@ -6452,7 +6424,7 @@ "properties": { "type": { "enum": [ - "Gltf" + "gltf" ], "type": "string" } @@ -6475,7 +6447,7 @@ }, "type": { "enum": [ - "Step" + "step" ], "type": "string" } @@ -6499,7 +6471,7 @@ }, "type": { "enum": [ - "Obj" + "obj" ], "type": "string" }, @@ -6532,7 +6504,7 @@ }, "type": { "enum": [ - "Ply" + "ply" ], "type": "string" }, @@ -6565,7 +6537,7 @@ }, "type": { "enum": [ - "Stl" + "stl" ], "type": "string" }, @@ -7213,358 +7185,670 @@ "oneOf": [ { "description": "Start a path.", - "enum": [ - "StartPath" + "properties": { + "type": { + "enum": [ + "start_path" + ], + "type": "string" + } + }, + "required": [ + "type" ], - "type": "string" + "type": "object" }, { - "additionalProperties": false, "description": "Move the path's \"pen\".", "properties": { - "MovePathPen": { - "properties": { - "path": { - "allOf": [ - { - "$ref": "#/components/schemas/ModelingCmdId" - } - ], - "description": "The ID of the command which created the path." - }, - "to": { - "allOf": [ - { - "$ref": "#/components/schemas/Point3d" - } - ], - "description": "Where the path's pen should be." + "path": { + "allOf": [ + { + "$ref": "#/components/schemas/ModelingCmdId" } - }, - "required": [ - "path", - "to" ], - "type": "object" + "description": "The ID of the command which created the path." + }, + "to": { + "allOf": [ + { + "$ref": "#/components/schemas/Point3d" + } + ], + "description": "Where the path's pen should be." + }, + "type": { + "enum": [ + "move_path_pen" + ], + "type": "string" } }, "required": [ - "MovePathPen" + "path", + "to", + "type" ], "type": "object" }, { - "additionalProperties": false, "description": "Extend a path by adding a new segment which starts at the path's \"pen\". If no \"pen\" location has been set before (via `MovePen`), then the pen is at the origin.", "properties": { - "ExtendPath": { - "properties": { - "path": { - "allOf": [ - { - "$ref": "#/components/schemas/ModelingCmdId" - } - ], - "description": "The ID of the command which created the path." - }, - "segment": { - "allOf": [ - { - "$ref": "#/components/schemas/PathSegment" - } - ], - "description": "Segment to append to the path. This segment will implicitly begin at the current \"pen\" location." + "path": { + "allOf": [ + { + "$ref": "#/components/schemas/ModelingCmdId" } - }, - "required": [ - "path", - "segment" ], - "type": "object" + "description": "The ID of the command which created the path." + }, + "segment": { + "allOf": [ + { + "$ref": "#/components/schemas/PathSegment" + } + ], + "description": "Segment to append to the path. This segment will implicitly begin at the current \"pen\" location." + }, + "type": { + "enum": [ + "extend_path" + ], + "type": "string" } }, "required": [ - "ExtendPath" + "path", + "segment", + "type" ], "type": "object" }, { - "additionalProperties": false, "description": "Extrude a 2D solid.", "properties": { - "Extrude": { - "$ref": "#/components/schemas/Extrude" + "cap": { + "description": "Whether to cap the extrusion with a face, or not. If true, the resulting solid will be closed on all sides, like a dice. If false, it will be open on one side, like a drinking glass.", + "type": "boolean" + }, + "distance": { + "description": "How far off the plane to extrude", + "format": "double", + "type": "number" + }, + "target": { + "allOf": [ + { + "$ref": "#/components/schemas/ModelingCmdId" + } + ], + "description": "Which sketch to extrude. Must be a closed 2D solid." + }, + "type": { + "enum": [ + "extrude" + ], + "type": "string" } }, "required": [ - "Extrude" + "cap", + "distance", + "target", + "type" ], "type": "object" }, { - "additionalProperties": false, "description": "Closes a path, converting it to a 2D solid.", "properties": { - "ClosePath": { - "properties": { - "path_id": { - "description": "Which path to close.", - "format": "uuid", - "type": "string" - } - }, - "required": [ - "path_id" + "path_id": { + "description": "Which path to close.", + "format": "uuid", + "type": "string" + }, + "type": { + "enum": [ + "close_path" ], - "type": "object" + "type": "string" } }, "required": [ - "ClosePath" + "path_id", + "type" ], "type": "object" }, { - "additionalProperties": false, "description": "Camera drag started.", "properties": { - "CameraDragStart": { - "properties": { - "interaction": { - "allOf": [ - { - "$ref": "#/components/schemas/CameraDragInteractionType" - } - ], - "description": "The type of camera drag interaction." - }, - "window": { - "allOf": [ - { - "$ref": "#/components/schemas/Point2d" - } - ], - "description": "The initial mouse position." + "interaction": { + "allOf": [ + { + "$ref": "#/components/schemas/CameraDragInteractionType" } - }, - "required": [ - "interaction", - "window" ], - "type": "object" + "description": "The type of camera drag interaction." + }, + "type": { + "enum": [ + "camera_drag_start" + ], + "type": "string" + }, + "window": { + "allOf": [ + { + "$ref": "#/components/schemas/Point2d" + } + ], + "description": "The initial mouse position." } }, "required": [ - "CameraDragStart" + "interaction", + "type", + "window" ], "type": "object" }, { - "additionalProperties": false, "description": "Camera drag continued.", "properties": { - "CameraDragMove": { - "properties": { - "interaction": { - "allOf": [ - { - "$ref": "#/components/schemas/CameraDragInteractionType" - } - ], - "description": "The type of camera drag interaction." - }, - "sequence": { - "description": "Logical timestamp. The client should increment this with every event in the current mouse drag. That way, if the events are being sent over an unordered channel, the API can ignore the older events.", - "format": "uint32", - "minimum": 0, - "nullable": true, - "type": "integer" - }, - "window": { - "allOf": [ - { - "$ref": "#/components/schemas/Point2d" - } - ], - "description": "The current mouse position." + "interaction": { + "allOf": [ + { + "$ref": "#/components/schemas/CameraDragInteractionType" } - }, - "required": [ - "interaction", - "window" ], - "type": "object" + "description": "The type of camera drag interaction." + }, + "sequence": { + "description": "Logical timestamp. The client should increment this with every event in the current mouse drag. That way, if the events are being sent over an unordered channel, the API can ignore the older events.", + "format": "uint32", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "type": { + "enum": [ + "camera_drag_move" + ], + "type": "string" + }, + "window": { + "allOf": [ + { + "$ref": "#/components/schemas/Point2d" + } + ], + "description": "The current mouse position." } }, "required": [ - "CameraDragMove" + "interaction", + "type", + "window" ], "type": "object" }, { - "additionalProperties": false, "description": "Camera drag ended.", "properties": { - "CameraDragEnd": { - "properties": { - "interaction": { - "allOf": [ - { - "$ref": "#/components/schemas/CameraDragInteractionType" - } - ], - "description": "The type of camera drag interaction." - }, - "window": { - "allOf": [ - { - "$ref": "#/components/schemas/Point2d" - } - ], - "description": "The final mouse position." + "interaction": { + "allOf": [ + { + "$ref": "#/components/schemas/CameraDragInteractionType" } - }, - "required": [ - "interaction", - "window" ], - "type": "object" + "description": "The type of camera drag interaction." + }, + "type": { + "enum": [ + "camera_drag_end" + ], + "type": "string" + }, + "window": { + "allOf": [ + { + "$ref": "#/components/schemas/Point2d" + } + ], + "description": "The final mouse position." } }, "required": [ - "CameraDragEnd" + "interaction", + "type", + "window" ], "type": "object" }, { - "additionalProperties": false, "description": "Change what the default camera is looking at.", "properties": { - "DefaultCameraLookAt": { - "properties": { - "center": { - "allOf": [ - { - "$ref": "#/components/schemas/Point3d" - } - ], - "description": "What the camera is looking at. Center of the camera's field of vision" - }, - "up": { - "allOf": [ - { - "$ref": "#/components/schemas/Point3d" - } - ], - "description": "Which way is \"up\", from the camera's point of view." - }, - "vantage": { - "allOf": [ - { - "$ref": "#/components/schemas/Point3d" - } - ], - "description": "Where the camera is positioned" + "center": { + "allOf": [ + { + "$ref": "#/components/schemas/Point3d" } - }, - "required": [ - "center", - "up", - "vantage" ], - "type": "object" + "description": "What the camera is looking at. Center of the camera's field of vision" + }, + "type": { + "enum": [ + "default_camera_look_at" + ], + "type": "string" + }, + "up": { + "allOf": [ + { + "$ref": "#/components/schemas/Point3d" + } + ], + "description": "Which way is \"up\", from the camera's point of view." + }, + "vantage": { + "allOf": [ + { + "$ref": "#/components/schemas/Point3d" + } + ], + "description": "Where the camera is positioned" } }, "required": [ - "DefaultCameraLookAt" + "center", + "type", + "up", + "vantage" ], "type": "object" }, { - "additionalProperties": false, "description": "Enable sketch mode, where users can sketch 2D geometry. Users choose a plane to sketch on.", "properties": { - "DefaultCameraEnableSketchMode": { - "properties": { - "distance_to_plane": { - "description": "How far to the sketching plane?", - "format": "float", - "type": "number" - }, - "origin": { - "allOf": [ - { - "$ref": "#/components/schemas/Point3d" - } - ], - "description": "What's the origin of the sketching plane?" - }, - "ortho": { - "description": "Should the camera use orthographic projection? In other words, should an object's size in the rendered image stay constant regardless of its distance from the camera.", - "type": "boolean" - }, - "x_axis": { - "allOf": [ - { - "$ref": "#/components/schemas/Point3d" - } - ], - "description": "Which 3D axis of the scene should be the X axis of the sketching plane?" - }, - "y_axis": { - "allOf": [ - { - "$ref": "#/components/schemas/Point3d" - } - ], - "description": "Which 3D axis of the scene should be the Y axis of the sketching plane?" - } - }, - "required": [ - "distance_to_plane", - "origin", - "ortho", - "x_axis", - "y_axis" + "distance_to_plane": { + "description": "How far to the sketching plane?", + "format": "float", + "type": "number" + }, + "origin": { + "allOf": [ + { + "$ref": "#/components/schemas/Point3d" + } ], - "type": "object" + "description": "What's the origin of the sketching plane?" + }, + "ortho": { + "description": "Should the camera use orthographic projection? In other words, should an object's size in the rendered image stay constant regardless of its distance from the camera.", + "type": "boolean" + }, + "type": { + "enum": [ + "default_camera_enable_sketch_mode" + ], + "type": "string" + }, + "x_axis": { + "allOf": [ + { + "$ref": "#/components/schemas/Point3d" + } + ], + "description": "Which 3D axis of the scene should be the X axis of the sketching plane?" + }, + "y_axis": { + "allOf": [ + { + "$ref": "#/components/schemas/Point3d" + } + ], + "description": "Which 3D axis of the scene should be the Y axis of the sketching plane?" } }, "required": [ - "DefaultCameraEnableSketchMode" + "distance_to_plane", + "origin", + "ortho", + "type", + "x_axis", + "y_axis" ], "type": "object" }, { "description": "Disable sketch mode, from the default camera.", - "enum": [ - "DefaultCameraDisableSketchMode" + "properties": { + "type": { + "enum": [ + "default_camera_disable_sketch_mode" + ], + "type": "string" + } + }, + "required": [ + "type" ], - "type": "string" + "type": "object" }, { - "additionalProperties": false, "description": "Export the scene to a file.", "properties": { - "Export": { - "properties": { - "format": { - "allOf": [ - { - "$ref": "#/components/schemas/OutputFormat" - } - ], - "description": "The file format to export to." + "format": { + "allOf": [ + { + "$ref": "#/components/schemas/OutputFormat" + } + ], + "description": "The file format to export to." + }, + "scene_id": { + "description": "ID of the scene or an item in the scene to be exported.", + "format": "uuid", + "type": "string" + }, + "type": { + "enum": [ + "export" + ], + "type": "string" + } + }, + "required": [ + "format", + "scene_id", + "type" + ], + "type": "object" + }, + { + "description": "What is this entity's parent?", + "properties": { + "entity_id": { + "description": "ID of the entity being queried.", + "format": "uuid", + "type": "string" + }, + "type": { + "enum": [ + "entity_get_parent_id" + ], + "type": "string" + } + }, + "required": [ + "entity_id", + "type" + ], + "type": "object" + }, + { + "description": "How many children does the entity have?", + "properties": { + "entity_id": { + "description": "ID of the entity being queried.", + "format": "uuid", + "type": "string" + }, + "type": { + "enum": [ + "entity_get_num_children" + ], + "type": "string" + } + }, + "required": [ + "entity_id", + "type" + ], + "type": "object" + }, + { + "description": "What is the UUID of this entity's n-th child?", + "properties": { + "child_index": { + "description": "Index into the entity's list of children.", + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "entity_id": { + "description": "ID of the entity being queried.", + "format": "uuid", + "type": "string" + }, + "type": { + "enum": [ + "entity_get_child_uuid" + ], + "type": "string" + } + }, + "required": [ + "child_index", + "entity_id", + "type" + ], + "type": "object" + }, + { + "description": "What are all UUIDs of this entity's children?", + "properties": { + "entity_id": { + "description": "ID of the entity being queried.", + "format": "uuid", + "type": "string" + }, + "type": { + "enum": [ + "entity_get_all_child_uuids" + ], + "type": "string" + } + }, + "required": [ + "entity_id", + "type" + ], + "type": "object" + }, + { + "description": "Enter edit mode", + "properties": { + "target": { + "description": "The edit target", + "format": "uuid", + "type": "string" + }, + "type": { + "enum": [ + "edit_mode_enter" + ], + "type": "string" + } + }, + "required": [ + "target", + "type" + ], + "type": "object" + }, + { + "description": "Exit edit mode", + "properties": { + "type": { + "enum": [ + "edit_mode_exit" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "description": "Modifies the selection by simulating a \"mouse click\" at the given x,y window coordinate Returns ID of whatever was selected.", + "properties": { + "selected_at_window": { + "allOf": [ + { + "$ref": "#/components/schemas/Point2d" } + ], + "description": "Where in the window was selected" + }, + "selection_type": { + "allOf": [ + { + "$ref": "#/components/schemas/SceneSelectionType" + } + ], + "description": "What entity was selected?" + }, + "type": { + "enum": [ + "select_with_point" + ], + "type": "string" + } + }, + "required": [ + "selected_at_window", + "selection_type", + "type" + ], + "type": "object" + }, + { + "description": "Clear the selection", + "properties": { + "type": { + "enum": [ + "select_clear" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "description": "Adds one or more entities (by UUID) to the selection.", + "properties": { + "entities": { + "description": "Which entities to select", + "items": { + "format": "uuid", + "type": "string" }, - "required": [ - "format" + "type": "array" + }, + "type": { + "enum": [ + "select_add" ], - "type": "object" + "type": "string" + } + }, + "required": [ + "entities", + "type" + ], + "type": "object" + }, + { + "description": "Removes one or more entities (by UUID) from the selection.", + "properties": { + "entities": { + "description": "Which entities to unselect", + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + }, + "type": { + "enum": [ + "select_remove" + ], + "type": "string" } }, "required": [ - "Export" + "entities", + "type" + ], + "type": "object" + }, + { + "description": "Find all IDs of selected entities", + "properties": { + "type": { + "enum": [ + "select_get" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "description": "Changes the current highlighted entity to whichever one is at the given window coordinate. If there's no entity at this location, clears the highlight.", + "properties": { + "selected_at_window": { + "allOf": [ + { + "$ref": "#/components/schemas/Point2d" + } + ], + "description": "Coordinates of the window being clicked" + }, + "type": { + "enum": [ + "highlight_set_entity" + ], + "type": "string" + } + }, + "required": [ + "selected_at_window", + "type" + ], + "type": "object" + }, + { + "description": "Changes the current highlighted entity to these entities.", + "properties": { + "entities": { + "description": "Highlight these entities.", + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + }, + "type": { + "enum": [ + "highlight_set_entities" + ], + "type": "string" + } + }, + "required": [ + "entities", + "type" ], "type": "object" } @@ -7850,7 +8134,7 @@ }, "type": { "enum": [ - "Gltf" + "gltf" ], "type": "string" } @@ -7874,7 +8158,7 @@ }, "type": { "enum": [ - "Obj" + "obj" ], "type": "string" } @@ -7906,7 +8190,7 @@ }, "type": { "enum": [ - "Ply" + "ply" ], "type": "string" } @@ -7931,7 +8215,7 @@ }, "type": { "enum": [ - "Step" + "step" ], "type": "string" } @@ -7963,7 +8247,7 @@ }, "type": { "enum": [ - "Stl" + "stl" ], "type": "string" } @@ -7981,116 +8265,110 @@ "description": "A segment of a path. Paths are composed of many segments.", "oneOf": [ { - "additionalProperties": false, "description": "A straight line segment. Goes from the current path \"pen\" to the given endpoint.", "properties": { - "Line": { - "properties": { - "end": { - "allOf": [ - { - "$ref": "#/components/schemas/Point3d" - } - ], - "description": "End point of the line." + "end": { + "allOf": [ + { + "$ref": "#/components/schemas/Point3d" } - }, - "required": [ - "end" ], - "type": "object" + "description": "End point of the line." + }, + "type": { + "enum": [ + "line" + ], + "type": "string" } }, "required": [ - "Line" + "end", + "type" ], "type": "object" }, { - "additionalProperties": false, "description": "A circular arc segment.", "properties": { - "Arc": { - "properties": { - "angle_end": { - "description": "Start of the arc along circle's perimeter.", - "format": "float", - "type": "number" - }, - "angle_start": { - "description": "Start of the arc along circle's perimeter.", - "format": "float", - "type": "number" - }, - "center": { - "allOf": [ - { - "$ref": "#/components/schemas/Point2d" - } - ], - "description": "Center of the circle" - }, - "radius": { - "description": "Radius of the circle", - "format": "float", - "type": "number" + "angle_end": { + "description": "Start of the arc along circle's perimeter.", + "format": "float", + "type": "number" + }, + "angle_start": { + "description": "Start of the arc along circle's perimeter.", + "format": "float", + "type": "number" + }, + "center": { + "allOf": [ + { + "$ref": "#/components/schemas/Point2d" } - }, - "required": [ - "angle_end", - "angle_start", - "center", - "radius" ], - "type": "object" + "description": "Center of the circle" + }, + "radius": { + "description": "Radius of the circle", + "format": "float", + "type": "number" + }, + "type": { + "enum": [ + "arc" + ], + "type": "string" } }, "required": [ - "Arc" + "angle_end", + "angle_start", + "center", + "radius", + "type" ], "type": "object" }, { - "additionalProperties": false, "description": "A cubic bezier curve segment. Start at the end of the current line, go through control point 1 and 2, then end at a given point.", "properties": { - "Bezier": { - "properties": { - "control1": { - "allOf": [ - { - "$ref": "#/components/schemas/Point3d" - } - ], - "description": "First control point." - }, - "control2": { - "allOf": [ - { - "$ref": "#/components/schemas/Point3d" - } - ], - "description": "Second control point." - }, - "end": { - "allOf": [ - { - "$ref": "#/components/schemas/Point3d" - } - ], - "description": "Final control point." + "control1": { + "allOf": [ + { + "$ref": "#/components/schemas/Point3d" } - }, - "required": [ - "control1", - "control2", - "end" ], - "type": "object" + "description": "First control point." + }, + "control2": { + "allOf": [ + { + "$ref": "#/components/schemas/Point3d" + } + ], + "description": "Second control point." + }, + "end": { + "allOf": [ + { + "$ref": "#/components/schemas/Point3d" + } + ], + "description": "Final control point." + }, + "type": { + "enum": [ + "bezier" + ], + "type": "string" } }, "required": [ - "Bezier" + "control1", + "control2", + "end", + "type" ], "type": "object" } @@ -8665,6 +8943,32 @@ }, "type": "object" }, + "SceneSelectionType": { + "description": "The type of scene selection change", + "oneOf": [ + { + "description": "Replaces the selection", + "enum": [ + "replace" + ], + "type": "string" + }, + { + "description": "Adds to the selection", + "enum": [ + "add" + ], + "type": "string" + }, + { + "description": "Removes from the selection", + "enum": [ + "remove" + ], + "type": "string" + } + ] + }, "Session": { "description": "An authentication session.\n\nFor our UIs, these are automatically created by Next.js.", "properties": { diff --git a/src/models.ts b/src/models.ts index a95461a..a24f43b 100644 --- a/src/models.ts +++ b/src/models.ts @@ -1545,13 +1545,6 @@ export interface ExtendedUserResultsPage_type { next_page?: string; } -export interface Extrude_type { - cap: boolean /* Whether to cap the extrusion with a face, or not. If true, the resulting solid will be closed on all sides, like a dice. If false, it will be open on one side, like a drinking glass. */; - /* format:double, description:How far off the plane to extrude */ - distance: number; - target: ModelingCmdId_type /* Which sketch to extrude. Must be a closed 2D solid. */; -} - export interface FileCenterOfMass_type { /*{ "deprecated": true, @@ -1881,7 +1874,7 @@ export interface IndexInfo_type { } export type InputFormat_type = - | { type: 'Gltf' } + | { type: 'gltf' } | { /* Co-ordinate system of input data. @@ -1889,7 +1882,7 @@ Defaults to the [KittyCAD co-ordinate system]. [KittyCAD co-ordinate system]: ../coord/constant.KITTYCAD.html */ coords: System_type; - type: 'Step'; + type: 'step'; } | { /* Co-ordinate system of input data. @@ -1898,7 +1891,7 @@ Defaults to the [KittyCAD co-ordinate system]. [KittyCAD co-ordinate system]: ../coord/constant.KITTYCAD.html */ coords: System_type; - type: 'Obj'; + type: 'obj'; units: UnitLength_type /* The units of the input data. This is very important for correct scaling and when calculating physics properties like mass, etc. */; } | { @@ -1908,7 +1901,7 @@ Defaults to the [KittyCAD co-ordinate system]. [KittyCAD co-ordinate system]: ../coord/constant.KITTYCAD.html */ coords: System_type; - type: 'Ply'; + type: 'ply'; units: UnitLength_type /* The units of the input data. This is very important for correct scaling and when calculating physics properties like mass, etc. */; } | { @@ -1918,7 +1911,7 @@ Defaults to the [KittyCAD co-ordinate system]. [KittyCAD co-ordinate system]: ../coord/constant.KITTYCAD.html */ coords: System_type; - type: 'Stl'; + type: 'stl'; units: UnitLength_type /* The units of the input data. This is very important for correct scaling and when calculating physics properties like mass, etc. */; }; @@ -2143,71 +2136,135 @@ export type Method_type = | 'EXTENSION'; export type ModelingCmd_type = - | 'StartPath' + | { type: 'start_path' } | { - MovePathPen: { - path: ModelingCmdId_type /* The ID of the command which created the path. */; - to: Point3d_type /* Where the path's pen should be. */; - }; + path: ModelingCmdId_type /* The ID of the command which created the path. */; + to: Point3d_type /* Where the path's pen should be. */; + type: 'move_path_pen'; } | { - ExtendPath: { - path: ModelingCmdId_type /* The ID of the command which created the path. */; - segment: PathSegment_type /* Segment to append to the path. This segment will implicitly begin at the current "pen" location. */; - }; + path: ModelingCmdId_type /* The ID of the command which created the path. */; + segment: PathSegment_type /* Segment to append to the path. This segment will implicitly begin at the current "pen" location. */; + type: 'extend_path'; } - | { Extrude: any } | { - ClosePath: { - /* format:uuid, description:Which path to close. */ - path_id: string; - }; + cap: boolean /* Whether to cap the extrusion with a face, or not. If true, the resulting solid will be closed on all sides, like a dice. If false, it will be open on one side, like a drinking glass. */; + /* format:double, description:How far off the plane to extrude */ + distance: number; + target: ModelingCmdId_type /* Which sketch to extrude. Must be a closed 2D solid. */; + type: 'extrude'; } | { - CameraDragStart: { - interaction: CameraDragInteractionType_type /* The type of camera drag interaction. */; - window: Point2d_type /* The initial mouse position. */; - }; + /* format:uuid, description:Which path to close. */ + path_id: string; + type: 'close_path'; } | { - CameraDragMove: { - interaction: CameraDragInteractionType_type /* The type of camera drag interaction. */; - /*{ + interaction: CameraDragInteractionType_type /* The type of camera drag interaction. */; + type: 'camera_drag_start'; + window: Point2d_type /* The initial mouse position. */; + } + | { + interaction: CameraDragInteractionType_type /* The type of camera drag interaction. */; + /*{ "format": "uint32", "minimum": 0, "nullable": true, "description": "Logical timestamp. The client should increment this with every event in the current mouse drag. That way, if the events are being sent over an unordered channel, the API can ignore the older events." }*/ - sequence?: number; - window: Point2d_type /* The current mouse position. */; - }; + sequence?: number; + type: 'camera_drag_move'; + window: Point2d_type /* The current mouse position. */; } | { - CameraDragEnd: { - interaction: CameraDragInteractionType_type /* The type of camera drag interaction. */; - window: Point2d_type /* The final mouse position. */; - }; + interaction: CameraDragInteractionType_type /* The type of camera drag interaction. */; + type: 'camera_drag_end'; + window: Point2d_type /* The final mouse position. */; } | { - DefaultCameraLookAt: { - center: Point3d_type /* What the camera is looking at. Center of the camera's field of vision */; - up: Point3d_type /* Which way is "up", from the camera's point of view. */; - vantage: Point3d_type /* Where the camera is positioned */; - }; + center: Point3d_type /* What the camera is looking at. Center of the camera's field of vision */; + type: 'default_camera_look_at'; + up: Point3d_type /* Which way is "up", from the camera's point of view. */; + vantage: Point3d_type /* Where the camera is positioned */; } | { - DefaultCameraEnableSketchMode: { - /* format:float, description:How far to the sketching plane? */ - distance_to_plane: number; - origin: Point3d_type /* What's the origin of the sketching plane? */; - ortho: boolean /* Should the camera use orthographic projection? In other words, should an object's size in the rendered image stay constant regardless of its distance from the camera. */; - x_axis: Point3d_type /* Which 3D axis of the scene should be the X axis of the sketching plane? */; - y_axis: Point3d_type /* Which 3D axis of the scene should be the Y axis of the sketching plane? */; - }; + /* format:float, description:How far to the sketching plane? */ + distance_to_plane: number; + origin: Point3d_type /* What's the origin of the sketching plane? */; + ortho: boolean /* Should the camera use orthographic projection? In other words, should an object's size in the rendered image stay constant regardless of its distance from the camera. */; + type: 'default_camera_enable_sketch_mode'; + x_axis: Point3d_type /* Which 3D axis of the scene should be the X axis of the sketching plane? */; + y_axis: Point3d_type /* Which 3D axis of the scene should be the Y axis of the sketching plane? */; + } + | { type: 'default_camera_disable_sketch_mode' } + | { + format: OutputFormat_type /* The file format to export to. */; + /*{ + "format": "uuid", + "description": "ID of the scene or an item in the scene to be exported." +}*/ + scene_id: string; + type: 'export'; } - | 'DefaultCameraDisableSketchMode' | { - Export: { format: OutputFormat_type /* The file format to export to. */ }; + /* format:uuid, description:ID of the entity being queried. */ + entity_id: string; + type: 'entity_get_parent_id'; + } + | { + /* format:uuid, description:ID of the entity being queried. */ + entity_id: string; + type: 'entity_get_num_children'; + } + | { + /* format:uint32, minimum:0, description:Index into the entity's list of children. */ + child_index: number; + /* format:uuid, description:ID of the entity being queried. */ + entity_id: string; + type: 'entity_get_child_uuid'; + } + | { + /* format:uuid, description:ID of the entity being queried. */ + entity_id: string; + type: 'entity_get_all_child_uuids'; + } + | { + /* format:uuid, description:The edit target */ + target: string; + type: 'edit_mode_enter'; + } + | { type: 'edit_mode_exit' } + | { + selected_at_window: Point2d_type /* Where in the window was selected */; + selection_type: SceneSelectionType_type /* What entity was selected? */; + type: 'select_with_point'; + } + | { type: 'select_clear' } + | { + /*{ + "format": "uuid" +}*/ + entities: string[]; + type: 'select_add'; + } + | { + /*{ + "format": "uuid" +}*/ + entities: string[]; + type: 'select_remove'; + } + | { type: 'select_get' } + | { + selected_at_window: Point2d_type /* Coordinates of the window being clicked */; + type: 'highlight_set_entity'; + } + | { + /*{ + "format": "uuid" +}*/ + entities: string[]; + type: 'highlight_set_entities'; }; export type ModelingCmdId_type = @@ -2295,7 +2352,7 @@ export interface OutputFile_type { export type OutputFormat_type = | { storage: Storage_type /* Specifies which kind of glTF 2.0 will be exported. */; - type: 'Gltf'; + type: 'gltf'; } | { /* Co-ordinate system of output data. @@ -2304,7 +2361,7 @@ Defaults to the [KittyCAD co-ordinate system]. [KittyCAD co-ordinate system]: ../coord/constant.KITTYCAD.html */ coords: System_type; - type: 'Obj'; + type: 'obj'; } | { /* Co-ordinate system of output data. @@ -2314,7 +2371,7 @@ Defaults to the [KittyCAD co-ordinate system]. [KittyCAD co-ordinate system]: ../coord/constant.KITTYCAD.html */ coords: System_type; storage: Storage_type /* The storage for the output PLY file. */; - type: 'Ply'; + type: 'ply'; } | { /* Co-ordinate system of output data. @@ -2323,7 +2380,7 @@ Defaults to the [KittyCAD co-ordinate system]. [KittyCAD co-ordinate system]: ../coord/constant.KITTYCAD.html */ coords: System_type; - type: 'Step'; + type: 'step'; } | { /* Co-ordinate system of output data. @@ -2333,28 +2390,26 @@ Defaults to the [KittyCAD co-ordinate system]. [KittyCAD co-ordinate system]: ../coord/constant.KITTYCAD.html */ coords: System_type; storage: Storage_type /* Export storage. */; - type: 'Stl'; + type: 'stl'; }; export type PathSegment_type = - | { Line: { end: Point3d_type /* End point of the line. */ } } + | { end: Point3d_type /* End point of the line. */; type: 'line' } | { - Arc: { - /* format:float, description:Start of the arc along circle's perimeter. */ - angle_end: number; - /* format:float, description:Start of the arc along circle's perimeter. */ - angle_start: number; - center: Point2d_type /* Center of the circle */; - /* format:float, description:Radius of the circle */ - radius: number; - }; + /* format:float, description:Start of the arc along circle's perimeter. */ + angle_end: number; + /* format:float, description:Start of the arc along circle's perimeter. */ + angle_start: number; + center: Point2d_type /* Center of the circle */; + /* format:float, description:Radius of the circle */ + radius: number; + type: 'arc'; } | { - Bezier: { - control1: Point3d_type /* First control point. */; - control2: Point3d_type /* Second control point. */; - end: Point3d_type /* Final control point. */; - }; + control1: Point3d_type /* First control point. */; + control2: Point3d_type /* Second control point. */; + end: Point3d_type /* Final control point. */; + type: 'bezier'; }; export interface PaymentIntent_type { @@ -2508,6 +2563,8 @@ export interface Runtime_type { runtime_args: string[]; } +export type SceneSelectionType_type = 'replace' | 'add' | 'remove'; + export interface Session_type { /* format:date-time, title:DateTime, description:The date and time the session was created. */ created_at: string; @@ -3223,7 +3280,6 @@ export interface Models { ExecutorMetadata_type: ExecutorMetadata_type; ExtendedUser_type: ExtendedUser_type; ExtendedUserResultsPage_type: ExtendedUserResultsPage_type; - Extrude_type: Extrude_type; FileCenterOfMass_type: FileCenterOfMass_type; FileConversion_type: FileConversion_type; FileDensity_type: FileDensity_type; @@ -3276,6 +3332,7 @@ export interface Models { Pong_type: Pong_type; RegistryServiceConfig_type: RegistryServiceConfig_type; Runtime_type: Runtime_type; + SceneSelectionType_type: SceneSelectionType_type; Session_type: Session_type; Storage_type: Storage_type; System_type: System_type;