From e2dece8d794483f48a64e1319132729dd8f5dab8 Mon Sep 17 00:00:00 2001 From: Timofei Maksimov Date: Thu, 20 Aug 2026 14:58:51 +0200 Subject: [PATCH 1/3] feat(aero-v7): add symmetry --- CHANGELOG.md | 8 +++++++ schemas/aerocloud.json | 21 +++++++++++++++++-- src/aerocloud/extra_types.rs | 6 +++++- src/aerocloud/fmt.rs | 13 +++++++++++- .../aerocloud/v7/batch/simulation_detail.rs | 9 ++++++++ .../aerocloud/v7/batch/simulation_params.rs | 2 ++ 6 files changed, 55 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 025e46a..d926c4e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +# 1.6.0 - Unreleased + +## AeroCloud + +### Features + + - Add support for `symmetry` to v7 simulations [#174](https://github.com/nablaflow/cli/pull/174) + # 1.5.0 - 2026-08-07 ## AeroCloud diff --git a/schemas/aerocloud.json b/schemas/aerocloud.json index 0f891de..cd92404 100644 --- a/schemas/aerocloud.json +++ b/schemas/aerocloud.json @@ -322,6 +322,9 @@ "revision": { "type": "string" }, + "symmetry": { + "$ref": "#/components/schemas/Symmetry" + }, "yaw_angles": { "$ref": "#/components/schemas/YawAngles" } @@ -407,13 +410,13 @@ "type": "number" }, "ID": { - "example": "019f3c5c-5e48-761b-914b-c3d7970b93c9", + "example": "6bf1fafd-35e9-4b4f-9b21-2ed9b731b12d", "format": "uuid", "title": "ID", "type": "string" }, "IdempotencyKey": { - "example": "019f3c5c-5e48-7c2f-8fc3-718048fd3f48", + "example": "1603dfa0-738c-4273-af9d-7b840a5e3909", "title": "IdempotencyKey", "type": "string" }, @@ -1124,6 +1127,9 @@ "quality": { "$ref": "#/components/schemas/SimulationQuality" }, + "symmetry": { + "$ref": "#/components/schemas/Symmetry" + }, "yaw_angles": { "$ref": "#/components/schemas/YawAngles" } @@ -1548,6 +1554,17 @@ "title": "SimulationV7", "type": "object" }, + "Symmetry": { + "default": "off", + "enum": [ + "off", + "center", + "left", + "right" + ], + "title": "Symmetry", + "type": "string" + }, "Token": { "discriminator": { "propertyName": "type" diff --git a/src/aerocloud/extra_types.rs b/src/aerocloud/extra_types.rs index 35bb3b1..540ae62 100644 --- a/src/aerocloud/extra_types.rs +++ b/src/aerocloud/extra_types.rs @@ -1,6 +1,7 @@ use crate::aerocloud::types::{ BoundaryLayerTreatment, Ceiling, FileUnit, Fluid, FluidSpeed, GroundOffset, - Id, Quaternion, SimulationQuality, UpdatePartV7Params, YawAngle, YawAngles, + Id, Quaternion, SimulationQuality, Symmetry, UpdatePartV7Params, YawAngle, + YawAngles, }; use color_eyre::eyre; use std::{borrow::Cow, collections::BTreeMap}; @@ -40,6 +41,9 @@ pub struct CreateSimulationV7ParamsFromJson { #[serde(default)] pub assistant: bool, + #[serde(default)] + pub symmetry: Option, + #[serde(default)] pub model_id: Option, diff --git a/src/aerocloud/fmt.rs b/src/aerocloud/fmt.rs index 57c13a9..75571ab 100644 --- a/src/aerocloud/fmt.rs +++ b/src/aerocloud/fmt.rs @@ -1,4 +1,6 @@ -use crate::aerocloud::types::{BoundaryLayerTreatment, SimulationStatus}; +use crate::aerocloud::types::{ + BoundaryLayerTreatment, SimulationStatus, Symmetry, +}; pub fn human_simulation_status(v: SimulationStatus) -> &'static str { match v { @@ -17,3 +19,12 @@ pub fn human_boundary_layer_treatment(v: BoundaryLayerTreatment) -> &'static str } } } + +pub fn human_symmetry(v: Symmetry) -> &'static str { + match v { + Symmetry::Off => "off", + Symmetry::Center => "center", + Symmetry::Left => "left", + Symmetry::Right => "right", + } +} diff --git a/src/commands/aerocloud/v7/batch/simulation_detail.rs b/src/commands/aerocloud/v7/batch/simulation_detail.rs index 7379640..6aeea6b 100644 --- a/src/commands/aerocloud/v7/batch/simulation_detail.rs +++ b/src/commands/aerocloud/v7/batch/simulation_detail.rs @@ -196,6 +196,15 @@ impl<'a> SimulationDetail<'a> { Span::styled("Assistant: ", STYLE_BOLD), Span::styled(bool_to_human(sim.params.assistant), STYLE_ACCENT), ])); + + lines.push(Line::default()); + + if let Some(v) = sim.params.symmetry { + lines.push(Line::from(vec![ + Span::styled("Symmetry: ", STYLE_BOLD), + Span::styled(fmt::human_symmetry(v), STYLE_ACCENT), + ])); + } } fn new_model(files: &'a [FileParams], lines: &mut Vec>) { diff --git a/src/commands/aerocloud/v7/batch/simulation_params.rs b/src/commands/aerocloud/v7/batch/simulation_params.rs index ce31e37..18a77df 100644 --- a/src/commands/aerocloud/v7/batch/simulation_params.rs +++ b/src/commands/aerocloud/v7/batch/simulation_params.rs @@ -339,6 +339,7 @@ impl SimulationParams { revision, yaw_angles, assistant, + symmetry, .. } = self.params; @@ -357,6 +358,7 @@ impl SimulationParams { quality, revision, yaw_angles, + symmetry, } } } From 54409b4b40c5b2f2259198c3810b8526eeda6e02 Mon Sep 17 00:00:00 2001 From: Timofei Maksimov Date: Thu, 20 Aug 2026 15:04:00 +0200 Subject: [PATCH 2/3] fix: cargo clippy --- src/commands/aerocloud/v7/batch/simulation_params.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/aerocloud/v7/batch/simulation_params.rs b/src/commands/aerocloud/v7/batch/simulation_params.rs index 18a77df..87b590c 100644 --- a/src/commands/aerocloud/v7/batch/simulation_params.rs +++ b/src/commands/aerocloud/v7/batch/simulation_params.rs @@ -357,8 +357,8 @@ impl SimulationParams { project_id, quality, revision, - yaw_angles, symmetry, + yaw_angles, } } } From 7568cce181df07e73630c523a79edb476eec9efe Mon Sep 17 00:00:00 2001 From: Federico Ravasio Date: Wed, 2 Sep 2026 14:53:24 +0000 Subject: [PATCH 3/3] fix: minor adjustments --- CHANGELOG.md | 2 +- src/aerocloud/extra_types.rs | 2 +- src/commands/aerocloud/v7/batch/simulation_detail.rs | 10 ++++------ src/commands/aerocloud/v7/batch/simulation_params.rs | 2 +- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d926c4e..73af8b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# 1.6.0 - Unreleased +# Unreleased ## AeroCloud diff --git a/src/aerocloud/extra_types.rs b/src/aerocloud/extra_types.rs index 540ae62..a5a324a 100644 --- a/src/aerocloud/extra_types.rs +++ b/src/aerocloud/extra_types.rs @@ -42,7 +42,7 @@ pub struct CreateSimulationV7ParamsFromJson { pub assistant: bool, #[serde(default)] - pub symmetry: Option, + pub symmetry: Symmetry, #[serde(default)] pub model_id: Option, diff --git a/src/commands/aerocloud/v7/batch/simulation_detail.rs b/src/commands/aerocloud/v7/batch/simulation_detail.rs index 6aeea6b..fcd8380 100644 --- a/src/commands/aerocloud/v7/batch/simulation_detail.rs +++ b/src/commands/aerocloud/v7/batch/simulation_detail.rs @@ -199,12 +199,10 @@ impl<'a> SimulationDetail<'a> { lines.push(Line::default()); - if let Some(v) = sim.params.symmetry { - lines.push(Line::from(vec![ - Span::styled("Symmetry: ", STYLE_BOLD), - Span::styled(fmt::human_symmetry(v), STYLE_ACCENT), - ])); - } + lines.push(Line::from(vec![ + Span::styled("Symmetry: ", STYLE_BOLD), + Span::styled(fmt::human_symmetry(sim.params.symmetry), STYLE_ACCENT), + ])); } fn new_model(files: &'a [FileParams], lines: &mut Vec>) { diff --git a/src/commands/aerocloud/v7/batch/simulation_params.rs b/src/commands/aerocloud/v7/batch/simulation_params.rs index 87b590c..60880c5 100644 --- a/src/commands/aerocloud/v7/batch/simulation_params.rs +++ b/src/commands/aerocloud/v7/batch/simulation_params.rs @@ -357,7 +357,7 @@ impl SimulationParams { project_id, quality, revision, - symmetry, + symmetry: Some(symmetry), yaw_angles, } }