Update api spec (#205)
* 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
f0599f6d54
commit
f040c6454d
File diff suppressed because it is too large
Load Diff
@ -86,6 +86,9 @@ from .extended_user import ExtendedUser
|
||||
from .extended_user_results_page import ExtendedUserResultsPage
|
||||
from .extrusion_face_cap_type import ExtrusionFaceCapType
|
||||
from .extrusion_face_info import ExtrusionFaceInfo
|
||||
from .face_get_gradient import FaceGetGradient
|
||||
from .face_get_position import FaceGetPosition
|
||||
from .face_is_planar import FaceIsPlanar
|
||||
from .failure_web_socket_response import FailureWebSocketResponse
|
||||
from .fbx_storage import FbxStorage
|
||||
from .file_center_of_mass import FileCenterOfMass
|
||||
|
16
kittycad/models/face_get_gradient.py
Normal file
16
kittycad/models/face_get_gradient.py
Normal file
@ -0,0 +1,16 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.point3d import Point3d
|
||||
|
||||
|
||||
class FaceGetGradient(BaseModel):
|
||||
"""The gradient (dFdu, dFdv) + normal vector on a brep face"""
|
||||
|
||||
df_du: Point3d
|
||||
|
||||
df_dv: Point3d
|
||||
|
||||
normal: Point3d
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
12
kittycad/models/face_get_position.py
Normal file
12
kittycad/models/face_get_position.py
Normal file
@ -0,0 +1,12 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.point3d import Point3d
|
||||
|
||||
|
||||
class FaceGetPosition(BaseModel):
|
||||
"""The 3D position on the surface that was evaluated"""
|
||||
|
||||
pos: Point3d
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
19
kittycad/models/face_is_planar.py
Normal file
19
kittycad/models/face_is_planar.py
Normal file
@ -0,0 +1,19 @@
|
||||
from typing import Optional
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.point3d import Point3d
|
||||
|
||||
|
||||
class FaceIsPlanar(BaseModel):
|
||||
"""Surface-local planar axes (if available)"""
|
||||
|
||||
origin: Optional[Point3d] = None
|
||||
|
||||
x_axis: Optional[Point3d] = None
|
||||
|
||||
y_axis: Optional[Point3d] = None
|
||||
|
||||
z_axis: Optional[Point3d] = None
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
@ -566,6 +566,40 @@ class solid3d_fillet_edge(BaseModel):
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class face_is_planar(BaseModel):
|
||||
"""Determines whether a brep face is planar and returns its surface-local planar axes if so"""
|
||||
|
||||
object_id: str
|
||||
|
||||
type: Literal["face_is_planar"] = "face_is_planar"
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class face_get_position(BaseModel):
|
||||
"""Determines a position on a brep face evaluated by parameters u,v"""
|
||||
|
||||
object_id: str
|
||||
|
||||
type: Literal["face_get_position"] = "face_get_position"
|
||||
|
||||
uv: Point2d
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class face_get_gradient(BaseModel):
|
||||
"""Determines the gradient (dFdu, dFdv) + normal vector on a brep face evaluated by parameters u,v"""
|
||||
|
||||
object_id: str
|
||||
|
||||
type: Literal["face_get_gradient"] = "face_get_gradient"
|
||||
|
||||
uv: Point2d
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class send_object(BaseModel):
|
||||
"""Send object to front or back."""
|
||||
|
||||
@ -1113,6 +1147,9 @@ ModelingCmd = RootModel[
|
||||
solid3d_get_next_adjacent_edge,
|
||||
solid3d_get_prev_adjacent_edge,
|
||||
solid3d_fillet_edge,
|
||||
face_is_planar,
|
||||
face_get_position,
|
||||
face_get_gradient,
|
||||
send_object,
|
||||
entity_set_opacity,
|
||||
entity_fade,
|
||||
|
@ -21,6 +21,9 @@ from ..models.entity_get_parent_id import EntityGetParentId
|
||||
from ..models.entity_linear_pattern import EntityLinearPattern
|
||||
from ..models.export import Export
|
||||
from ..models.extrusion_face_info import ExtrusionFaceInfo
|
||||
from ..models.face_get_gradient import FaceGetGradient
|
||||
from ..models.face_get_position import FaceGetPosition
|
||||
from ..models.face_is_planar import FaceIsPlanar
|
||||
from ..models.get_entity_type import GetEntityType
|
||||
from ..models.get_sketch_mode_plane import GetSketchModePlane
|
||||
from ..models.highlight_set_entity import HighlightSetEntity
|
||||
@ -325,6 +328,36 @@ class curve_get_end_points(BaseModel):
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class face_is_planar(BaseModel):
|
||||
"""The response to the 'FaceIsPlanar' endpoint"""
|
||||
|
||||
data: FaceIsPlanar
|
||||
|
||||
type: Literal["face_is_planar"] = "face_is_planar"
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class face_get_position(BaseModel):
|
||||
"""The response to the 'FaceGetPosition' endpoint"""
|
||||
|
||||
data: FaceGetPosition
|
||||
|
||||
type: Literal["face_get_position"] = "face_get_position"
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class face_get_gradient(BaseModel):
|
||||
"""The response to the 'FaceGetGradient' endpoint"""
|
||||
|
||||
data: FaceGetGradient
|
||||
|
||||
type: Literal["face_get_gradient"] = "face_get_gradient"
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class plane_intersect_and_project(BaseModel):
|
||||
"""The response to the 'PlaneIntersectAndProject' endpoint"""
|
||||
|
||||
@ -486,6 +519,9 @@ OkModelingCmdResponse = RootModel[
|
||||
path_get_curve_uuids_for_vertices,
|
||||
path_get_vertex_uuids,
|
||||
curve_get_end_points,
|
||||
face_is_planar,
|
||||
face_get_position,
|
||||
face_get_gradient,
|
||||
plane_intersect_and_project,
|
||||
import_files,
|
||||
mass,
|
||||
|
232
spec.json
232
spec.json
@ -15976,6 +15976,100 @@
|
||||
"cap"
|
||||
]
|
||||
},
|
||||
"FaceGetGradient": {
|
||||
"description": "The gradient (dFdu, dFdv) + normal vector on a brep face",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"df_du": {
|
||||
"description": "dFdu",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/Point3d"
|
||||
}
|
||||
]
|
||||
},
|
||||
"df_dv": {
|
||||
"description": "dFdv",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/Point3d"
|
||||
}
|
||||
]
|
||||
},
|
||||
"normal": {
|
||||
"description": "Normal (||dFdu x dFdv||)",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/Point3d"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"df_du",
|
||||
"df_dv",
|
||||
"normal"
|
||||
]
|
||||
},
|
||||
"FaceGetPosition": {
|
||||
"description": "The 3D position on the surface that was evaluated",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"pos": {
|
||||
"description": "The 3D position on the surface that was evaluated",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/Point3d"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"pos"
|
||||
]
|
||||
},
|
||||
"FaceIsPlanar": {
|
||||
"description": "Surface-local planar axes (if available)",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"origin": {
|
||||
"nullable": true,
|
||||
"description": "plane's origin",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/Point3d"
|
||||
}
|
||||
]
|
||||
},
|
||||
"x_axis": {
|
||||
"nullable": true,
|
||||
"description": "plane's local x-axis",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/Point3d"
|
||||
}
|
||||
]
|
||||
},
|
||||
"y_axis": {
|
||||
"nullable": true,
|
||||
"description": "plane's local y-axis",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/Point3d"
|
||||
}
|
||||
]
|
||||
},
|
||||
"z_axis": {
|
||||
"nullable": true,
|
||||
"description": "plane's local z-axis (normal)",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/Point3d"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"FailureWebSocketResponse": {
|
||||
"description": "Unsuccessful Websocket response.",
|
||||
"type": "object",
|
||||
@ -19540,6 +19634,87 @@
|
||||
"type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Determines whether a brep face is planar and returns its surface-local planar axes if so",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"object_id": {
|
||||
"description": "Which face is being queried.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"face_is_planar"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"object_id",
|
||||
"type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Determines a position on a brep face evaluated by parameters u,v",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"object_id": {
|
||||
"description": "Which face is being queried.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"face_get_position"
|
||||
]
|
||||
},
|
||||
"uv": {
|
||||
"description": "The 2D paramter-space u,v position to evaluate the surface at",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/Point2d"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"object_id",
|
||||
"type",
|
||||
"uv"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Determines the gradient (dFdu, dFdv) + normal vector on a brep face evaluated by parameters u,v",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"object_id": {
|
||||
"description": "Which face is being queried.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"face_get_gradient"
|
||||
]
|
||||
},
|
||||
"uv": {
|
||||
"description": "The 2D paramter-space u,v position to evaluate the surface at",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/Point2d"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"object_id",
|
||||
"type",
|
||||
"uv"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Send object to front or back.",
|
||||
"type": "object",
|
||||
@ -21390,6 +21565,63 @@
|
||||
"type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "The response to the 'FaceIsPlanar' endpoint",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/components/schemas/FaceIsPlanar"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"face_is_planar"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"data",
|
||||
"type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "The response to the 'FaceGetPosition' endpoint",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/components/schemas/FaceGetPosition"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"face_get_position"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"data",
|
||||
"type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "The response to the 'FaceGetGradient' endpoint",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/components/schemas/FaceGetGradient"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"face_get_gradient"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"data",
|
||||
"type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "The response to the 'PlaneIntersectAndProject' endpoint",
|
||||
"type": "object",
|
||||
|
Reference in New Issue
Block a user