Update api spec (#379)

* 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:
zoo-github-actions-auth[bot]
2025-02-12 16:33:01 -08:00
committed by GitHub
parent 1ea1bb98a9
commit 109984c9e6
8 changed files with 951 additions and 831 deletions

File diff suppressed because it is too large Load Diff

View File

@ -212,6 +212,7 @@ from .org_member import OrgMember
from .org_member_results_page import OrgMemberResultsPage from .org_member_results_page import OrgMemberResultsPage
from .org_results_page import OrgResultsPage from .org_results_page import OrgResultsPage
from .org_role import OrgRole from .org_role import OrgRole
from .orient_to_face import OrientToFace
from .origin_type import OriginType from .origin_type import OriginType
from .output_file import OutputFile from .output_file import OutputFile
from .output_format import OutputFormat from .output_format import OutputFormat

View File

@ -229,6 +229,8 @@ class OptionTextToCad(BaseModel):
id: Uuid id: Uuid
kcl_version: Optional[str] = None
model: TextToCadModel model: TextToCadModel
model_version: str model_version: str

View File

@ -1390,6 +1390,20 @@ class OptionZoomToFit(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class OptionOrientToFace(BaseModel):
"""Looks along the normal of the specified face (if it is planar!), and fits the view to it."""
animated: bool = False
face_id: str
padding: float = 0.0
type: Literal["orient_to_face"] = "orient_to_face"
model_config = ConfigDict(protected_namespaces=())
class OptionViewIsometric(BaseModel): class OptionViewIsometric(BaseModel):
"""Fit the view to the scene with an isometric view.""" """Fit the view to the scene with an isometric view."""
@ -1586,6 +1600,7 @@ ModelingCmd = RootModel[
OptionDefaultCameraCenterToSelection, OptionDefaultCameraCenterToSelection,
OptionDefaultCameraCenterToScene, OptionDefaultCameraCenterToScene,
OptionZoomToFit, OptionZoomToFit,
OptionOrientToFace,
OptionViewIsometric, OptionViewIsometric,
OptionSolid3DGetExtrusionFaceInfo, OptionSolid3DGetExtrusionFaceInfo,
OptionSelectClear, OptionSelectClear,

View File

@ -76,6 +76,7 @@ from ..models.new_annotation import NewAnnotation
from ..models.object_bring_to_front import ObjectBringToFront from ..models.object_bring_to_front import ObjectBringToFront
from ..models.object_set_material_params_pbr import ObjectSetMaterialParamsPbr from ..models.object_set_material_params_pbr import ObjectSetMaterialParamsPbr
from ..models.object_visible import ObjectVisible from ..models.object_visible import ObjectVisible
from ..models.orient_to_face import OrientToFace
from ..models.path_get_curve_uuid import PathGetCurveUuid from ..models.path_get_curve_uuid import PathGetCurveUuid
from ..models.path_get_curve_uuids_for_vertices import PathGetCurveUuidsForVertices from ..models.path_get_curve_uuids_for_vertices import PathGetCurveUuidsForVertices
from ..models.path_get_info import PathGetInfo from ..models.path_get_info import PathGetInfo
@ -829,6 +830,16 @@ class OptionZoomToFit(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class OptionOrientToFace(BaseModel):
""""""
data: OrientToFace
type: Literal["orient_to_face"] = "orient_to_face"
model_config = ConfigDict(protected_namespaces=())
class OptionViewIsometric(BaseModel): class OptionViewIsometric(BaseModel):
"""""" """"""
@ -1414,6 +1425,7 @@ OkModelingCmdResponse = RootModel[
OptionDefaultCameraGetSettings, OptionDefaultCameraGetSettings,
OptionDefaultCameraZoom, OptionDefaultCameraZoom,
OptionZoomToFit, OptionZoomToFit,
OptionOrientToFace,
OptionViewIsometric, OptionViewIsometric,
OptionGetNumObjects, OptionGetNumObjects,
OptionMakeOffsetPath, OptionMakeOffsetPath,

View File

@ -0,0 +1,11 @@
from pydantic import BaseModel, ConfigDict
from ..models.camera_settings import CameraSettings
class OrientToFace(BaseModel):
"""The response from the `OrientToFace` command."""
settings: CameraSettings
model_config = ConfigDict(protected_namespaces=())

View File

@ -26,6 +26,8 @@ class TextToCad(BaseModel):
id: Uuid id: Uuid
kcl_version: Optional[str] = None
model: TextToCadModel model: TextToCadModel
model_version: str model_version: str

View File

@ -16368,6 +16368,11 @@
} }
] ]
}, },
"kcl_version": {
"nullable": true,
"description": "The version of kcl requested.",
"type": "string"
},
"model": { "model": {
"description": "The model being used.", "description": "The model being used.",
"allOf": [ "allOf": [
@ -25324,6 +25329,38 @@
"type" "type"
] ]
}, },
{
"description": "Looks along the normal of the specified face (if it is planar!), and fits the view to it.",
"type": "object",
"properties": {
"animated": {
"description": "Whether or not to animate the camera movement. (Animation is currently not supported.)",
"default": false,
"type": "boolean"
},
"face_id": {
"description": "Which face to orient camera to. If the face is not planar, no action will occur.",
"type": "string",
"format": "uuid"
},
"padding": {
"description": "How much to pad the view frame by, as a fraction of the face bounding box size. Negative padding will crop the view of the face proportionally. e.g. padding = 0.2 means the view will span 120% of the face bounding box, and padding = -0.2 means the view will span 80% of the face bounding box.",
"default": 0.0,
"type": "number",
"format": "float"
},
"type": {
"type": "string",
"enum": [
"orient_to_face"
]
}
},
"required": [
"face_id",
"type"
]
},
{ {
"description": "Fit the view to the scene with an isometric view.", "description": "Fit the view to the scene with an isometric view.",
"type": "object", "type": "object",
@ -26899,6 +26936,24 @@
"type" "type"
] ]
}, },
{
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/OrientToFace"
},
"type": {
"type": "string",
"enum": [
"orient_to_face"
]
}
},
"required": [
"data",
"type"
]
},
{ {
"type": "object", "type": "object",
"properties": { "properties": {
@ -28398,6 +28453,23 @@
} }
] ]
}, },
"OrientToFace": {
"description": "The response from the `OrientToFace` command.",
"type": "object",
"properties": {
"settings": {
"description": "Camera settings",
"allOf": [
{
"$ref": "#/components/schemas/CameraSettings"
}
]
}
},
"required": [
"settings"
]
},
"OriginType": { "OriginType": {
"description": "The type of origin", "description": "The type of origin",
"oneOf": [ "oneOf": [
@ -30737,6 +30809,11 @@
} }
] ]
}, },
"kcl_version": {
"nullable": true,
"description": "The version of kcl requested.",
"type": "string"
},
"model": { "model": {
"description": "The model being used.", "description": "The model being used.",
"allOf": [ "allOf": [