Update api spec (#337)
* 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
7153c7ab17
commit
d25fc283e9
@ -295,6 +295,7 @@ from .subscription_training_data_behavior import SubscriptionTrainingDataBehavio
|
||||
from .success_web_socket_response import SuccessWebSocketResponse
|
||||
from .support_tier import SupportTier
|
||||
from .surface_area import SurfaceArea
|
||||
from .sweep import Sweep
|
||||
from .system import System
|
||||
from .take_snapshot import TakeSnapshot
|
||||
from .text_to_cad import TextToCad
|
||||
|
@ -6,8 +6,10 @@ class CameraDragInteractionType(str, Enum):
|
||||
|
||||
"""# Camera pan """ # noqa: E501
|
||||
PAN = "pan"
|
||||
"""# Camera rotate (revolve/orbit) """ # noqa: E501
|
||||
"""# Camera rotate (spherical camera revolve/orbit) """ # noqa: E501
|
||||
ROTATE = "rotate"
|
||||
"""# Camera rotate (trackball with 3 degrees of freedom) """ # noqa: E501
|
||||
ROTATETRACKBALL = "rotatetrackball"
|
||||
"""# Camera zoom (increase or decrease distance to reference point center) """ # noqa: E501
|
||||
ZOOM = "zoom"
|
||||
|
||||
|
@ -10,6 +10,8 @@ class ExtrusionFaceCapType(str, Enum):
|
||||
TOP = "top"
|
||||
"""# Capped below. """ # noqa: E501
|
||||
BOTTOM = "bottom"
|
||||
"""# Capped on both ends. """ # noqa: E501
|
||||
BOTH = "both"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
|
@ -90,6 +90,22 @@ class OptionExtrude(BaseModel):
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionSweep(BaseModel):
|
||||
"""Extrude the object along a path."""
|
||||
|
||||
sectional: bool
|
||||
|
||||
target: ModelingCmdId
|
||||
|
||||
tolerance: LengthUnit
|
||||
|
||||
trajectory: ModelingCmdId
|
||||
|
||||
type: Literal["sweep"] = "sweep"
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionRevolve(BaseModel):
|
||||
"""Command for revolving a solid 2d."""
|
||||
|
||||
@ -349,7 +365,9 @@ class OptionEntityLinearPatternTransform(BaseModel):
|
||||
|
||||
entity_id: str
|
||||
|
||||
transform: List[Transform]
|
||||
transform: List[Transform] = []
|
||||
|
||||
transforms: List[List[Transform]] = []
|
||||
|
||||
type: Literal["entity_linear_pattern_transform"] = "entity_linear_pattern_transform"
|
||||
|
||||
@ -1366,6 +1384,7 @@ ModelingCmd = RootModel[
|
||||
OptionMovePathPen,
|
||||
OptionExtendPath,
|
||||
OptionExtrude,
|
||||
OptionSweep,
|
||||
OptionRevolve,
|
||||
OptionSolid3DShellFace,
|
||||
OptionRevolveAboutEdge,
|
||||
|
@ -113,6 +113,7 @@ from ..models.solid3d_get_prev_adjacent_edge import Solid3dGetPrevAdjacentEdge
|
||||
from ..models.solid3d_shell_face import Solid3dShellFace
|
||||
from ..models.start_path import StartPath
|
||||
from ..models.surface_area import SurfaceArea
|
||||
from ..models.sweep import Sweep
|
||||
from ..models.take_snapshot import TakeSnapshot
|
||||
from ..models.update_annotation import UpdateAnnotation
|
||||
from ..models.view_isometric import ViewIsometric
|
||||
@ -178,6 +179,16 @@ class OptionExtrude(BaseModel):
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionSweep(BaseModel):
|
||||
""""""
|
||||
|
||||
data: Sweep
|
||||
|
||||
type: Literal["sweep"] = "sweep"
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionRevolve(BaseModel):
|
||||
""""""
|
||||
|
||||
@ -1273,6 +1284,7 @@ OkModelingCmdResponse = RootModel[
|
||||
OptionMovePathPen,
|
||||
OptionExtendPath,
|
||||
OptionExtrude,
|
||||
OptionSweep,
|
||||
OptionRevolve,
|
||||
OptionSolid3DShellFace,
|
||||
OptionRevolveAboutEdge,
|
||||
|
7
kittycad/models/sweep.py
Normal file
7
kittycad/models/sweep.py
Normal file
@ -0,0 +1,7 @@
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
class Sweep(BaseModel):
|
||||
"""The response from the `Sweep` endpoint."""
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
Reference in New Issue
Block a user