Update api spec (#370)
* 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
64befa5559
commit
f232b907e1
File diff suppressed because it is too large
Load Diff
@ -240,6 +240,8 @@ from .point4d import Point4d
|
||||
from .pong import Pong
|
||||
from .post_effect_type import PostEffectType
|
||||
from .privacy_settings import PrivacySettings
|
||||
from .project_entity_to_plane import ProjectEntityToPlane
|
||||
from .project_points_to_plane import ProjectPointsToPlane
|
||||
from .raw_file import RawFile
|
||||
from .reconfigure_stream import ReconfigureStream
|
||||
from .remove_scene_objects import RemoveSceneObjects
|
||||
|
@ -1030,6 +1030,34 @@ class OptionCurveGetControlPoints(BaseModel):
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionProjectEntityToPlane(BaseModel):
|
||||
"""Project an entity on to a plane."""
|
||||
|
||||
entity_id: str
|
||||
|
||||
plane_id: str
|
||||
|
||||
type: Literal["project_entity_to_plane"] = "project_entity_to_plane"
|
||||
|
||||
use_plane_coords: bool
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionProjectPointsToPlane(BaseModel):
|
||||
"""Project a list of points on to a plane."""
|
||||
|
||||
plane_id: str
|
||||
|
||||
points: List[Point3d]
|
||||
|
||||
type: Literal["project_points_to_plane"] = "project_points_to_plane"
|
||||
|
||||
use_plane_coords: bool
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionTakeSnapshot(BaseModel):
|
||||
"""Take a snapshot of the current view."""
|
||||
|
||||
@ -1201,7 +1229,7 @@ class OptionImportFiles(BaseModel):
|
||||
|
||||
|
||||
class OptionSetSceneUnits(BaseModel):
|
||||
"""Set the units of the scene. For all following commands, the units will be interpreted as the given units."""
|
||||
"""Set the units of the scene. For all following commands, the units will be interpreted as the given units. Any previously executed commands will not be affected or have their units changed. They will remain in the units they were originally executed in."""
|
||||
|
||||
type: Literal["set_scene_units"] = "set_scene_units"
|
||||
|
||||
@ -1527,6 +1555,8 @@ ModelingCmd = RootModel[
|
||||
OptionSetDefaultSystemProperties,
|
||||
OptionCurveGetType,
|
||||
OptionCurveGetControlPoints,
|
||||
OptionProjectEntityToPlane,
|
||||
OptionProjectPointsToPlane,
|
||||
OptionTakeSnapshot,
|
||||
OptionMakeAxesGizmo,
|
||||
OptionPathGetInfo,
|
||||
|
@ -84,6 +84,8 @@ from ..models.path_get_vertex_uuids import PathGetVertexUuids
|
||||
from ..models.path_segment_info import PathSegmentInfo
|
||||
from ..models.plane_intersect_and_project import PlaneIntersectAndProject
|
||||
from ..models.plane_set_color import PlaneSetColor
|
||||
from ..models.project_entity_to_plane import ProjectEntityToPlane
|
||||
from ..models.project_points_to_plane import ProjectPointsToPlane
|
||||
from ..models.reconfigure_stream import ReconfigureStream
|
||||
from ..models.remove_scene_objects import RemoveSceneObjects
|
||||
from ..models.revolve import Revolve
|
||||
@ -977,6 +979,26 @@ class OptionCurveGetControlPoints(BaseModel):
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionProjectEntityToPlane(BaseModel):
|
||||
""""""
|
||||
|
||||
data: ProjectEntityToPlane
|
||||
|
||||
type: Literal["project_entity_to_plane"] = "project_entity_to_plane"
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionProjectPointsToPlane(BaseModel):
|
||||
""""""
|
||||
|
||||
data: ProjectPointsToPlane
|
||||
|
||||
type: Literal["project_points_to_plane"] = "project_points_to_plane"
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionCurveGetType(BaseModel):
|
||||
""""""
|
||||
|
||||
@ -1407,6 +1429,8 @@ OkModelingCmdResponse = RootModel[
|
||||
OptionSolid3DGetCommonEdge,
|
||||
OptionGetEntityType,
|
||||
OptionCurveGetControlPoints,
|
||||
OptionProjectEntityToPlane,
|
||||
OptionProjectPointsToPlane,
|
||||
OptionCurveGetType,
|
||||
OptionMouseClick,
|
||||
OptionTakeSnapshot,
|
||||
|
13
kittycad/models/project_entity_to_plane.py
Normal file
13
kittycad/models/project_entity_to_plane.py
Normal file
@ -0,0 +1,13 @@
|
||||
from typing import List
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.point3d import Point3d
|
||||
|
||||
|
||||
class ProjectEntityToPlane(BaseModel):
|
||||
"""The response from the `ProjectEntityToPlane` command."""
|
||||
|
||||
projected_points: List[Point3d]
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
13
kittycad/models/project_points_to_plane.py
Normal file
13
kittycad/models/project_points_to_plane.py
Normal file
@ -0,0 +1,13 @@
|
||||
from typing import List
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.point3d import Point3d
|
||||
|
||||
|
||||
class ProjectPointsToPlane(BaseModel):
|
||||
"""The response from the `ProjectPointsToPlane` command."""
|
||||
|
||||
projected_points: List[Point3d]
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
136
spec.json
136
spec.json
@ -24169,6 +24169,72 @@
|
||||
"type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Project an entity on to a plane.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"entity_id": {
|
||||
"description": "Which entity to project (vertex or edge).",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"plane_id": {
|
||||
"description": "Which plane to project entity_id onto.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"project_entity_to_plane"
|
||||
]
|
||||
},
|
||||
"use_plane_coords": {
|
||||
"description": "If true: the projected points are returned in the plane_id's coordinate system, else: the projected points are returned in the world coordinate system.",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"entity_id",
|
||||
"plane_id",
|
||||
"type",
|
||||
"use_plane_coords"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Project a list of points on to a plane.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"plane_id": {
|
||||
"description": "The id of the plane used for the projection.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"points": {
|
||||
"description": "The list of points that will be projected.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/Point3d"
|
||||
}
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"project_points_to_plane"
|
||||
]
|
||||
},
|
||||
"use_plane_coords": {
|
||||
"description": "If true: the projected points are returned in the plane_id's coordinate sysetm. else: the projected points are returned in the world coordinate system.",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"plane_id",
|
||||
"points",
|
||||
"type",
|
||||
"use_plane_coords"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Take a snapshot of the current view.",
|
||||
"type": "object",
|
||||
@ -24570,7 +24636,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Set the units of the scene. For all following commands, the units will be interpreted as the given units.",
|
||||
"description": "Set the units of the scene. For all following commands, the units will be interpreted as the given units. Any previously executed commands will not be affected or have their units changed. They will remain in the units they were originally executed in.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
@ -26823,6 +26889,42 @@
|
||||
"type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/components/schemas/ProjectEntityToPlane"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"project_entity_to_plane"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"data",
|
||||
"type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/components/schemas/ProjectPointsToPlane"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"project_points_to_plane"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"data",
|
||||
"type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@ -28992,6 +29094,38 @@
|
||||
"can_train_on_data"
|
||||
]
|
||||
},
|
||||
"ProjectEntityToPlane": {
|
||||
"description": "The response from the `ProjectEntityToPlane` command.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"projected_points": {
|
||||
"description": "Projected points.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/Point3d"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"projected_points"
|
||||
]
|
||||
},
|
||||
"ProjectPointsToPlane": {
|
||||
"description": "The response from the `ProjectPointsToPlane` command.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"projected_points": {
|
||||
"description": "Projected points.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/Point3d"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"projected_points"
|
||||
]
|
||||
},
|
||||
"RawFile": {
|
||||
"description": "A raw file with unencoded contents to be passed over binary websockets. When raw files come back for exports it is sent as binary/bson, not text/json.",
|
||||
"type": "object",
|
||||
|
Reference in New Issue
Block a user