-
Notifications
You must be signed in to change notification settings - Fork 2
Solid modeling apis #1021
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+275
−8
Merged
Solid modeling apis #1021
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
11f4887
add the new APIs
mlfarrell b876c16
Update ok_response.rs
mlfarrell b3340f1
Merge branch 'main' into mike/solid-modeling-apis
mlfarrell af892e8
change delete child -> delete children for performance reasons
mlfarrell 23f34f5
missed hash set
mlfarrell 0641180
typo
mlfarrell afd30da
Merge branch 'main' into mike/solid-modeling-apis
mlfarrell f794373
Update api spec
adamchalmers 8396985
add brep (solid3d) flip API
mlfarrell 652ce9a
Update api.json
mlfarrell File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,8 +10,11 @@ define_ok_modeling_cmd_response_enum! { | |
| use schemars::JsonSchema; | ||
| use serde::{Deserialize, Serialize}; | ||
| use uuid::Uuid; | ||
| use crate::shared::CameraSettings; | ||
| use crate::shared::CameraViewState; | ||
| use crate::shared::{ | ||
| CameraSettings, | ||
| CameraViewState, | ||
| BodyType, | ||
| }; | ||
|
|
||
| use crate::{self as kittycad_modeling_cmds}; | ||
| use crate::{ | ||
|
|
@@ -74,6 +77,18 @@ define_ok_modeling_cmd_response_enum! { | |
| pub struct Solid3dShellFace { | ||
| } | ||
|
|
||
| /// The response from the `Solid3dJoin` endpoint. | ||
| #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)] | ||
| pub struct Solid3dJoin { | ||
| } | ||
|
|
||
| /// The response from the `Solid3dGetBodyType` endpoint. | ||
| #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)] | ||
| pub struct Solid3dGetBodyType { | ||
| /// The body type | ||
| pub body_type: BodyType, | ||
| } | ||
|
|
||
| /// The response from the `RevolveAboutEdge` endpoint. | ||
| #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)] | ||
| pub struct RevolveAboutEdge { | ||
|
|
@@ -350,6 +365,10 @@ define_ok_modeling_cmd_response_enum! { | |
| /// The UUID of the child entity. | ||
| pub entity_id: Uuid, | ||
| } | ||
| /// The response from the `EntityDeleteChildren` command. | ||
| #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)] | ||
| pub struct EntityDeleteChildren { | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It might be useful to return the body_type here, so the user knows if a solid became a surface. But that can be a future extension. |
||
| } | ||
| /// The response from the `EntityGetNumChildren` command. | ||
| #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)] | ||
| pub struct EntityGetNumChildren { | ||
|
|
@@ -509,6 +528,16 @@ define_ok_modeling_cmd_response_enum! { | |
| pub faces: Vec<Uuid>, | ||
| } | ||
|
|
||
| /// The response from the `Solid3dFlip` command. | ||
| #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)] | ||
| pub struct Solid3dFlip { | ||
| } | ||
|
|
||
| /// The response from the `Solid3dFlipFace` command. | ||
| #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)] | ||
| pub struct Solid3dFlipFace { | ||
| } | ||
|
|
||
| /// The response from the `Solid3dGetAllOppositeEdges` command. | ||
| #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)] | ||
| pub struct Solid3dGetAllOppositeEdges { | ||
|
|
@@ -964,6 +993,17 @@ define_ok_modeling_cmd_response_enum! { | |
| pub extra_solid_ids: Vec<Uuid>, | ||
| } | ||
|
|
||
| /// The response from the 'BooleanImprint'. | ||
| #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)] | ||
| pub struct BooleanImprint { | ||
| /// If the operation produced just one body, then its ID will be the | ||
| /// ID of the modeling command request. | ||
| /// But if any extra bodies are produced, then their IDs will be included | ||
| /// here. | ||
| #[serde(default, skip_serializing_if = "Vec::is_empty")] | ||
| pub extra_solid_ids: Vec<Uuid>, | ||
| } | ||
|
|
||
| /// The response from the 'SetGridScale'. | ||
| #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)] | ||
| pub struct SetGridScale {} | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.