Update api spec (#323)
* YOYO NEW API SPEC! * I have generated the latest API! --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
a054e4839e
commit
6e3604f4aa
File diff suppressed because it is too large
Load Diff
@ -164,6 +164,7 @@ from .leaf_node import LeafNode
|
||||
from .length_unit import LengthUnit
|
||||
from .loft import Loft
|
||||
from .make_axes_gizmo import MakeAxesGizmo
|
||||
from .make_offset_path import MakeOffsetPath
|
||||
from .make_plane import MakePlane
|
||||
from .mass import Mass
|
||||
from .meta_cluster_info import MetaClusterInfo
|
||||
|
11
kittycad/models/make_offset_path.py
Normal file
11
kittycad/models/make_offset_path.py
Normal file
@ -0,0 +1,11 @@
|
||||
from typing import List
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
class MakeOffsetPath(BaseModel):
|
||||
"""The response from the `MakeOffsetPath` command."""
|
||||
|
||||
entity_ids: List[str]
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
@ -1344,6 +1344,20 @@ class OptionGetNumObjects(BaseModel):
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionMakeOffsetPath(BaseModel):
|
||||
"""Make a new path by offsetting an object by a given distance. The new path's ID will be the ID of this command."""
|
||||
|
||||
face_id: Optional[str] = None
|
||||
|
||||
object_id: str
|
||||
|
||||
offset: LengthUnit
|
||||
|
||||
type: Literal["make_offset_path"] = "make_offset_path"
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
ModelingCmd = RootModel[
|
||||
Annotated[
|
||||
Union[
|
||||
@ -1456,6 +1470,7 @@ ModelingCmd = RootModel[
|
||||
OptionSelectClear,
|
||||
OptionSelectGet,
|
||||
OptionGetNumObjects,
|
||||
OptionMakeOffsetPath,
|
||||
],
|
||||
Field(discriminator="type"),
|
||||
]
|
||||
|
@ -63,6 +63,7 @@ from ..models.import_files import ImportFiles
|
||||
from ..models.imported_geometry import ImportedGeometry
|
||||
from ..models.loft import Loft
|
||||
from ..models.make_axes_gizmo import MakeAxesGizmo
|
||||
from ..models.make_offset_path import MakeOffsetPath
|
||||
from ..models.make_plane import MakePlane
|
||||
from ..models.mass import Mass
|
||||
from ..models.mouse_click import MouseClick
|
||||
@ -861,6 +862,16 @@ class OptionGetNumObjects(BaseModel):
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionMakeOffsetPath(BaseModel):
|
||||
""""""
|
||||
|
||||
data: MakeOffsetPath
|
||||
|
||||
type: Literal["make_offset_path"] = "make_offset_path"
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionDefaultCameraFocusOn(BaseModel):
|
||||
""""""
|
||||
|
||||
@ -1330,6 +1341,7 @@ OkModelingCmdResponse = RootModel[
|
||||
OptionZoomToFit,
|
||||
OptionViewIsometric,
|
||||
OptionGetNumObjects,
|
||||
OptionMakeOffsetPath,
|
||||
OptionDefaultCameraFocusOn,
|
||||
OptionSelectGet,
|
||||
OptionSolid3DGetAllEdgeFaces,
|
||||
|
71
spec.json
71
spec.json
@ -20802,6 +20802,23 @@
|
||||
"description": "The response from the `MakeAxesGizmo` endpoint.",
|
||||
"type": "object"
|
||||
},
|
||||
"MakeOffsetPath": {
|
||||
"description": "The response from the `MakeOffsetPath` command.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"entity_ids": {
|
||||
"description": "If the offset path splits into multiple paths, this will contain the UUIDs of the new paths. If the offset path remains as a single path, this will be empty, and the resulting ID of the (single) new path will be the ID of the `MakeOffsetPath` command.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"entity_ids"
|
||||
]
|
||||
},
|
||||
"MakePlane": {
|
||||
"description": "The response from the `MakePlane` endpoint.",
|
||||
"type": "object"
|
||||
@ -24634,6 +24651,42 @@
|
||||
"required": [
|
||||
"type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Make a new path by offsetting an object by a given distance. The new path's ID will be the ID of this command.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"face_id": {
|
||||
"nullable": true,
|
||||
"description": "If the object is a solid, this is the ID of the face to base the offset on. If given, and `object_id` refers to a solid, then this face on the solid will be offset. If given but `object_id` doesn't refer to a solid, responds with an error. If not given, then `object_id` itself will be offset directly.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"object_id": {
|
||||
"description": "The object that will be offset (can be a path, sketch, or a solid)",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"offset": {
|
||||
"description": "The distance to offset the path (positive for outset, negative for inset)",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/LengthUnit"
|
||||
}
|
||||
]
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"make_offset_path"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"object_id",
|
||||
"offset",
|
||||
"type"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -26094,6 +26147,24 @@
|
||||
"type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/components/schemas/MakeOffsetPath"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"make_offset_path"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"data",
|
||||
"type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
Reference in New Issue
Block a user