kittycad_modeling_cmds/format/
dxf.rs

1/// Export sketches in DXF format.
2pub mod export {
3    use parse_display::{Display, FromStr};
4    use schemars::JsonSchema;
5    use serde::{Deserialize, Serialize};
6
7    /// Export storage.
8    #[derive(
9        Clone, Copy, Debug, Default, Deserialize, Display, Eq, FromStr, Hash, JsonSchema, PartialEq, Serialize,
10    )]
11    #[display(style = "snake_case")]
12    #[serde(rename = "DxfStorage", rename_all = "snake_case")]
13    #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
14    #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
15    pub enum Storage {
16        /// Plaintext encoding.
17        ///
18        /// This is the default setting.
19        #[default]
20        Ascii,
21
22        /// Binary encoding.
23        Binary,
24    }
25
26    /// Options for exporting DXF format.
27    #[derive(Clone, Debug, Default, Deserialize, Display, Eq, FromStr, Hash, JsonSchema, PartialEq, Serialize)]
28    #[display("storage: {storage}")]
29    #[serde(rename = "DxfExportOptions")]
30    #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
31    #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
32    pub struct Options {
33        /// Export storage.
34        pub storage: Storage,
35    }
36}