Update api spec (#391)
* YOYO NEW API SPEC! * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
committed by
GitHub
parent
0ff7b17ce8
commit
ca39f6266a
File diff suppressed because it is too large
Load Diff
@ -36,7 +36,7 @@ from .models import (
|
||||
FileVolume,
|
||||
ImageFormat,
|
||||
ImportFile,
|
||||
InputFormat,
|
||||
InputFormat3d,
|
||||
ModelingCmd,
|
||||
ModelingCmdId,
|
||||
Pong,
|
||||
@ -52,7 +52,7 @@ from .models import (
|
||||
WebSocketRequest,
|
||||
WebSocketResponse,
|
||||
)
|
||||
from .models.input_format import OptionObj
|
||||
from .models.input_format3d import OptionObj
|
||||
from .models.modeling_cmd import (
|
||||
OptionDefaultCameraFocusOn,
|
||||
OptionImportFiles,
|
||||
@ -413,7 +413,7 @@ def test_ws_import():
|
||||
cmd=ModelingCmd(
|
||||
OptionImportFiles(
|
||||
files=[ImportFile(data=content, path=file_name)],
|
||||
format=InputFormat(
|
||||
format=InputFormat3d(
|
||||
OptionObj(
|
||||
units=UnitLength.M,
|
||||
coords=System(
|
||||
|
@ -39,6 +39,7 @@ from .camera_drag_move import CameraDragMove
|
||||
from .camera_drag_start import CameraDragStart
|
||||
from .camera_movement import CameraMovement
|
||||
from .camera_settings import CameraSettings
|
||||
from .camera_view_state import CameraViewState
|
||||
from .card_details import CardDetails
|
||||
from .center_of_mass import CenterOfMass
|
||||
from .client_metrics import ClientMetrics
|
||||
@ -67,10 +68,12 @@ from .default_camera_center_to_scene import DefaultCameraCenterToScene
|
||||
from .default_camera_center_to_selection import DefaultCameraCenterToSelection
|
||||
from .default_camera_focus_on import DefaultCameraFocusOn
|
||||
from .default_camera_get_settings import DefaultCameraGetSettings
|
||||
from .default_camera_get_view import DefaultCameraGetView
|
||||
from .default_camera_look_at import DefaultCameraLookAt
|
||||
from .default_camera_perspective_settings import DefaultCameraPerspectiveSettings
|
||||
from .default_camera_set_orthographic import DefaultCameraSetOrthographic
|
||||
from .default_camera_set_perspective import DefaultCameraSetPerspective
|
||||
from .default_camera_set_view import DefaultCameraSetView
|
||||
from .default_camera_zoom import DefaultCameraZoom
|
||||
from .density import Density
|
||||
from .der_encoded_key_pair import DerEncodedKeyPair
|
||||
@ -83,6 +86,7 @@ from .disable_dry_run import DisableDryRun
|
||||
from .discount import Discount
|
||||
from .discount_code import DiscountCode
|
||||
from .distance_type import DistanceType
|
||||
from .dxf_storage import DxfStorage
|
||||
from .edge_lines_visible import EdgeLinesVisible
|
||||
from .email_authentication_form import EmailAuthenticationForm
|
||||
from .empty import Empty
|
||||
@ -91,6 +95,7 @@ from .enable_sketch_mode import EnableSketchMode
|
||||
from .engine_util_evaluate_path import EngineUtilEvaluatePath
|
||||
from .enterprise_subscription_tier_price import EnterpriseSubscriptionTierPrice
|
||||
from .entity_circular_pattern import EntityCircularPattern
|
||||
from .entity_clone import EntityClone
|
||||
from .entity_fade import EntityFade
|
||||
from .entity_get_all_child_uuids import EntityGetAllChildUuids
|
||||
from .entity_get_child_uuid import EntityGetChildUuid
|
||||
@ -112,6 +117,8 @@ from .error import Error
|
||||
from .error_code import ErrorCode
|
||||
from .event import Event
|
||||
from .export import Export
|
||||
from .export2d import Export2d
|
||||
from .export3d import Export3d
|
||||
from .export_file import ExportFile
|
||||
from .extend_path import ExtendPath
|
||||
from .extended_user import ExtendedUser
|
||||
@ -153,7 +160,7 @@ from .image_format import ImageFormat
|
||||
from .import_file import ImportFile
|
||||
from .import_files import ImportFiles
|
||||
from .imported_geometry import ImportedGeometry
|
||||
from .input_format import InputFormat
|
||||
from .input_format3d import InputFormat3d
|
||||
from .invoice import Invoice
|
||||
from .invoice_line_item import InvoiceLineItem
|
||||
from .invoice_status import InvoiceStatus
|
||||
@ -215,7 +222,8 @@ from .org_role import OrgRole
|
||||
from .orient_to_face import OrientToFace
|
||||
from .origin_type import OriginType
|
||||
from .output_file import OutputFile
|
||||
from .output_format import OutputFormat
|
||||
from .output_format2d import OutputFormat2d
|
||||
from .output_format3d import OutputFormat3d
|
||||
from .path_command import PathCommand
|
||||
from .path_component_constraint_bound import PathComponentConstraintBound
|
||||
from .path_component_constraint_type import PathComponentConstraintType
|
||||
@ -273,6 +281,7 @@ from .session_uuid import SessionUuid
|
||||
from .set_background_color import SetBackgroundColor
|
||||
from .set_current_tool_properties import SetCurrentToolProperties
|
||||
from .set_default_system_properties import SetDefaultSystemProperties
|
||||
from .set_grid_reference_plane import SetGridReferencePlane
|
||||
from .set_object_transform import SetObjectTransform
|
||||
from .set_scene_units import SetSceneUnits
|
||||
from .set_selection_filter import SetSelectionFilter
|
||||
@ -363,6 +372,7 @@ from .view_isometric import ViewIsometric
|
||||
from .volume import Volume
|
||||
from .web_socket_request import WebSocketRequest
|
||||
from .web_socket_response import WebSocketResponse
|
||||
from .world_coordinate_system import WorldCoordinateSystem
|
||||
from .zoo_product_subscription import ZooProductSubscription
|
||||
from .zoo_product_subscriptions import ZooProductSubscriptions
|
||||
from .zoo_product_subscriptions_org_request import ZooProductSubscriptionsOrgRequest
|
||||
|
@ -7,9 +7,9 @@ from typing_extensions import Annotated
|
||||
from ..models.api_call_status import ApiCallStatus
|
||||
from ..models.file_export_format import FileExportFormat
|
||||
from ..models.file_import_format import FileImportFormat
|
||||
from ..models.input_format import InputFormat
|
||||
from ..models.input_format3d import InputFormat3d
|
||||
from ..models.ml_feedback import MlFeedback
|
||||
from ..models.output_format import OutputFormat
|
||||
from ..models.output_format3d import OutputFormat3d
|
||||
from ..models.point3d import Point3d
|
||||
from ..models.source_range_prompt import SourceRangePrompt
|
||||
from ..models.text_to_cad_model import TextToCadModel
|
||||
@ -35,13 +35,13 @@ class OptionFileConversion(BaseModel):
|
||||
|
||||
output_format: FileExportFormat
|
||||
|
||||
output_format_options: Optional[OutputFormat] = None
|
||||
output_format_options: Optional[OutputFormat3d] = None
|
||||
|
||||
outputs: Optional[Dict[str, Base64Data]] = None
|
||||
|
||||
src_format: FileImportFormat
|
||||
|
||||
src_format_options: Optional[InputFormat] = None
|
||||
src_format_options: Optional[InputFormat3d] = None
|
||||
|
||||
started_at: Optional[datetime.datetime] = None
|
||||
|
||||
|
27
kittycad/models/camera_view_state.py
Normal file
27
kittycad/models/camera_view_state.py
Normal file
@ -0,0 +1,27 @@
|
||||
from typing import List
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.world_coordinate_system import WorldCoordinateSystem
|
||||
|
||||
|
||||
class CameraViewState(BaseModel):
|
||||
""""""
|
||||
|
||||
eye_offset: float
|
||||
|
||||
fov_y: float
|
||||
|
||||
is_ortho: bool
|
||||
|
||||
ortho_scale_enabled: bool
|
||||
|
||||
ortho_scale_factor: float
|
||||
|
||||
pivot_position: List[float]
|
||||
|
||||
pivot_rotation: List[float]
|
||||
|
||||
world_coord_system: WorldCoordinateSystem
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
11
kittycad/models/default_camera_get_view.py
Normal file
11
kittycad/models/default_camera_get_view.py
Normal file
@ -0,0 +1,11 @@
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.camera_view_state import CameraViewState
|
||||
|
||||
|
||||
class DefaultCameraGetView(BaseModel):
|
||||
"""The response from the `DefaultCameraGetView` command."""
|
||||
|
||||
view: CameraViewState
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
7
kittycad/models/default_camera_set_view.py
Normal file
7
kittycad/models/default_camera_set_view.py
Normal file
@ -0,0 +1,7 @@
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
class DefaultCameraSetView(BaseModel):
|
||||
"""The response from the `DefaultCameraSetView` command."""
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
15
kittycad/models/dxf_storage.py
Normal file
15
kittycad/models/dxf_storage.py
Normal file
@ -0,0 +1,15 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class DxfStorage(str, Enum):
|
||||
"""Export storage.""" # noqa: E501
|
||||
|
||||
"""# Plaintext encoding.
|
||||
|
||||
This is the default setting. """ # noqa: E501
|
||||
ASCII = "ascii"
|
||||
"""# Binary encoding. """ # noqa: E501
|
||||
BINARY = "binary"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
7
kittycad/models/entity_clone.py
Normal file
7
kittycad/models/entity_clone.py
Normal file
@ -0,0 +1,7 @@
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
class EntityClone(BaseModel):
|
||||
"""The response from the `EntityClone` command."""
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
13
kittycad/models/export2d.py
Normal file
13
kittycad/models/export2d.py
Normal file
@ -0,0 +1,13 @@
|
||||
from typing import List
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.export_file import ExportFile
|
||||
|
||||
|
||||
class Export2d(BaseModel):
|
||||
"""The response from the `Export2d` endpoint."""
|
||||
|
||||
files: List[ExportFile]
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
13
kittycad/models/export3d.py
Normal file
13
kittycad/models/export3d.py
Normal file
@ -0,0 +1,13 @@
|
||||
from typing import List
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.export_file import ExportFile
|
||||
|
||||
|
||||
class Export3d(BaseModel):
|
||||
"""The response from the `Export3d` endpoint."""
|
||||
|
||||
files: List[ExportFile]
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
@ -6,8 +6,8 @@ from pydantic import BaseModel, ConfigDict
|
||||
from ..models.api_call_status import ApiCallStatus
|
||||
from ..models.file_export_format import FileExportFormat
|
||||
from ..models.file_import_format import FileImportFormat
|
||||
from ..models.input_format import InputFormat
|
||||
from ..models.output_format import OutputFormat
|
||||
from ..models.input_format3d import InputFormat3d
|
||||
from ..models.output_format3d import OutputFormat3d
|
||||
from ..models.uuid import Uuid
|
||||
from .base64data import Base64Data
|
||||
|
||||
@ -25,13 +25,13 @@ class FileConversion(BaseModel):
|
||||
|
||||
output_format: FileExportFormat
|
||||
|
||||
output_format_options: Optional[OutputFormat] = None
|
||||
output_format_options: Optional[OutputFormat3d] = None
|
||||
|
||||
outputs: Optional[Dict[str, Base64Data]] = None
|
||||
|
||||
src_format: FileImportFormat
|
||||
|
||||
src_format_options: Optional[InputFormat] = None
|
||||
src_format_options: Optional[InputFormat3d] = None
|
||||
|
||||
started_at: Optional[datetime.datetime] = None
|
||||
|
||||
|
@ -79,7 +79,7 @@ class OptionStl(BaseModel):
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
InputFormat = RootModel[
|
||||
InputFormat3d = RootModel[
|
||||
Annotated[
|
||||
Union[
|
||||
OptionFbx,
|
@ -8,6 +8,7 @@ from ..models.annotation_options import AnnotationOptions
|
||||
from ..models.annotation_type import AnnotationType
|
||||
from ..models.camera_drag_interaction_type import CameraDragInteractionType
|
||||
from ..models.camera_movement import CameraMovement
|
||||
from ..models.camera_view_state import CameraViewState
|
||||
from ..models.color import Color
|
||||
from ..models.component_transform import ComponentTransform
|
||||
from ..models.cut_type import CutType
|
||||
@ -16,10 +17,11 @@ from ..models.entity_type import EntityType
|
||||
from ..models.extruded_face_info import ExtrudedFaceInfo
|
||||
from ..models.image_format import ImageFormat
|
||||
from ..models.import_file import ImportFile
|
||||
from ..models.input_format import InputFormat
|
||||
from ..models.input_format3d import InputFormat3d
|
||||
from ..models.length_unit import LengthUnit
|
||||
from ..models.modeling_cmd_id import ModelingCmdId
|
||||
from ..models.output_format import OutputFormat
|
||||
from ..models.output_format2d import OutputFormat2d
|
||||
from ..models.output_format3d import OutputFormat3d
|
||||
from ..models.path_component_constraint_bound import PathComponentConstraintBound
|
||||
from ..models.path_component_constraint_type import PathComponentConstraintType
|
||||
from ..models.path_segment import PathSegment
|
||||
@ -236,6 +238,24 @@ class OptionDefaultCameraGetSettings(BaseModel):
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionDefaultCameraGetView(BaseModel):
|
||||
"""Gets the default camera's view state"""
|
||||
|
||||
type: Literal["default_camera_get_view"] = "default_camera_get_view"
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionDefaultCameraSetView(BaseModel):
|
||||
"""Sets the default camera's view state"""
|
||||
|
||||
type: Literal["default_camera_set_view"] = "default_camera_set_view"
|
||||
|
||||
view: CameraViewState
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionDefaultCameraLookAt(BaseModel):
|
||||
"""Change what the default camera is looking at."""
|
||||
|
||||
@ -286,12 +306,36 @@ class OptionDefaultCameraZoom(BaseModel):
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionExport2D(BaseModel):
|
||||
"""Export a sketch to a file."""
|
||||
|
||||
entity_ids: List[str]
|
||||
|
||||
format: OutputFormat2d
|
||||
|
||||
type: Literal["export2d"] = "export2d"
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionExport3D(BaseModel):
|
||||
"""Export the scene to a file."""
|
||||
|
||||
entity_ids: List[str]
|
||||
|
||||
format: OutputFormat3d
|
||||
|
||||
type: Literal["export3d"] = "export3d"
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionExport(BaseModel):
|
||||
"""Export the scene to a file."""
|
||||
|
||||
entity_ids: List[str]
|
||||
|
||||
format: OutputFormat
|
||||
format: OutputFormat3d
|
||||
|
||||
type: Literal["export"] = "export"
|
||||
|
||||
@ -364,6 +408,16 @@ class OptionEntityGetDistance(BaseModel):
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionEntityClone(BaseModel):
|
||||
"""Create a pattern using this entity by specifying the transform for each desired repetition. Transformations are performed in the following order (first applied to last applied): scale, rotate, translate."""
|
||||
|
||||
entity_id: str
|
||||
|
||||
type: Literal["entity_clone"] = "entity_clone"
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionEntityLinearPatternTransform(BaseModel):
|
||||
"""Create a pattern using this entity by specifying the transform for each desired repetition. Transformations are performed in the following order (first applied to last applied): scale, rotate, translate."""
|
||||
|
||||
@ -1221,7 +1275,7 @@ class OptionImportFiles(BaseModel):
|
||||
|
||||
files: List[ImportFile]
|
||||
|
||||
format: InputFormat
|
||||
format: InputFormat3d
|
||||
|
||||
type: Literal["import_files"] = "import_files"
|
||||
|
||||
@ -1488,6 +1542,18 @@ class OptionAddHoleFromOffset(BaseModel):
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionSetGridReferencePlane(BaseModel):
|
||||
"""Align the grid with a plane or a planar face."""
|
||||
|
||||
grid_id: str
|
||||
|
||||
reference_id: str
|
||||
|
||||
type: Literal["set_grid_reference_plane"] = "set_grid_reference_plane"
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
ModelingCmd = RootModel[
|
||||
Annotated[
|
||||
Union[
|
||||
@ -1506,9 +1572,13 @@ ModelingCmd = RootModel[
|
||||
OptionCameraDragMove,
|
||||
OptionCameraDragEnd,
|
||||
OptionDefaultCameraGetSettings,
|
||||
OptionDefaultCameraGetView,
|
||||
OptionDefaultCameraSetView,
|
||||
OptionDefaultCameraLookAt,
|
||||
OptionDefaultCameraPerspectiveSettings,
|
||||
OptionDefaultCameraZoom,
|
||||
OptionExport2D,
|
||||
OptionExport3D,
|
||||
OptionExport,
|
||||
OptionEntityGetParentId,
|
||||
OptionEntityGetNumChildren,
|
||||
@ -1516,6 +1586,7 @@ ModelingCmd = RootModel[
|
||||
OptionEntityGetAllChildUuids,
|
||||
OptionEntityGetSketchPaths,
|
||||
OptionEntityGetDistance,
|
||||
OptionEntityClone,
|
||||
OptionEntityLinearPatternTransform,
|
||||
OptionEntityLinearPattern,
|
||||
OptionEntityCircularPattern,
|
||||
@ -1609,6 +1680,7 @@ ModelingCmd = RootModel[
|
||||
OptionSetObjectTransform,
|
||||
OptionMakeOffsetPath,
|
||||
OptionAddHoleFromOffset,
|
||||
OptionSetGridReferencePlane,
|
||||
],
|
||||
Field(discriminator="type"),
|
||||
]
|
||||
|
@ -17,12 +17,14 @@ from ..models.default_camera_center_to_scene import DefaultCameraCenterToScene
|
||||
from ..models.default_camera_center_to_selection import DefaultCameraCenterToSelection
|
||||
from ..models.default_camera_focus_on import DefaultCameraFocusOn
|
||||
from ..models.default_camera_get_settings import DefaultCameraGetSettings
|
||||
from ..models.default_camera_get_view import DefaultCameraGetView
|
||||
from ..models.default_camera_look_at import DefaultCameraLookAt
|
||||
from ..models.default_camera_perspective_settings import (
|
||||
DefaultCameraPerspectiveSettings,
|
||||
)
|
||||
from ..models.default_camera_set_orthographic import DefaultCameraSetOrthographic
|
||||
from ..models.default_camera_set_perspective import DefaultCameraSetPerspective
|
||||
from ..models.default_camera_set_view import DefaultCameraSetView
|
||||
from ..models.default_camera_zoom import DefaultCameraZoom
|
||||
from ..models.density import Density
|
||||
from ..models.disable_dry_run import DisableDryRun
|
||||
@ -31,6 +33,7 @@ from ..models.enable_dry_run import EnableDryRun
|
||||
from ..models.enable_sketch_mode import EnableSketchMode
|
||||
from ..models.engine_util_evaluate_path import EngineUtilEvaluatePath
|
||||
from ..models.entity_circular_pattern import EntityCircularPattern
|
||||
from ..models.entity_clone import EntityClone
|
||||
from ..models.entity_fade import EntityFade
|
||||
from ..models.entity_get_all_child_uuids import EntityGetAllChildUuids
|
||||
from ..models.entity_get_child_uuid import EntityGetChildUuid
|
||||
@ -47,6 +50,8 @@ from ..models.entity_mirror import EntityMirror
|
||||
from ..models.entity_mirror_across_edge import EntityMirrorAcrossEdge
|
||||
from ..models.entity_set_opacity import EntitySetOpacity
|
||||
from ..models.export import Export
|
||||
from ..models.export2d import Export2d
|
||||
from ..models.export3d import Export3d
|
||||
from ..models.extend_path import ExtendPath
|
||||
from ..models.extrude import Extrude
|
||||
from ..models.extrusion_face_info import ExtrusionFaceInfo
|
||||
@ -102,6 +107,7 @@ from ..models.send_object import SendObject
|
||||
from ..models.set_background_color import SetBackgroundColor
|
||||
from ..models.set_current_tool_properties import SetCurrentToolProperties
|
||||
from ..models.set_default_system_properties import SetDefaultSystemProperties
|
||||
from ..models.set_grid_reference_plane import SetGridReferencePlane
|
||||
from ..models.set_object_transform import SetObjectTransform
|
||||
from ..models.set_scene_units import SetSceneUnits
|
||||
from ..models.set_selection_filter import SetSelectionFilter
|
||||
@ -680,6 +686,26 @@ class OptionSelectClear(BaseModel):
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionExport2D(BaseModel):
|
||||
""""""
|
||||
|
||||
data: Export2d
|
||||
|
||||
type: Literal["export2d"] = "export2d"
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionExport3D(BaseModel):
|
||||
""""""
|
||||
|
||||
data: Export3d
|
||||
|
||||
type: Literal["export3d"] = "export3d"
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionExport(BaseModel):
|
||||
""""""
|
||||
|
||||
@ -810,6 +836,26 @@ class OptionDefaultCameraGetSettings(BaseModel):
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionDefaultCameraGetView(BaseModel):
|
||||
""""""
|
||||
|
||||
data: DefaultCameraGetView
|
||||
|
||||
type: Literal["default_camera_get_view"] = "default_camera_get_view"
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionDefaultCameraSetView(BaseModel):
|
||||
""""""
|
||||
|
||||
data: DefaultCameraSetView
|
||||
|
||||
type: Literal["default_camera_set_view"] = "default_camera_set_view"
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionDefaultCameraZoom(BaseModel):
|
||||
""""""
|
||||
|
||||
@ -1252,6 +1298,16 @@ class OptionEntityGetDistance(BaseModel):
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionEntityClone(BaseModel):
|
||||
""""""
|
||||
|
||||
data: EntityClone
|
||||
|
||||
type: Literal["entity_clone"] = "entity_clone"
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionEntityLinearPatternTransform(BaseModel):
|
||||
""""""
|
||||
|
||||
@ -1352,6 +1408,16 @@ class OptionExtrusionFaceInfo(BaseModel):
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionSetGridReferencePlane(BaseModel):
|
||||
""""""
|
||||
|
||||
data: SetGridReferencePlane
|
||||
|
||||
type: Literal["set_grid_reference_plane"] = "set_grid_reference_plane"
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
OkModelingCmdResponse = RootModel[
|
||||
Annotated[
|
||||
Union[
|
||||
@ -1410,6 +1476,8 @@ OkModelingCmdResponse = RootModel[
|
||||
OptionDefaultCameraCenterToSelection,
|
||||
OptionDefaultCameraCenterToScene,
|
||||
OptionSelectClear,
|
||||
OptionExport2D,
|
||||
OptionExport3D,
|
||||
OptionExport,
|
||||
OptionSelectWithPoint,
|
||||
OptionHighlightSetEntity,
|
||||
@ -1423,6 +1491,8 @@ OkModelingCmdResponse = RootModel[
|
||||
OptionCameraDragMove,
|
||||
OptionCameraDragEnd,
|
||||
OptionDefaultCameraGetSettings,
|
||||
OptionDefaultCameraGetView,
|
||||
OptionDefaultCameraSetView,
|
||||
OptionDefaultCameraZoom,
|
||||
OptionZoomToFit,
|
||||
OptionOrientToFace,
|
||||
@ -1467,6 +1537,7 @@ OkModelingCmdResponse = RootModel[
|
||||
OptionCenterOfMass,
|
||||
OptionGetSketchModePlane,
|
||||
OptionEntityGetDistance,
|
||||
OptionEntityClone,
|
||||
OptionEntityLinearPatternTransform,
|
||||
OptionEntityLinearPattern,
|
||||
OptionEntityCircularPattern,
|
||||
@ -1477,6 +1548,7 @@ OkModelingCmdResponse = RootModel[
|
||||
OptionEntityMakeHelixFromEdge,
|
||||
OptionSolid3DGetExtrusionFaceInfo,
|
||||
OptionExtrusionFaceInfo,
|
||||
OptionSetGridReferencePlane,
|
||||
],
|
||||
Field(discriminator="type"),
|
||||
]
|
||||
|
23
kittycad/models/output_format2d.py
Normal file
23
kittycad/models/output_format2d.py
Normal file
@ -0,0 +1,23 @@
|
||||
from typing import Literal, Union
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, RootModel
|
||||
from typing_extensions import Annotated
|
||||
|
||||
|
||||
class DxfData(BaseModel):
|
||||
"""Export storage."""
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionDxf(BaseModel):
|
||||
"""AutoCAD drawing interchange format."""
|
||||
|
||||
storage: DxfData
|
||||
|
||||
type: Literal["dxf"] = "dxf"
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
OutputFormat2d = RootModel[Annotated[Union[OptionDxf,], Field(discriminator="type")]]
|
@ -89,7 +89,7 @@ class OptionStl(BaseModel):
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
OutputFormat = RootModel[
|
||||
OutputFormat3d = RootModel[
|
||||
Annotated[
|
||||
Union[
|
||||
OptionFbx,
|
7
kittycad/models/set_grid_reference_plane.py
Normal file
7
kittycad/models/set_grid_reference_plane.py
Normal file
@ -0,0 +1,7 @@
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
class SetGridReferencePlane(BaseModel):
|
||||
"""The response from the 'SetGridReferencePlane'."""
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
9
kittycad/models/world_coordinate_system.py
Normal file
9
kittycad/models/world_coordinate_system.py
Normal file
@ -0,0 +1,9 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class WorldCoordinateSystem(str, Enum):
|
||||
RIGHT_HANDED_UP_Z = "right_handed_up_z"
|
||||
RIGHT_HANDED_UP_Y = "right_handed_up_y"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
449
spec.json
449
spec.json
@ -15725,7 +15725,7 @@
|
||||
"description": "The output format options of the file conversion.",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/OutputFormat"
|
||||
"$ref": "#/components/schemas/OutputFormat3d"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -15751,7 +15751,7 @@
|
||||
"description": "The source format options of the file conversion.",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/InputFormat"
|
||||
"$ref": "#/components/schemas/InputFormat3d"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -17102,6 +17102,60 @@
|
||||
"up"
|
||||
]
|
||||
},
|
||||
"CameraViewState": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"eye_offset": {
|
||||
"type": "number",
|
||||
"format": "float"
|
||||
},
|
||||
"fov_y": {
|
||||
"type": "number",
|
||||
"format": "float"
|
||||
},
|
||||
"is_ortho": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"ortho_scale_enabled": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"ortho_scale_factor": {
|
||||
"type": "number",
|
||||
"format": "float"
|
||||
},
|
||||
"pivot_position": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "float"
|
||||
},
|
||||
"minItems": 3,
|
||||
"maxItems": 3
|
||||
},
|
||||
"pivot_rotation": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "float"
|
||||
},
|
||||
"minItems": 4,
|
||||
"maxItems": 4
|
||||
},
|
||||
"world_coord_system": {
|
||||
"$ref": "#/components/schemas/WorldCoordinateSystem"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"eye_offset",
|
||||
"fov_y",
|
||||
"is_ortho",
|
||||
"ortho_scale_enabled",
|
||||
"ortho_scale_factor",
|
||||
"pivot_position",
|
||||
"pivot_rotation",
|
||||
"world_coord_system"
|
||||
]
|
||||
},
|
||||
"CardDetails": {
|
||||
"description": "The card details of a payment method.",
|
||||
"type": "object",
|
||||
@ -18143,6 +18197,23 @@
|
||||
"settings"
|
||||
]
|
||||
},
|
||||
"DefaultCameraGetView": {
|
||||
"description": "The response from the `DefaultCameraGetView` command.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"view": {
|
||||
"description": "Camera view state",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/CameraViewState"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"view"
|
||||
]
|
||||
},
|
||||
"DefaultCameraLookAt": {
|
||||
"description": "The response from the `DefaultCameraLookAt` endpoint.",
|
||||
"type": "object"
|
||||
@ -18159,6 +18230,10 @@
|
||||
"description": "The response from the `DefaultCameraSetPerspective` endpoint.",
|
||||
"type": "object"
|
||||
},
|
||||
"DefaultCameraSetView": {
|
||||
"description": "The response from the `DefaultCameraSetView` command.",
|
||||
"type": "object"
|
||||
},
|
||||
"DefaultCameraZoom": {
|
||||
"description": "The response from the `DefaultCameraZoom` command.",
|
||||
"type": "object",
|
||||
@ -18391,6 +18466,25 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"DxfStorage": {
|
||||
"description": "Export storage.",
|
||||
"oneOf": [
|
||||
{
|
||||
"description": "Plaintext encoding.\n\nThis is the default setting.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"ascii"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Binary encoding.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"binary"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"EdgeLinesVisible": {
|
||||
"description": "The response from the `EdgeLinesVisible` endpoint.",
|
||||
"type": "object"
|
||||
@ -18524,6 +18618,10 @@
|
||||
"entity_ids"
|
||||
]
|
||||
},
|
||||
"EntityClone": {
|
||||
"description": "The response from the `EntityClone` command.",
|
||||
"type": "object"
|
||||
},
|
||||
"EntityFade": {
|
||||
"description": "The response from the `EntityFade` endpoint.",
|
||||
"type": "object"
|
||||
@ -18941,6 +19039,38 @@
|
||||
"files"
|
||||
]
|
||||
},
|
||||
"Export2d": {
|
||||
"description": "The response from the `Export2d` endpoint.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"files": {
|
||||
"description": "The files that were exported.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/ExportFile"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"files"
|
||||
]
|
||||
},
|
||||
"Export3d": {
|
||||
"description": "The response from the `Export3d` endpoint.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"files": {
|
||||
"description": "The files that were exported.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/ExportFile"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"files"
|
||||
]
|
||||
},
|
||||
"ExportFile": {
|
||||
"description": "A file to be exported to the client.",
|
||||
"type": "object",
|
||||
@ -19485,7 +19615,7 @@
|
||||
"description": "The output format options of the file conversion.",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/OutputFormat"
|
||||
"$ref": "#/components/schemas/OutputFormat3d"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -19511,7 +19641,7 @@
|
||||
"description": "The source format options of the file conversion.",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/InputFormat"
|
||||
"$ref": "#/components/schemas/InputFormat3d"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -20443,7 +20573,7 @@
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"InputFormat": {
|
||||
"InputFormat3d": {
|
||||
"description": "Input format specifier.",
|
||||
"oneOf": [
|
||||
{
|
||||
@ -22463,6 +22593,45 @@
|
||||
"type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Gets the default camera's view state",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"default_camera_get_view"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Sets the default camera's view state",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"default_camera_set_view"
|
||||
]
|
||||
},
|
||||
"view": {
|
||||
"description": "Camera view state",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/CameraViewState"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type",
|
||||
"view"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Change what the default camera is looking at.",
|
||||
"type": "object",
|
||||
@ -22600,6 +22769,39 @@
|
||||
"type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Export a sketch to a file.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"entity_ids": {
|
||||
"description": "IDs of the entities to be exported.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
}
|
||||
},
|
||||
"format": {
|
||||
"description": "The file format to export to.",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/OutputFormat2d"
|
||||
}
|
||||
]
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"export2d"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"entity_ids",
|
||||
"format",
|
||||
"type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Export the scene to a file.",
|
||||
"type": "object",
|
||||
@ -22616,7 +22818,40 @@
|
||||
"description": "The file format to export to.",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/OutputFormat"
|
||||
"$ref": "#/components/schemas/OutputFormat3d"
|
||||
}
|
||||
]
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"export3d"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"entity_ids",
|
||||
"format",
|
||||
"type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Export the scene to a file.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"entity_ids": {
|
||||
"description": "IDs of the entities to be exported. If this is empty, then all entities are exported.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
}
|
||||
},
|
||||
"format": {
|
||||
"description": "The file format to export to.",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/OutputFormat3d"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -22781,6 +23016,27 @@
|
||||
"type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Create a pattern using this entity by specifying the transform for each desired repetition. Transformations are performed in the following order (first applied to last applied): scale, rotate, translate.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"entity_id": {
|
||||
"description": "ID of the entity being cloned.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"entity_clone"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"entity_id",
|
||||
"type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Create a pattern using this entity by specifying the transform for each desired repetition. Transformations are performed in the following order (first applied to last applied): scale, rotate, translate.",
|
||||
"type": "object",
|
||||
@ -24909,7 +25165,7 @@
|
||||
"description": "Input file format.",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/InputFormat"
|
||||
"$ref": "#/components/schemas/InputFormat3d"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -25554,6 +25810,33 @@
|
||||
"offset",
|
||||
"type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Align the grid with a plane or a planar face.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"grid_id": {
|
||||
"description": "The grid to be moved.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"reference_id": {
|
||||
"description": "The plane or face that the grid will be aligned to. If a face, it must be planar to succeed.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"set_grid_reference_plane"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"grid_id",
|
||||
"reference_id",
|
||||
"type"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -26672,6 +26955,42 @@
|
||||
"type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/components/schemas/Export2d"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"export2d"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"data",
|
||||
"type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/components/schemas/Export3d"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"export3d"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"data",
|
||||
"type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@ -26906,6 +27225,42 @@
|
||||
"type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/components/schemas/DefaultCameraGetView"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"default_camera_get_view"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"data",
|
||||
"type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/components/schemas/DefaultCameraSetView"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"default_camera_set_view"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"data",
|
||||
"type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@ -27698,6 +28053,24 @@
|
||||
"type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/components/schemas/EntityClone"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"entity_clone"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"data",
|
||||
"type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@ -27877,6 +28250,24 @@
|
||||
"data",
|
||||
"type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/components/schemas/SetGridReferencePlane"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"set_grid_reference_plane"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"data",
|
||||
"type"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -28551,8 +28942,37 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"OutputFormat": {
|
||||
"description": "Output format specifier.",
|
||||
"OutputFormat2d": {
|
||||
"description": "Output 2D format specifier.",
|
||||
"oneOf": [
|
||||
{
|
||||
"description": "AutoCAD drawing interchange format.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"storage": {
|
||||
"description": "Export storage.",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/DxfStorage"
|
||||
}
|
||||
]
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"dxf"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"storage",
|
||||
"type"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"OutputFormat3d": {
|
||||
"description": "Output 3D format specifier.",
|
||||
"oneOf": [
|
||||
{
|
||||
"description": "Autodesk Filmbox (FBX) format.",
|
||||
@ -30118,6 +30538,10 @@
|
||||
"description": "The response from the `SetDefaultSystemProperties` endpoint.",
|
||||
"type": "object"
|
||||
},
|
||||
"SetGridReferencePlane": {
|
||||
"description": "The response from the 'SetGridReferencePlane'.",
|
||||
"type": "object"
|
||||
},
|
||||
"SetObjectTransform": {
|
||||
"description": "The response from the `SetObjectTransform` command.",
|
||||
"type": "object"
|
||||
@ -33855,6 +34279,13 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"WorldCoordinateSystem": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"right_handed_up_z",
|
||||
"right_handed_up_y"
|
||||
]
|
||||
},
|
||||
"ZooProductSubscription": {
|
||||
"description": "A Zoo product subscription.",
|
||||
"oneOf": [
|
||||
|
Reference in New Issue
Block a user