Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Jess Frazelle <[email protected]>
  • Loading branch information
jessfraz committed Sep 10, 2024
1 parent 8a07766 commit 6cab9d7
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions tutorials/websocket_tutorial/websocketexample.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
OptionStartPath,
OptionTakeSnapshot,
)
from kittycad.models.path_segment import line
from kittycad.models.web_socket_request import modeling_cmd_req
from kittycad.models.path_segment import OptionLine
from kittycad.models.web_socket_request import OptionModelingCmdReq


def make_cube():
Expand All @@ -41,7 +41,7 @@ def make_cube():
# Start the Path
websocket.send(
WebSocketRequest(
modeling_cmd_req(
OptionModelingCmdReq(
cmd=ModelingCmd(OptionStartPath()),
cmd_id=ModelingCmdId(sketch_path_id),
),
Expand All @@ -50,7 +50,7 @@ def make_cube():

websocket.send(
WebSocketRequest(
modeling_cmd_req(
OptionModelingCmdReq(
cmd=ModelingCmd(
OptionMovePathPen(
path=str(sketch_path_id),
Expand All @@ -68,11 +68,11 @@ def make_cube():

websocket.send(
WebSocketRequest(
modeling_cmd_req(
OptionModelingCmdReq(
cmd=ModelingCmd(
OptionExtendPath(
path=str(sketch_path_id),
segment=line(
segment=OptionLine(
end={
"x": 10,
"y": 0,
Expand All @@ -89,11 +89,11 @@ def make_cube():

websocket.send(
WebSocketRequest(
modeling_cmd_req(
OptionModelingCmdReq(
cmd=ModelingCmd(
OptionExtendPath(
path=str(sketch_path_id),
segment=line(
segment=OptionLine(
end={
"x": 0,
"y": 10,
Expand All @@ -110,11 +110,11 @@ def make_cube():

websocket.send(
WebSocketRequest(
modeling_cmd_req(
OptionModelingCmdReq(
cmd=ModelingCmd(
OptionExtendPath(
path=str(sketch_path_id),
segment=line(
segment=OptionLine(
end={
"x": -10,
"y": 0,
Expand All @@ -132,7 +132,7 @@ def make_cube():
# Close the sketch
websocket.send(
WebSocketRequest(
modeling_cmd_req(
OptionModelingCmdReq(
cmd=ModelingCmd(
OptionClosePath(path_id=ModelingCmdId(sketch_path_id))
),
Expand All @@ -144,7 +144,7 @@ def make_cube():
# OptionExtrude the square into a cube
websocket.send(
WebSocketRequest(
modeling_cmd_req(
OptionModelingCmdReq(
cmd=ModelingCmd(
OptionExtrude(
cap=True,
Expand All @@ -166,7 +166,7 @@ def make_cube():
# Orient the camera.
websocket.send(
WebSocketRequest(
modeling_cmd_req(
OptionModelingCmdReq(
cmd=ModelingCmd(
OptionDefaultCameraLookAt(
center={"x": 0, "y": 0, "z": 0},
Expand All @@ -182,7 +182,7 @@ def make_cube():
# Take a snapshot.
websocket.send(
WebSocketRequest(
modeling_cmd_req(
OptionModelingCmdReq(
cmd=ModelingCmd(OptionTakeSnapshot(format=ImageFormat.PNG)),
cmd_id=ModelingCmdId(uuid.uuid4()),
)
Expand Down

0 comments on commit 6cab9d7

Please sign in to comment.