@@ -6,8 +6,6 @@ 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 ;
10
-
11
9
use kittycad_modeling_cmds_macros:: ModelingCmdOutput ;
12
10
use schemars:: JsonSchema ;
13
11
use serde:: { Deserialize , Serialize } ;
@@ -480,6 +478,14 @@ define_ok_modeling_cmd_response_enum! {
480
478
pub entity_ids: Vec <Uuid >,
481
479
}
482
480
481
+ /// 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.
483
+ #[ derive( Debug , Serialize , Deserialize , Clone , JsonSchema , ModelingCmdOutput ) ]
484
+ pub struct Solid3dGetAdjacencyInfo {
485
+ /// Details of each edge.
486
+ pub edges: Vec <AdjacencyInfo >,
487
+ }
488
+
483
489
/// The response from the `Solid3dGetAllEdgeFaces` command.
484
490
#[ derive( Debug , Serialize , Deserialize , Clone , JsonSchema , ModelingCmdOutput ) ]
485
491
pub struct Solid3dGetAllEdgeFaces {
@@ -778,6 +784,15 @@ define_ok_modeling_cmd_response_enum! {
778
784
pub edges: Vec <Uuid >,
779
785
}
780
786
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
+
781
796
/// The response from the `EntityClone` command.
782
797
#[ derive( Debug , Serialize , Deserialize , Clone , JsonSchema , ModelingCmdOutput ) ]
783
798
pub struct EntityClone {
@@ -890,28 +905,19 @@ define_ok_modeling_cmd_response_enum! {
890
905
pub adjacent_ids: Vec <Uuid >,
891
906
}
892
907
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
908
900
- /// Solid info struct (useful for maintaining mappings between edges and faces and
909
+ /// Edge info struct (useful for maintaining mappings between edges and faces and
901
910
/// adjacent/opposite edges).
902
911
#[ 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 >,
912
+ pub struct AdjacencyInfo {
913
+ /// Edge id.
914
+ pub edge_id: Uuid ,
915
+ /// Opposite edge and face info.
916
+ #[ serde( default , skip_serializing_if = "Option::is_none" ) ]
917
+ pub opposite_info: Option <EdgeInfo >,
918
+ /// Adjacent edge and face info.
919
+ #[ serde( default , skip_serializing_if = "Option::is_none" ) ]
920
+ pub adjacent_info: Option <EdgeInfo >,
915
921
}
916
922
917
923
/// The response from the 'SetGridReferencePlane'.
0 commit comments