Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
24171eea43 | |||
a008a9d1aa |
File diff suppressed because it is too large
Load Diff
@ -14,6 +14,7 @@ from ...models.web_socket_response import WebSocketResponse
|
|||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
fps: int,
|
fps: int,
|
||||||
post_effect: PostEffectType,
|
post_effect: PostEffectType,
|
||||||
|
show_grid: bool,
|
||||||
unlocked_framerate: bool,
|
unlocked_framerate: bool,
|
||||||
video_res_height: int,
|
video_res_height: int,
|
||||||
video_res_width: int,
|
video_res_width: int,
|
||||||
@ -45,6 +46,13 @@ def _get_kwargs(
|
|||||||
else:
|
else:
|
||||||
url = url + "?post_effect=" + str(post_effect)
|
url = url + "?post_effect=" + str(post_effect)
|
||||||
|
|
||||||
|
if show_grid is not None:
|
||||||
|
|
||||||
|
if "?" in url:
|
||||||
|
url = url + "&show_grid=" + str(show_grid).lower()
|
||||||
|
else:
|
||||||
|
url = url + "?show_grid=" + str(show_grid).lower()
|
||||||
|
|
||||||
if unlocked_framerate is not None:
|
if unlocked_framerate is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
@ -87,6 +95,7 @@ def _get_kwargs(
|
|||||||
def sync(
|
def sync(
|
||||||
fps: int,
|
fps: int,
|
||||||
post_effect: PostEffectType,
|
post_effect: PostEffectType,
|
||||||
|
show_grid: bool,
|
||||||
unlocked_framerate: bool,
|
unlocked_framerate: bool,
|
||||||
video_res_height: int,
|
video_res_height: int,
|
||||||
video_res_width: int,
|
video_res_width: int,
|
||||||
@ -101,6 +110,7 @@ def sync(
|
|||||||
fps=fps,
|
fps=fps,
|
||||||
pool=pool,
|
pool=pool,
|
||||||
post_effect=post_effect,
|
post_effect=post_effect,
|
||||||
|
show_grid=show_grid,
|
||||||
unlocked_framerate=unlocked_framerate,
|
unlocked_framerate=unlocked_framerate,
|
||||||
video_res_height=video_res_height,
|
video_res_height=video_res_height,
|
||||||
video_res_width=video_res_width,
|
video_res_width=video_res_width,
|
||||||
@ -114,6 +124,7 @@ def sync(
|
|||||||
async def asyncio(
|
async def asyncio(
|
||||||
fps: int,
|
fps: int,
|
||||||
post_effect: PostEffectType,
|
post_effect: PostEffectType,
|
||||||
|
show_grid: bool,
|
||||||
unlocked_framerate: bool,
|
unlocked_framerate: bool,
|
||||||
video_res_height: int,
|
video_res_height: int,
|
||||||
video_res_width: int,
|
video_res_width: int,
|
||||||
@ -128,6 +139,7 @@ async def asyncio(
|
|||||||
fps=fps,
|
fps=fps,
|
||||||
pool=pool,
|
pool=pool,
|
||||||
post_effect=post_effect,
|
post_effect=post_effect,
|
||||||
|
show_grid=show_grid,
|
||||||
unlocked_framerate=unlocked_framerate,
|
unlocked_framerate=unlocked_framerate,
|
||||||
video_res_height=video_res_height,
|
video_res_height=video_res_height,
|
||||||
video_res_width=video_res_width,
|
video_res_width=video_res_width,
|
||||||
@ -152,6 +164,7 @@ class WebSocket:
|
|||||||
self,
|
self,
|
||||||
fps: int,
|
fps: int,
|
||||||
post_effect: PostEffectType,
|
post_effect: PostEffectType,
|
||||||
|
show_grid: bool,
|
||||||
unlocked_framerate: bool,
|
unlocked_framerate: bool,
|
||||||
video_res_height: int,
|
video_res_height: int,
|
||||||
video_res_width: int,
|
video_res_width: int,
|
||||||
@ -162,6 +175,7 @@ class WebSocket:
|
|||||||
self.ws = sync(
|
self.ws = sync(
|
||||||
fps,
|
fps,
|
||||||
post_effect,
|
post_effect,
|
||||||
|
show_grid,
|
||||||
unlocked_framerate,
|
unlocked_framerate,
|
||||||
video_res_height,
|
video_res_height,
|
||||||
video_res_width,
|
video_res_width,
|
||||||
|
@ -357,6 +357,7 @@ def test_ws_simple():
|
|||||||
with modeling_commands_ws.WebSocket(
|
with modeling_commands_ws.WebSocket(
|
||||||
client=client,
|
client=client,
|
||||||
fps=30,
|
fps=30,
|
||||||
|
show_grid=False,
|
||||||
post_effect=PostEffectType.NOEFFECT,
|
post_effect=PostEffectType.NOEFFECT,
|
||||||
unlocked_framerate=False,
|
unlocked_framerate=False,
|
||||||
video_res_height=360,
|
video_res_height=360,
|
||||||
@ -386,6 +387,7 @@ def test_ws_import():
|
|||||||
client=client,
|
client=client,
|
||||||
fps=30,
|
fps=30,
|
||||||
post_effect=PostEffectType.NOEFFECT,
|
post_effect=PostEffectType.NOEFFECT,
|
||||||
|
show_grid=False,
|
||||||
unlocked_framerate=False,
|
unlocked_framerate=False,
|
||||||
video_res_height=360,
|
video_res_height=360,
|
||||||
video_res_width=480,
|
video_res_width=480,
|
||||||
|
@ -6808,6 +6808,7 @@ def test_modeling_commands_ws():
|
|||||||
client=client,
|
client=client,
|
||||||
fps=10,
|
fps=10,
|
||||||
post_effect=PostEffectType.PHOSPHOR,
|
post_effect=PostEffectType.PHOSPHOR,
|
||||||
|
show_grid=False,
|
||||||
unlocked_framerate=False,
|
unlocked_framerate=False,
|
||||||
video_res_height=10,
|
video_res_height=10,
|
||||||
video_res_width=10,
|
video_res_width=10,
|
||||||
@ -6844,6 +6845,7 @@ async def test_modeling_commands_ws_async():
|
|||||||
client=client,
|
client=client,
|
||||||
fps=10,
|
fps=10,
|
||||||
post_effect=PostEffectType.PHOSPHOR,
|
post_effect=PostEffectType.PHOSPHOR,
|
||||||
|
show_grid=False,
|
||||||
unlocked_framerate=False,
|
unlocked_framerate=False,
|
||||||
video_res_height=10,
|
video_res_height=10,
|
||||||
video_res_width=10,
|
video_res_width=10,
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
from typing import Optional
|
||||||
|
|
||||||
from pydantic import BaseModel, ConfigDict
|
from pydantic import BaseModel, ConfigDict
|
||||||
|
|
||||||
@ -6,10 +7,10 @@ from pydantic import BaseModel, ConfigDict
|
|||||||
class PerspectiveCameraParameters(BaseModel):
|
class PerspectiveCameraParameters(BaseModel):
|
||||||
"""Defines a perspective view."""
|
"""Defines a perspective view."""
|
||||||
|
|
||||||
fov_y: float
|
fov_y: Optional[float] = None
|
||||||
|
|
||||||
z_far: float
|
z_far: Optional[float] = None
|
||||||
|
|
||||||
z_near: float
|
z_near: Optional[float] = None
|
||||||
|
|
||||||
model_config = ConfigDict(protected_namespaces=())
|
model_config = ConfigDict(protected_namespaces=())
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "kittycad"
|
name = "kittycad"
|
||||||
version = "0.6.15"
|
version = "0.6.16"
|
||||||
description = "A client library for accessing KittyCAD"
|
description = "A client library for accessing KittyCAD"
|
||||||
|
|
||||||
authors = []
|
authors = []
|
||||||
|
18
spec.json
18
spec.json
@ -12350,6 +12350,14 @@
|
|||||||
"$ref": "#/components/schemas/PostEffectType"
|
"$ref": "#/components/schemas/PostEffectType"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"in": "query",
|
||||||
|
"name": "show_grid",
|
||||||
|
"description": "If true, will show the grid at the start of the session.",
|
||||||
|
"schema": {
|
||||||
|
"type": "boolean"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"in": "query",
|
"in": "query",
|
||||||
"name": "unlocked_framerate",
|
"name": "unlocked_framerate",
|
||||||
@ -23913,26 +23921,24 @@
|
|||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"fov_y": {
|
"fov_y": {
|
||||||
|
"nullable": true,
|
||||||
"description": "Camera frustum vertical field of view.",
|
"description": "Camera frustum vertical field of view.",
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"format": "float"
|
"format": "float"
|
||||||
},
|
},
|
||||||
"z_far": {
|
"z_far": {
|
||||||
|
"nullable": true,
|
||||||
"description": "Camera frustum far plane.",
|
"description": "Camera frustum far plane.",
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"format": "float"
|
"format": "float"
|
||||||
},
|
},
|
||||||
"z_near": {
|
"z_near": {
|
||||||
|
"nullable": true,
|
||||||
"description": "Camera frustum near plane.",
|
"description": "Camera frustum near plane.",
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"format": "float"
|
"format": "float"
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"required": [
|
|
||||||
"fov_y",
|
|
||||||
"z_far",
|
|
||||||
"z_near"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"PlanInterval": {
|
"PlanInterval": {
|
||||||
"description": "A plan's interval.",
|
"description": "A plan's interval.",
|
||||||
|
Reference in New Issue
Block a user