Skip to content

Commit 776833e

Browse files
committed
updates
Signed-off-by: Jess Frazelle <[email protected]>
1 parent 9de3f41 commit 776833e

File tree

2 files changed

+18
-14
lines changed

2 files changed

+18
-14
lines changed

modeling-cmds/src/def_enum.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1545,7 +1545,7 @@ define_modeling_cmd_enum! {
15451545
#[derive(Clone, Debug, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant)]
15461546
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
15471547
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1548-
pub struct Solid3dGetInfo {
1548+
pub struct Solid3dGetAdjancencyInfo {
15491549
/// The Solid3d object whose info is being queried.
15501550
pub object_id: Uuid,
15511551
/// Any edge that lies on the extrusion base path.

modeling-cmds/src/ok_response.rs

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -479,10 +479,11 @@ define_ok_modeling_cmd_response_enum! {
479479
}
480480

481481
/// Extrusion face info struct (useful for maintaining mappings between source path segment ids and extrusion faces)
482+
/// This includes the opposite and adjacent faces and edges.
482483
#[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
483-
pub struct Solid3dGetInfo {
484+
pub struct Solid3dGetAdjancencyInfo {
484485
/// Details of each edge.
485-
pub edges: Vec<EdgeInfo>,
486+
pub edges: Vec<AdjacencyInfo>,
486487
}
487488

488489
/// The response from the `Solid3dGetAllEdgeFaces` command.
@@ -783,6 +784,15 @@ define_ok_modeling_cmd_response_enum! {
783784
pub edges: Vec<Uuid>,
784785
}
785786

787+
/// A list of faces for a specific edge.
788+
#[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
789+
pub struct EdgeInfo {
790+
/// The UUID of the id.
791+
pub edge_id: Uuid,
792+
/// The faces of each edge.
793+
pub faces: Vec<Uuid>,
794+
}
795+
786796
/// The response from the `EntityClone` command.
787797
#[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
788798
pub struct EntityClone {
@@ -899,21 +909,15 @@ define_ok_modeling_cmd_response_enum! {
899909
/// Edge info struct (useful for maintaining mappings between edges and faces and
900910
/// adjacent/opposite edges).
901911
#[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
902-
pub struct EdgeInfo {
912+
pub struct AdjacencyInfo {
903913
/// Edge id.
904914
pub edge_id: Uuid,
905-
/// Opposite edge id.
915+
/// Opposite edge and face info.
906916
#[serde(default, skip_serializing_if = "Option::is_none")]
907-
pub opposite_edge_id: Option<Uuid>,
908-
/// Adjacent edge id.
917+
pub opposite_info: Option<EdgeInfo>,
918+
/// Adjacent edge and face info.
909919
#[serde(default, skip_serializing_if = "Option::is_none")]
910-
pub adjacent_edge_id: Option<Uuid>,
911-
/// Opposite face ids.
912-
#[serde(default, skip_serializing_if = "Vec::is_empty")]
913-
pub opposite_face_ids: Vec<Uuid>,
914-
/// Adjacent face ids.
915-
#[serde(default, skip_serializing_if = "Vec::is_empty")]
916-
pub adjacent_face_ids: Vec<Uuid>,
920+
pub adjacent_info: Option<EdgeInfo>,
917921
}
918922

919923
/// The response from the 'SetGridReferencePlane'.

0 commit comments

Comments
 (0)