@@ -6,6 +6,7 @@ impl crate::ModelingCmdOutput for () {}
6
6
define_ok_modeling_cmd_response_enum ! {
7
7
/// Output from Modeling API commands.
8
8
pub mod output {
9
+ use std:: collections:: HashMap ;
9
10
10
11
use kittycad_modeling_cmds_macros:: ModelingCmdOutput ;
11
12
use schemars:: JsonSchema ;
@@ -879,6 +880,40 @@ define_ok_modeling_cmd_response_enum! {
879
880
pub cap: ExtrusionFaceCapType ,
880
881
}
881
882
883
+ /// Struct to contain the edge information of a wall of an extrude/rotate/loft/sweep.
884
+ #[ derive( Debug , Serialize , Deserialize , Clone , JsonSchema , ModelingCmdOutput ) ]
885
+ pub struct ComplementaryEdges {
886
+ /// The opposite edge has no common vertices with the original edge. A wall may not
887
+ /// have an opposite edge (i.e. a revolve that touches the axis of rotation).
888
+ pub opposite_id: Option <Uuid >,
889
+ /// Every edge that shared one common vertex with the original edge.
890
+ pub adjacent_ids: Vec <Uuid >,
891
+ }
892
+
893
+ /// Extrusion face info struct (useful for maintaining mappings between source path segment ids and extrusion faces)
894
+ #[ derive( Debug , Serialize , Deserialize , Clone , JsonSchema , ModelingCmdOutput ) ]
895
+ pub struct Solid3dGetInfo {
896
+ /// Details of each face.
897
+ pub info: SolidInfo ,
898
+ }
899
+
900
+ /// Solid info struct (useful for maintaining mappings between edges and faces and
901
+ /// adjacent/opposite edges).
902
+ #[ derive( Debug , Serialize , Deserialize , Clone , JsonSchema , ModelingCmdOutput ) ]
903
+ pub struct SolidInfo {
904
+ /// UUID for top cap.
905
+ pub top_cap_id: Option <Uuid >,
906
+
907
+ /// UUID for bottom cap.
908
+ pub bottom_cap_id: Option <Uuid >,
909
+
910
+ /// A map containing the common faces for all edges.
911
+ pub common_edges: HashMap <Uuid , Vec <Uuid >>,
912
+
913
+ /// A map containing the adjacent and opposite edge ids of each wall face.
914
+ pub complementary_edges: HashMap <Uuid , ComplementaryEdges >,
915
+ }
916
+
882
917
/// The response from the 'SetGridReferencePlane'.
883
918
#[ derive( Debug , Serialize , Deserialize , Clone , JsonSchema , ModelingCmdOutput ) ]
884
919
pub struct SetGridReferencePlane { }
0 commit comments