Skip to content

Next Gen STEP AP242 Native-ish BREP Geometric Modeling Kernel

Document demo runner and exclude it from solution build

Yuechen Libcd72a0ff38e
diff --git a/Aetheris.slnx b/Aetheris.slnx
index a7fedde8..4b83eb0c 100644
--- a/Aetheris.slnx
+++ b/Aetheris.slnx
@@ -15,5 +15,7 @@
<Project Path="Aetheris.CLI/Aetheris.CLI.csproj" />
<Project Path="Aetheris.CLI.Tests/Aetheris.CLI.Tests.csproj" />
<Project Path="Aetheris.Kernel.Core.Tests/Aetheris.Kernel.Core.Tests.csproj" />
- <Project Path="demos/Aetheris.PmiInjectionDemo/Aetheris.PmiInjectionDemo.csproj" />
+ <Project Path="demos/Aetheris.PmiInjectionDemo/Aetheris.PmiInjectionDemo.csproj">
+ <Build Solution="Debug|*" Project="false" />
+ </Project>
</Solution>
diff --git a/demos/Aetheris.PmiInjectionDemo/README.md b/demos/Aetheris.PmiInjectionDemo/README.md
index 810ce86f..06b3f6d3 100644
--- a/demos/Aetheris.PmiInjectionDemo/README.md
+++ b/demos/Aetheris.PmiInjectionDemo/README.md
@@ -13,6 +13,28 @@ public NIST AP242 STEP model in
The demo does **not** claim exact FTC-11 volume equality. For FTC-11, the current exact volume analyzer reports unsupported curved trimmed-shell integration on cylinder faces, so the demo verifies import/reimport validity and PMI evidence instead.
+## Fast path on Windows / PowerShell
+
+Recommended human-friendly demo path:
+
+```powershell
+.\demos\Aetheris.PmiInjectionDemo\Run-PmiInjectionDemo.ps1 -Open
+```
+
+Custom PMI example:
+
+```powershell
+.\demos\Aetheris.PmiInjectionDemo\Run-PmiInjectionDemo.ps1 -PmiValue 33.0 -PmiLabel demoInnerDiameter33 -Open
+```
+
+The script writes to `demo-output/pmi-injection` by default, prints the absolute output path, lists the generated files, and shows the exact `explorer` command to open the folder. A repo-root convenience wrapper is also available:
+
+```powershell
+.\tools\Run-PmiInjectionDemo.ps1 -Open
+```
+
+`dotnet run --project demos/Aetheris.PmiInjectionDemo` still works and keeps the existing demo behavior. The PowerShell script is the recommended path for people running the demo locally.
+
## Bundled FTC-11 STEP asset
The bundled STEP file is copied from the repository's vendored NIST PMI FTC-11 test data. The original NIST filename is intentionally preserved so the demo input is easy to trace and compare.
@@ -31,6 +53,14 @@ Default outputs are written to `demos/Aetheris.PmiInjectionDemo/out`. Without `-
A successful default run prints a receipt with the input STEP, canonical STEP, Firmament overlay, enriched AP242 output, checks, and report path.
+If you want the more obvious repo-root output location for local demo use, prefer:
+
+```powershell
+.\demos\Aetheris.PmiInjectionDemo\Run-PmiInjectionDemo.ps1
+```
+
+That script passes `--out demo-output/pmi-injection` to the demo without changing the executable's own default behavior.
+
## Change the PMI value or label
Use `--pmi-value` and `--pmi-label` to generate a different semantic PMI overlay:
@@ -55,6 +85,12 @@ Then run with the edited overlay:
dotnet run --project demos/Aetheris.PmiInjectionDemo -- --firm demos/Aetheris.PmiInjectionDemo/out/ftc11-pmi-overlay.firm --keep
```
+Or use the PowerShell runner with a visible repo-root output directory:
+
+```powershell
+.\demos\Aetheris.PmiInjectionDemo\Run-PmiInjectionDemo.ps1 -Firm .\demo-output\pmi-injection\ftc11-pmi-overlay.firm -Keep
+```
+
For an external overlay path, the demo validates that the file exists and copies it into the output directory before building. It does not overwrite or delete the user-provided source overlay.
## Output files
diff --git a/demos/Aetheris.PmiInjectionDemo/Run-PmiInjectionDemo.ps1 b/demos/Aetheris.PmiInjectionDemo/Run-PmiInjectionDemo.ps1
new file mode 100644
index 00000000..3ba31e8e
--- /dev/null
+++ b/demos/Aetheris.PmiInjectionDemo/Run-PmiInjectionDemo.ps1
@@ -0,0 +1,139 @@
+[CmdletBinding()]
+param(
+ [double]$PmiValue = 32.2,
+ [string]$PmiLabel = "demoInnerDiameter",
+ [string]$Out,
+ [string]$Firm,
+ [switch]$Keep,
+ [switch]$Open
+)
+
+$ErrorActionPreference = "Stop"
+Set-StrictMode -Version Latest
+
+function Get-RepoRoot {
+ param(
+ [Parameter(Mandatory = $true)]
+ [string]$StartPath
+ )
+
+ $current = [System.IO.DirectoryInfo](Resolve-Path -LiteralPath $StartPath).Path
+ while ($null -ne $current) {
+ $solutionPath = Join-Path $current.FullName "Aetheris.slnx"
+ $demoProjectPath = Join-Path $current.FullName "demos\Aetheris.PmiInjectionDemo\Aetheris.PmiInjectionDemo.csproj"
+ if ((Test-Path -LiteralPath $solutionPath) -and (Test-Path -LiteralPath $demoProjectPath)) {
+ return $current.FullName
+ }
+
+ $current = $current.Parent
+ }
+
+ throw "Could not resolve the Aetheris repository root from '$StartPath'."
+}
+
+function Resolve-AbsolutePath {
+ param(
+ [Parameter(Mandatory = $true)]
+ [string]$Path,
+ [Parameter(Mandatory = $true)]
+ [string]$BasePath
+ )
+
+ if ([System.IO.Path]::IsPathRooted($Path)) {
+ return [System.IO.Path]::GetFullPath($Path)
+ }
+
+ return [System.IO.Path]::GetFullPath((Join-Path $BasePath $Path))
+}
+
+$repoRoot = Get-RepoRoot -StartPath $PSScriptRoot
+$demoProject = Join-Path $repoRoot "demos\Aetheris.PmiInjectionDemo\Aetheris.PmiInjectionDemo.csproj"
+$outputDir = if ([string]::IsNullOrWhiteSpace($Out)) {
+ Join-Path $repoRoot "demo-output\pmi-injection"
+} else {
+ Resolve-AbsolutePath -Path $Out -BasePath (Get-Location).Path
+}
+
+$firmPath = if ([string]::IsNullOrWhiteSpace($Firm)) {
+ $null
+} else {
+ Resolve-AbsolutePath -Path $Firm -BasePath (Get-Location).Path
+}
+
+if ($firmPath -and -not (Test-Path -LiteralPath $firmPath)) {
+ throw "Firmament overlay not found: $firmPath"
+}
+
+New-Item -ItemType Directory -Path $outputDir -Force | Out-Null
+
+$demoArgs = @(
+ "run"
+ "--project"
+ $demoProject
+ "--"
+ "--out"
+ $outputDir
+ "--pmi-value"
+ $PmiValue.ToString([System.Globalization.CultureInfo]::InvariantCulture)
+ "--pmi-label"
+ $PmiLabel
+)
+
+if ($Keep) {
+ $demoArgs += "--keep"
+}
+
+if ($firmPath) {
+ $demoArgs += @("--firm", $firmPath)
+}
+
+Write-Host "Aetheris FTC-11 PMI Injection Demo Runner"
+Write-Host "────────────────────────────────────────"
+Write-Host "Repo root:"
+Write-Host " $repoRoot"
+Write-Host ""
+Write-Host "Demo project:"
+Write-Host " $demoProject"
+Write-Host ""
+Write-Host "Output directory:"
+Write-Host " $outputDir"
+Write-Host ""
+Write-Host "Running:"
+Write-Host " dotnet $($demoArgs -join ' ')"
+Write-Host ""
+
+& dotnet @demoArgs
+if ($LASTEXITCODE -ne 0) {
+ throw "PMI injection demo failed with exit code $LASTEXITCODE."
+}
+
+$generatedFiles = Get-ChildItem -LiteralPath $outputDir -File | Sort-Object Name
+$overlayOutputPath = Join-Path $outputDir "ftc11-pmi-overlay.firm"
+$enrichedStepPath = Join-Path $outputDir "ftc11-with-aetheris-pmi.step"
+$reportPath = Join-Path $outputDir "demo-report.json"
+
+Write-Host ""
+Write-Host "Generated files:"
+foreach ($file in $generatedFiles) {
+ Write-Host " $($file.Name)"
+}
+
+Write-Host ""
+Write-Host "Next:"
+Write-Host " Open the output folder:"
+Write-Host " explorer `"$outputDir`""
+Write-Host ""
+Write-Host " Edit the overlay:"
+Write-Host " $overlayOutputPath"
+Write-Host ""
+Write-Host " Inspect the enriched STEP:"
+Write-Host " $enrichedStepPath"
+Write-Host ""
+Write-Host " Check the machine-readable report:"
+Write-Host " $reportPath"
+
+if ($Open) {
+ Write-Host ""
+ Write-Host "Opening output folder..."
+ Invoke-Item -LiteralPath $outputDir
+}
diff --git a/tools/Run-PmiInjectionDemo.ps1 b/tools/Run-PmiInjectionDemo.ps1
new file mode 100644
index 00000000..a61c0167
--- /dev/null
+++ b/tools/Run-PmiInjectionDemo.ps1
@@ -0,0 +1,5 @@
+$ErrorActionPreference = "Stop"
+
+$scriptPath = Join-Path $PSScriptRoot "..\demos\Aetheris.PmiInjectionDemo\Run-PmiInjectionDemo.ps1"
+& $scriptPath @args
+exit $LASTEXITCODE