Update api spec (#229)
* 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
bfb243c233
commit
f80767454a
File diff suppressed because it is too large
Load Diff
@ -80,6 +80,7 @@ from .entity_get_distance import EntityGetDistance
|
||||
from .entity_get_num_children import EntityGetNumChildren
|
||||
from .entity_get_parent_id import EntityGetParentId
|
||||
from .entity_linear_pattern import EntityLinearPattern
|
||||
from .entity_linear_pattern_transform import EntityLinearPatternTransform
|
||||
from .entity_type import EntityType
|
||||
from .environment import Environment
|
||||
from .error import Error
|
||||
@ -134,6 +135,7 @@ from .kcl_code_completion_request import KclCodeCompletionRequest
|
||||
from .kcl_code_completion_response import KclCodeCompletionResponse
|
||||
from .leaf_node import LeafNode
|
||||
from .length_unit import LengthUnit
|
||||
from .linear_transform import LinearTransform
|
||||
from .mass import Mass
|
||||
from .meta_cluster_info import MetaClusterInfo
|
||||
from .metadata import Metadata
|
||||
|
12
kittycad/models/entity_linear_pattern_transform.py
Normal file
12
kittycad/models/entity_linear_pattern_transform.py
Normal file
@ -0,0 +1,12 @@
|
||||
from typing import List
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class EntityLinearPatternTransform(BaseModel):
|
||||
"""The response from the `EntityLinearPatternTransform` command."""
|
||||
|
||||
entity_ids: List[str]
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
17
kittycad/models/linear_transform.py
Normal file
17
kittycad/models/linear_transform.py
Normal file
@ -0,0 +1,17 @@
|
||||
from typing import Optional
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.point3d import Point3d
|
||||
|
||||
|
||||
class LinearTransform(BaseModel):
|
||||
"""Ways to transform each solid being replicated in a repeating pattern."""
|
||||
|
||||
replicate: Optional[bool] = None
|
||||
|
||||
scale: Optional[Point3d] = None
|
||||
|
||||
translate: Optional[Point3d] = None
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
@ -15,6 +15,7 @@ from ..models.image_format import ImageFormat
|
||||
from ..models.import_file import ImportFile
|
||||
from ..models.input_format import InputFormat
|
||||
from ..models.length_unit import LengthUnit
|
||||
from ..models.linear_transform import LinearTransform
|
||||
from ..models.modeling_cmd_id import ModelingCmdId
|
||||
from ..models.output_format import OutputFormat
|
||||
from ..models.path_component_constraint_bound import PathComponentConstraintBound
|
||||
@ -302,6 +303,18 @@ class entity_get_distance(BaseModel):
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class entity_linear_pattern_transform(BaseModel):
|
||||
"""Create a linear pattern using this entity."""
|
||||
|
||||
entity_id: str
|
||||
|
||||
transform: List[LinearTransform]
|
||||
|
||||
type: Literal["entity_linear_pattern_transform"] = "entity_linear_pattern_transform"
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class entity_linear_pattern(BaseModel):
|
||||
"""Create a linear pattern using this entity."""
|
||||
|
||||
@ -1242,6 +1255,7 @@ ModelingCmd = RootModel[
|
||||
entity_get_child_uuid,
|
||||
entity_get_all_child_uuids,
|
||||
entity_get_distance,
|
||||
entity_linear_pattern_transform,
|
||||
entity_linear_pattern,
|
||||
entity_circular_pattern,
|
||||
entity_make_helix,
|
||||
|
@ -21,6 +21,7 @@ from ..models.entity_get_distance import EntityGetDistance
|
||||
from ..models.entity_get_num_children import EntityGetNumChildren
|
||||
from ..models.entity_get_parent_id import EntityGetParentId
|
||||
from ..models.entity_linear_pattern import EntityLinearPattern
|
||||
from ..models.entity_linear_pattern_transform import EntityLinearPatternTransform
|
||||
from ..models.export import Export
|
||||
from ..models.extrusion_face_info import ExtrusionFaceInfo
|
||||
from ..models.face_get_center import FaceGetCenter
|
||||
@ -525,6 +526,16 @@ class entity_get_distance(BaseModel):
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class entity_linear_pattern_transform(BaseModel):
|
||||
"""The response to the 'EntityLinearPatternTransform' endpoint"""
|
||||
|
||||
data: EntityLinearPatternTransform
|
||||
|
||||
type: Literal["entity_linear_pattern_transform"] = "entity_linear_pattern_transform"
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class entity_linear_pattern(BaseModel):
|
||||
"""The response to the 'EntityLinearPattern' endpoint"""
|
||||
|
||||
@ -615,6 +626,7 @@ OkModelingCmdResponse = RootModel[
|
||||
center_of_mass,
|
||||
get_sketch_mode_plane,
|
||||
entity_get_distance,
|
||||
entity_linear_pattern_transform,
|
||||
entity_linear_pattern,
|
||||
entity_circular_pattern,
|
||||
solid3d_get_extrusion_face_info,
|
||||
|
102
spec.json
102
spec.json
@ -15782,6 +15782,23 @@
|
||||
"entity_ids"
|
||||
]
|
||||
},
|
||||
"EntityLinearPatternTransform": {
|
||||
"description": "The response from the `EntityLinearPatternTransform` command.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"entity_ids": {
|
||||
"description": "The UUIDs of the entities that were created.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"entity_ids"
|
||||
]
|
||||
},
|
||||
"EntityType": {
|
||||
"description": "The type of entity",
|
||||
"type": "string",
|
||||
@ -18274,6 +18291,43 @@
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"LinearTransform": {
|
||||
"description": "Ways to transform each solid being replicated in a repeating pattern.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"replicate": {
|
||||
"description": "Whether to replicate the original solid in this instance.",
|
||||
"default": true,
|
||||
"type": "boolean"
|
||||
},
|
||||
"scale": {
|
||||
"description": "Scale the replica's size along each axis. Defaults to (1, 1, 1) (i.e. the same size as the original).",
|
||||
"default": {
|
||||
"x": 1.0,
|
||||
"y": 1.0,
|
||||
"z": 1.0
|
||||
},
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/Point3d"
|
||||
}
|
||||
]
|
||||
},
|
||||
"translate": {
|
||||
"description": "Translate the replica this far along each dimension. Defaults to zero vector (i.e. same position as the original).",
|
||||
"default": {
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 0.0
|
||||
},
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/Point3d"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"Mass": {
|
||||
"description": "The mass response.",
|
||||
"type": "object",
|
||||
@ -19320,6 +19374,35 @@
|
||||
"type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Create a linear pattern using this entity.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"entity_id": {
|
||||
"description": "ID of the entity being copied.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"transform": {
|
||||
"description": "How to transform each repeated solid. The total number of repetitions equals the size of this list.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/LinearTransform"
|
||||
}
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"entity_linear_pattern_transform"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"entity_id",
|
||||
"transform",
|
||||
"type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Create a linear pattern using this entity.",
|
||||
"type": "object",
|
||||
@ -22533,6 +22616,25 @@
|
||||
"type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "The response to the 'EntityLinearPatternTransform' endpoint",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/components/schemas/EntityLinearPatternTransform"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"entity_linear_pattern_transform"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"data",
|
||||
"type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "The response to the 'EntityLinearPattern' endpoint",
|
||||
"type": "object",
|
||||
|
Reference in New Issue
Block a user