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 .length_unit import LengthUnit
|
||||||
from .loft import Loft
|
from .loft import Loft
|
||||||
from .make_axes_gizmo import MakeAxesGizmo
|
from .make_axes_gizmo import MakeAxesGizmo
|
||||||
|
from .make_offset_path import MakeOffsetPath
|
||||||
from .make_plane import MakePlane
|
from .make_plane import MakePlane
|
||||||
from .mass import Mass
|
from .mass import Mass
|
||||||
from .meta_cluster_info import MetaClusterInfo
|
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=())
|
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[
|
ModelingCmd = RootModel[
|
||||||
Annotated[
|
Annotated[
|
||||||
Union[
|
Union[
|
||||||
@ -1456,6 +1470,7 @@ ModelingCmd = RootModel[
|
|||||||
OptionSelectClear,
|
OptionSelectClear,
|
||||||
OptionSelectGet,
|
OptionSelectGet,
|
||||||
OptionGetNumObjects,
|
OptionGetNumObjects,
|
||||||
|
OptionMakeOffsetPath,
|
||||||
],
|
],
|
||||||
Field(discriminator="type"),
|
Field(discriminator="type"),
|
||||||
]
|
]
|
||||||
|
@ -63,6 +63,7 @@ from ..models.import_files import ImportFiles
|
|||||||
from ..models.imported_geometry import ImportedGeometry
|
from ..models.imported_geometry import ImportedGeometry
|
||||||
from ..models.loft import Loft
|
from ..models.loft import Loft
|
||||||
from ..models.make_axes_gizmo import MakeAxesGizmo
|
from ..models.make_axes_gizmo import MakeAxesGizmo
|
||||||
|
from ..models.make_offset_path import MakeOffsetPath
|
||||||
from ..models.make_plane import MakePlane
|
from ..models.make_plane import MakePlane
|
||||||
from ..models.mass import Mass
|
from ..models.mass import Mass
|
||||||
from ..models.mouse_click import MouseClick
|
from ..models.mouse_click import MouseClick
|
||||||
@ -861,6 +862,16 @@ class OptionGetNumObjects(BaseModel):
|
|||||||
model_config = ConfigDict(protected_namespaces=())
|
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):
|
class OptionDefaultCameraFocusOn(BaseModel):
|
||||||
""""""
|
""""""
|
||||||
|
|
||||||
@ -1330,6 +1341,7 @@ OkModelingCmdResponse = RootModel[
|
|||||||
OptionZoomToFit,
|
OptionZoomToFit,
|
||||||
OptionViewIsometric,
|
OptionViewIsometric,
|
||||||
OptionGetNumObjects,
|
OptionGetNumObjects,
|
||||||
|
OptionMakeOffsetPath,
|
||||||
OptionDefaultCameraFocusOn,
|
OptionDefaultCameraFocusOn,
|
||||||
OptionSelectGet,
|
OptionSelectGet,
|
||||||
OptionSolid3DGetAllEdgeFaces,
|
OptionSolid3DGetAllEdgeFaces,
|
||||||
|
71
spec.json
71
spec.json
@ -20802,6 +20802,23 @@
|
|||||||
"description": "The response from the `MakeAxesGizmo` endpoint.",
|
"description": "The response from the `MakeAxesGizmo` endpoint.",
|
||||||
"type": "object"
|
"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": {
|
"MakePlane": {
|
||||||
"description": "The response from the `MakePlane` endpoint.",
|
"description": "The response from the `MakePlane` endpoint.",
|
||||||
"type": "object"
|
"type": "object"
|
||||||
@ -24634,6 +24651,42 @@
|
|||||||
"required": [
|
"required": [
|
||||||
"type"
|
"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"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"data": {
|
||||||
|
"$ref": "#/components/schemas/MakeOffsetPath"
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"make_offset_path"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"data",
|
||||||
|
"type"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
Reference in New Issue
Block a user