Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions modeling-cmds/openapi/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -8804,6 +8804,15 @@
}
]
},
"schema": {
"description": "STEP application protocol schema. Defaults to AP242.",
"default": "ap242",
"allOf": [
{
"$ref": "#/components/schemas/StepSchema"
}
]
},
"type": {
"type": "string",
"enum": [
Expand Down Expand Up @@ -9807,6 +9816,32 @@
}
]
},
"StepSchema": {
"description": "Specifies the STEP application protocol schema for export.",
"oneOf": [
{
"description": "AP203 edition 2.",
"type": "string",
"enum": [
"ap203"
]
},
{
"description": "AP214.",
"type": "string",
"enum": [
"ap214"
]
},
{
"description": "AP242.\n\nThis is the default setting.",
"type": "string",
"enum": [
"ap242"
]
}
]
},
"StlStorage": {
"description": "Export storage.",
"oneOf": [
Expand Down
1 change: 1 addition & 0 deletions modeling-cmds/src/format/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ impl OutputFormat3d {
created: None,
units: src_unit,
presentation: step::export::Presentation::Pretty,
..Default::default()
}),
FileExportFormat::Stl => Self::Stl(stl::export::Options {
storage: stl::export::Storage::Ascii,
Expand Down
34 changes: 34 additions & 0 deletions modeling-cmds/src/format/step.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,35 @@ pub mod export {
use super::*;
use crate::units::UnitLength;

/// Specifies the STEP application protocol schema for export.
#[derive(
Default, Clone, Copy, Debug, Eq, Hash, PartialEq, Serialize, Deserialize, JsonSchema, Display, FromStr,
)]
#[display(style = "snake_case")]
#[serde(rename = "StepSchema", rename_all = "snake_case")]
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
#[cfg_attr(
feature = "python",
pyo3_stub_gen::derive::gen_stub_pyclass_enum,
pyo3::pyclass(name = "StepSchema", from_py_object)
)]
#[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
pub enum Schema {
/// AP203 edition 2.
Ap203,

/// AP214.
Ap214,

/// AP242.
///
/// This is the default setting.
#[default]
Ap242,
}

/// Describes the presentation style of the EXPRESS exchange format.
#[derive(
Default, Clone, Copy, Debug, Eq, Hash, PartialEq, Serialize, Deserialize, JsonSchema, Display, FromStr,
Expand Down Expand Up @@ -148,6 +177,10 @@ pub mod export {
/// Presentation style.
#[builder(default = default_presentation())]
pub presentation: Presentation,

/// STEP application protocol schema. Defaults to AP242.
#[builder(default)]
pub schema: Schema,
}

#[cfg(feature = "python")]
Expand All @@ -168,6 +201,7 @@ pub mod export {
created: None,
units: default_units(),
presentation: default_presentation(),
schema: Schema::default(),
}
}
}
Expand Down
Loading