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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# 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
Expand Down
21 changes: 19 additions & 2 deletions schemas/aerocloud.json
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,9 @@
"revision": {
"type": "string"
},
"symmetry": {
"$ref": "#/components/schemas/Symmetry"
},
"yaw_angles": {
"$ref": "#/components/schemas/YawAngles"
}
Expand Down Expand Up @@ -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"
},
Expand Down Expand Up @@ -1124,6 +1127,9 @@
"quality": {
"$ref": "#/components/schemas/SimulationQuality"
},
"symmetry": {
"$ref": "#/components/schemas/Symmetry"
},
"yaw_angles": {
"$ref": "#/components/schemas/YawAngles"
}
Expand Down Expand Up @@ -1548,6 +1554,17 @@
"title": "SimulationV7",
"type": "object"
},
"Symmetry": {
"default": "off",
"enum": [
"off",
"center",
"left",
"right"
],
"title": "Symmetry",
"type": "string"
},
"Token": {
"discriminator": {
"propertyName": "type"
Expand Down
6 changes: 5 additions & 1 deletion src/aerocloud/extra_types.rs
Original file line number Diff line number Diff line change
@@ -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};
Expand Down Expand Up @@ -40,6 +41,9 @@ pub struct CreateSimulationV7ParamsFromJson {
#[serde(default)]
pub assistant: bool,

#[serde(default)]
pub symmetry: Symmetry,

#[serde(default)]
pub model_id: Option<Id>,

Expand Down
13 changes: 12 additions & 1 deletion src/aerocloud/fmt.rs
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -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",
}
}
7 changes: 7 additions & 0 deletions src/commands/aerocloud/v7/batch/simulation_detail.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,13 @@ impl<'a> SimulationDetail<'a> {
Span::styled("Assistant: ", STYLE_BOLD),
Span::styled(bool_to_human(sim.params.assistant), STYLE_ACCENT),
]));

lines.push(Line::default());

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<Line<'a>>) {
Expand Down
2 changes: 2 additions & 0 deletions src/commands/aerocloud/v7/batch/simulation_params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ impl SimulationParams {
revision,
yaw_angles,
assistant,
symmetry,
..
} = self.params;

Expand All @@ -356,6 +357,7 @@ impl SimulationParams {
project_id,
quality,
revision,
symmetry: Some(symmetry),
yaw_angles,
}
}
Expand Down