Skip to content

add face and edge uuids to responses that make more geometry: #863

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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 23 additions & 10 deletions modeling-cmds/src/ok_response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -766,44 +766,57 @@ define_ok_modeling_cmd_response_enum! {
pub max_distance: LengthUnit,
}

/// Faces and edges id info (most used in identifying geometry in patterned and mirrored objects).
#[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
pub struct FaceEdgeInfo {
/// The UUID of the object.
pub object_id: Uuid,
/// The faces of each object.
pub faces: Vec<Uuid>,
/// The edges of each object.
pub edges: Vec<Uuid>,
}

/// The response from the `EntityClone` command.
#[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
pub struct EntityClone {
/// The Face and Edge Ids of the cloned entity.
pub face_edge_ids: Vec<FaceEdgeInfo>,
}

/// The response from the `EntityLinearPatternTransform` command.
#[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
pub struct EntityLinearPatternTransform {
/// The UUIDs of the entities that were created.
pub entity_ids: Vec<Uuid>,
/// The Face, edge, and entity ids of the patterned entities.
pub entity_face_edge_ids: Vec<FaceEdgeInfo>,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adamchalmers do you know how we can make these bw compatible so we dont break in flux releases or should we just slow roll it out w empty vecs?

}

/// The response from the `EntityLinearPattern` command.
#[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
pub struct EntityLinearPattern {
/// The UUIDs of the entities that were created.
pub entity_ids: Vec<Uuid>,
/// The Face, edge, and entity ids of the patterned entities.
pub entity_face_edge_ids: Vec<FaceEdgeInfo>,
}

/// The response from the `EntityCircularPattern` command.
#[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
pub struct EntityCircularPattern {
/// The UUIDs of the entities that were created.
pub entity_ids: Vec<Uuid>,
/// The Face, edge, and entity ids of the patterned entities.
pub entity_face_edge_ids: Vec<FaceEdgeInfo>,
}

/// The response from the `EntityMirror` endpoint.
#[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
pub struct EntityMirror {
/// The UUIDs of the entities that were created.
pub entity_ids: Vec<Uuid>
/// The Face, edge, and entity ids of the patterned entities.
pub entity_face_edge_ids: Vec<FaceEdgeInfo>,
}

/// The response from the `EntityMirrorAcrossEdge` endpoint.
#[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
pub struct EntityMirrorAcrossEdge {
/// The UUIDs of the entities that were created.
pub entity_ids: Vec<Uuid>
/// The Face, edge, and entity ids of the patterned entities.
pub entity_face_edge_ids: Vec<FaceEdgeInfo>,
}

/// The response from the `EntityMakeHelix` endpoint.
Expand Down
1 change: 0 additions & 1 deletion modeling-cmds/src/shared.rs
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,6 @@ pub struct SideFace {
/// Desired ID for the resulting face.
pub face_id: Uuid,
}

/// Camera settings including position, center, fov etc
#[derive(Debug, Serialize, Deserialize, JsonSchema, Clone)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
Expand Down
Loading