kittycad_modeling_cmds/format/
dxf.rs1pub mod export {
3 use parse_display::{Display, FromStr};
4 use schemars::JsonSchema;
5 use serde::{Deserialize, Serialize};
6
7 #[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 #[cfg_attr(
16 feature = "python",
17 pyo3_stub_gen::derive::gen_stub_pyclass_enum,
18 pyo3::pyclass(name = "DxfStorage")
19 )]
20 pub enum Storage {
21 #[default]
25 Ascii,
26
27 Binary,
29 }
30
31 #[derive(Clone, Debug, Default, Deserialize, Display, Eq, FromStr, Hash, JsonSchema, PartialEq, Serialize)]
33 #[display("storage: {storage}")]
34 #[serde(rename = "DxfExportOptions")]
35 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
36 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
37 #[cfg_attr(
38 feature = "python",
39 pyo3_stub_gen::derive::gen_stub_pyclass,
40 pyo3::pyclass(name = "DxfExportOptions")
41 )]
42 pub struct Options {
43 pub storage: Storage,
45 }
46
47 #[cfg(feature = "python")]
48 #[pyo3_stub_gen::derive::gen_stub_pymethods]
49 #[pyo3::pymethods]
50 impl Options {
51 #[new]
52 pub fn new() -> Self {
54 Default::default()
55 }
56 }
57}