Next Gen STEP AP242 Native-ish BREP Geometric Modeling Kernel
Harden FTC-11 PMI injection demo
Yuechen Lif7221cb6370b
diff --git a/demos/Aetheris.PmiInjectionDemo/Program.cs b/demos/Aetheris.PmiInjectionDemo/Program.csindex 82f43f0f..2c13caad 100644--- a/demos/Aetheris.PmiInjectionDemo/Program.cs+++ b/demos/Aetheris.PmiInjectionDemo/Program.cs@@ -1,76 +1,108 @@using System.Globalization;using System.Text.Json;+using System.Text.RegularExpressions;using Aetheris.Kernel.Core.Step242;using Aetheris.Kernel.Firmament;const string inputFileName = "nist_ftc_11_asme1_ap242-e2.stp";-var options = DemoOptions.Parse(args);-var demoDir = AppContext.BaseDirectory;-var repoDemoDir = FindRepoDemoDir() ?? demoDir;-var assetInput = Path.Combine(repoDemoDir, "assets", inputFileName);-var outDir = Path.GetFullPath(options.OutDir ?? Path.Combine(repoDemoDir, "out"));--if (!File.Exists(assetInput)) return Fail($"Bundled FTC-11 asset not found: {assetInput}");-if (Directory.Exists(outDir) && !options.Keep) Directory.Delete(outDir, recursive: true);-Directory.CreateDirectory(outDir);--var inputStep = Path.Combine(outDir, inputFileName);-var canonicalStep = Path.Combine(outDir, Path.GetFileNameWithoutExtension(inputFileName) + ".canonical.step");-var overlayStepRelative = "./" + Path.GetFileName(canonicalStep);-var overlayPath = Path.Combine(outDir, "ftc11-pmi-overlay.firm");-var outputStep = Path.Combine(outDir, "ftc11-with-aetheris-pmi.step");-var reportPath = Path.Combine(outDir, "demo-report.json");--File.Copy(assetInput, inputStep, overwrite: true);-var inputText = File.ReadAllText(inputStep);-var inputImport = Step242Importer.ImportBody(inputText);-if (!inputImport.IsSuccess) return Fail("Input FTC-11 STEP import failed: " + string.Join("; ", inputImport.Diagnostics.Select(d => d.Message)));-var canonicalExport = Step242Exporter.ExportBody(inputImport.Value);-if (!canonicalExport.IsSuccess) return Fail("Canonical AP242 export failed: " + string.Join("; ", canonicalExport.Diagnostics.Select(d => d.Message)));-File.WriteAllText(canonicalStep, canonicalExport.Value);--if (options.FirmPath is { } firmPath)-{- File.Copy(Path.GetFullPath(firmPath), overlayPath, overwrite: true);-}-else+const string canonicalFileName = "nist_ftc_11_asme1_ap242-e2.canonical.step";+const string generatedOverlayFileName = "ftc11-pmi-overlay.firm";+const string outputFileName = "ftc11-with-aetheris-pmi.step";+const string reportFileName = "demo-report.json";+const string volumeUnsupportedStatus = "unsupported-curved-trimmed-shell";+const string volumeUnsupportedMessage = "Exact volume integration is currently unsupported for this FTC-11 curved trimmed-shell case; this demo verifies STEP import/reimport and semantic PMI evidence instead of exact FTC-11 volume equality.";++try{- File.WriteAllText(overlayPath, BuildOverlay(overlayStepRelative, options.PmiLabel, options.PmiValue));-}+ var options = DemoOptions.Parse(args);+ var demoDir = AppContext.BaseDirectory;+ var repoDemoDir = FindRepoDemoDir() ?? demoDir;+ var assetInput = Path.Combine(repoDemoDir, "assets", inputFileName);+ var outDir = Path.GetFullPath(options.OutDir ?? Path.Combine(repoDemoDir, "out"));++ if (!File.Exists(assetInput)) return Fail($"Bundled FTC-11 asset not found: {assetInput}");+ if (options.FirmPath is { } requestedFirm && !File.Exists(requestedFirm)) return Fail($"Firmament overlay not found: {Path.GetFullPath(requestedFirm)}");++ Directory.CreateDirectory(outDir);++ var inputStep = Path.Combine(outDir, inputFileName);+ var canonicalStep = Path.Combine(outDir, canonicalFileName);+ var overlayStepRelative = "./" + Path.GetFileName(canonicalStep);+ var overlayPath = Path.Combine(outDir, generatedOverlayFileName);+ var outputStep = Path.Combine(outDir, outputFileName);+ var reportPath = Path.Combine(outDir, reportFileName);+ var externalFirmPath = options.FirmPath is null ? null : Path.GetFullPath(options.FirmPath);++ if (!options.Keep) CleanGeneratedFiles(inputStep, canonicalStep, overlayPath, outputStep, reportPath, externalFirmPath);++ File.Copy(assetInput, inputStep, overwrite: true);+ var inputText = File.ReadAllText(inputStep);+ var inputImport = Step242Importer.ImportBody(inputText);+ if (!inputImport.IsSuccess) return Fail("Input FTC-11 STEP import failed: " + string.Join("; ", inputImport.Diagnostics.Select(d => d.Message)));++ var canonicalExport = Step242Exporter.ExportBody(inputImport.Value);+ if (!canonicalExport.IsSuccess) return Fail("Canonical AP242 export failed: " + string.Join("; ", canonicalExport.Diagnostics.Select(d => d.Message)));+ File.WriteAllText(canonicalStep, canonicalExport.Value);++ var canonicalImport = Step242Importer.ImportBody(File.ReadAllText(canonicalStep));+ if (!canonicalImport.IsSuccess) return Fail("Canonical AP242 import failed: " + string.Join("; ", canonicalImport.Diagnostics.Select(d => d.Message)));++ var overlayUsed = overlayPath;+ if (externalFirmPath is { } firmPath)+ {+ if (!SamePath(firmPath, overlayPath)) File.Copy(firmPath, overlayPath, overwrite: true);+ }+ else+ {+ File.WriteAllText(overlayPath, BuildOverlay(overlayStepRelative, options.PmiLabel, options.PmiValue));+ }-var build = FirmamentBuildAndExport.Run(overlayPath, outputStep);-if (!build.IsSuccess) return Fail("Firmament InlineStep PMI export failed: " + string.Join("; ", build.Diagnostics.Select(d => d.Message)));+ var build = FirmamentBuildAndExport.Run(overlayUsed, outputStep);+ if (!build.IsSuccess) return Fail("Firmament InlineStep PMI export failed: " + string.Join("; ", build.Diagnostics.Select(d => d.Message)));-var outputText = File.ReadAllText(outputStep);-var outputImport = Step242Importer.ImportBody(outputText);-if (!outputImport.IsSuccess) return Fail("Enriched AP242 reimport failed: " + string.Join("; ", outputImport.Diagnostics.Select(d => d.Message)));+ var outputText = File.ReadAllText(outputStep);+ var outputImport = Step242Importer.ImportBody(outputText);+ if (!outputImport.IsSuccess) return Fail("Enriched AP242 reimport failed: " + string.Join("; ", outputImport.Diagnostics.Select(d => d.Message)));-var canonicalImport = Step242Importer.ImportBody(File.ReadAllText(canonicalStep));-var inputVolume = BoundingBoxVolume(inputImport.Value);-var canonicalVolume = canonicalImport.IsSuccess ? BoundingBoxVolume(canonicalImport.Value) : double.NaN;-var outputVolume = BoundingBoxVolume(outputImport.Value);-var geometryPreserved = NearlyEqual(inputVolume, outputVolume) && NearlyEqual(canonicalVolume, outputVolume);-var evidence = new[]+ var expectedEvidence = ExpectedEvidence(options.PmiLabel, options.PmiValue);+ var evidence = expectedEvidence.Where(s => outputText.Contains(s, StringComparison.Ordinal)).ToArray();+ var pmiEvidenceFound = evidence.Length == expectedEvidence.Length;+ if (!pmiEvidenceFound)+ {+ return Fail("PMI evidence missing from enriched AP242. Expected evidence strings: " + string.Join(" | ", expectedEvidence));+ }++ var report = new DemoReport(+ InputNistStep: inputStep,+ CanonicalStep: canonicalStep,+ FirmamentOverlay: overlayPath,+ FirmamentOverlaySource: externalFirmPath,+ OutputStep: outputStep,+ PmiLabel: options.PmiLabel,+ PmiValue: options.PmiValue.ToString("0.############", CultureInfo.InvariantCulture),+ InputStepImported: inputImport.IsSuccess,+ CanonicalStepImported: canonicalImport.IsSuccess,+ OutputStepImported: outputImport.IsSuccess,+ GeometryRoundTripOk: inputImport.IsSuccess && canonicalImport.IsSuccess && outputImport.IsSuccess,+ VolumeCheckSupported: false,+ VolumeCheckStatus: volumeUnsupportedStatus,+ VolumeCheckMessage: volumeUnsupportedMessage,+ InputVolume: null,+ OutputVolume: null,+ VolumeDelta: null,+ VolumeWithinTolerance: null,+ PmiEvidenceFound: pmiEvidenceFound,+ PmiEvidence: evidence,+ ExpectedPmiEvidence: expectedEvidence);+ File.WriteAllText(reportPath, JsonSerializer.Serialize(report, new JsonSerializerOptions { WriteIndented = true, PropertyNamingPolicy = JsonNamingPolicy.CamelCase }));++ PrintReceipt(ToDisplayPath(repoDemoDir, assetInput), ToDisplayPath(repoDemoDir, canonicalStep), ToDisplayPath(repoDemoDir, overlayPath), ToDisplayPath(repoDemoDir, outputStep), ToDisplayPath(repoDemoDir, reportPath));+ return 0;+}+catch (ArgumentException ex){- $"SHAPE_DIMENSION_REPRESENTATION('diameter:ftc11.{options.PmiLabel}'",- $"PROPERTY_DEFINITION('diameter:ftc11.{options.PmiLabel}'",- "MEASURE_REPRESENTATION_ITEM('diameter'," + options.PmiValue.ToString("0.############", CultureInfo.InvariantCulture),- "diameter"-}.Where(s => outputText.Contains(s, StringComparison.Ordinal)).ToArray();-var pmiEvidenceFound = evidence.Length >= 3;--var report = new DemoReport(inputStep, canonicalStep, overlayPath, outputStep, options.PmiLabel, options.PmiValue.ToString(CultureInfo.InvariantCulture), geometryPreserved, inputVolume, outputVolume, pmiEvidenceFound, evidence);-File.WriteAllText(reportPath, JsonSerializer.Serialize(report, new JsonSerializerOptions { WriteIndented = true, PropertyNamingPolicy = JsonNamingPolicy.CamelCase }));--Console.WriteLine("Aetheris PMI injection demo receipt");-Console.WriteLine($" input STEP: {inputStep}");-Console.WriteLine($" canonical STEP: {canonicalStep}");-Console.WriteLine($" Firmament overlay: {overlayPath}");-Console.WriteLine($" enriched AP242: {outputStep}");-Console.WriteLine($" report: {reportPath}");-Console.WriteLine($" geometry volume unchanged: {geometryPreserved} ({inputVolume:R} -> {outputVolume:R})");-Console.WriteLine($" PMI evidence found: {pmiEvidenceFound} ({string.Join(", ", evidence)})");-return geometryPreserved && pmiEvidenceFound ? 0 : 1;+ return Fail(ex.Message);+}static string BuildOverlay(string canonicalStepPath, string label, double value) => $$"""// Editable Aetheris/Firmament PMI overlay for the NIST FTC-11 demo.@@ -93,16 +125,52 @@ model AetherisPmiInjectionDemoFtc11 {}""";-static double BoundingBoxVolume(Aetheris.Kernel.Core.Brep.BrepBody body)+static string[] ExpectedEvidence(string label, double value) =>+[+ $"SHAPE_DIMENSION_REPRESENTATION('diameter:ftc11.{label}'",+ $"PROPERTY_DEFINITION('diameter:ftc11.{label}'",+ "MEASURE_REPRESENTATION_ITEM('diameter'," + value.ToString("0.############", CultureInfo.InvariantCulture)+];++static void CleanGeneratedFiles(string inputStep, string canonicalStep, string overlayPath, string outputStep, string reportPath, string? externalFirmPath){- var points = body.Topology.Vertices.Select(v => body.TryGetVertexPoint(v.Id, out var p) ? p : throw new InvalidOperationException($"Vertex {v.Id.Value} has no point.")).ToArray();- var minX = points.Min(p => p.X); var maxX = points.Max(p => p.X);- var minY = points.Min(p => p.Y); var maxY = points.Max(p => p.Y);- var minZ = points.Min(p => p.Z); var maxZ = points.Max(p => p.Z);- return (maxX - minX) * (maxY - minY) * (maxZ - minZ);+ foreach (var path in new[] { inputStep, canonicalStep, overlayPath, outputStep, reportPath })+ {+ if (externalFirmPath is not null && SamePath(path, externalFirmPath)) continue;+ if (File.Exists(path)) File.Delete(path);+ }+}++static void PrintReceipt(string inputStep, string canonicalStep, string overlayPath, string outputStep, string reportPath)+{+ Console.WriteLine("Aetheris FTC-11 AP242 PMI Injection Demo");+ Console.WriteLine("────────────────────────────────────────");+ Console.WriteLine("Input NIST STEP:");+ Console.WriteLine($" {inputStep}");+ Console.WriteLine();+ Console.WriteLine("Canonical AP242:");+ Console.WriteLine($" {canonicalStep}");+ Console.WriteLine();+ Console.WriteLine("Firmament overlay:");+ Console.WriteLine($" {overlayPath}");+ Console.WriteLine();+ Console.WriteLine("Enriched AP242:");+ Console.WriteLine($" {outputStep}");+ Console.WriteLine();+ Console.WriteLine("Checks:");+ Console.WriteLine(" input import: ok");+ Console.WriteLine(" canonical import: ok");+ Console.WriteLine(" enriched AP242 reimport: ok");+ Console.WriteLine(" PMI evidence: ok");+ Console.WriteLine(" exact volume: unsupported for this curved trimmed-shell FTC-11 case");+ Console.WriteLine();+ Console.WriteLine("Report:");+ Console.WriteLine($" {reportPath}");}-static bool NearlyEqual(double a, double b) => double.IsFinite(a) && double.IsFinite(b) && Math.Abs(a - b) <= Math.Max(1e-7, Math.Abs(a) * 1e-9);+static int Fail(string message) { Console.Error.WriteLine(message); return 1; }+static bool SamePath(string left, string right) => string.Equals(Path.GetFullPath(left).TrimEnd(Path.DirectorySeparatorChar), Path.GetFullPath(right).TrimEnd(Path.DirectorySeparatorChar), StringComparison.OrdinalIgnoreCase);+static string ToDisplayPath(string repoDemoDir, string path) => Path.GetRelativePath(repoDemoDir, path).Replace(Path.DirectorySeparatorChar, '/');static string? FindRepoDemoDir(){var dir = new DirectoryInfo(Directory.GetCurrentDirectory());@@ -115,9 +183,11 @@ static string? FindRepoDemoDir()return null;}-sealed record DemoReport(string InputStep, string CanonicalStep, string FirmamentOverlay, string OutputStep, string PmiLabel, string PmiValue, bool GeometryPreserved, double InputVolume, double OutputVolume, bool PmiEvidenceFound, string[] SemanticPmiEvidence);+sealed record DemoReport(string InputNistStep, string CanonicalStep, string FirmamentOverlay, string? FirmamentOverlaySource, string OutputStep, string PmiLabel, string PmiValue, bool InputStepImported, bool CanonicalStepImported, bool OutputStepImported, bool GeometryRoundTripOk, bool VolumeCheckSupported, string VolumeCheckStatus, string VolumeCheckMessage, double? InputVolume, double? OutputVolume, double? VolumeDelta, bool? VolumeWithinTolerance, bool PmiEvidenceFound, string[] PmiEvidence, string[] ExpectedPmiEvidence);sealed record DemoOptions(string? OutDir, double PmiValue, string PmiLabel, bool Keep, string? FirmPath){+ private static readonly Regex Identifier = new("^[A-Za-z_][A-Za-z0-9_]*$", RegexOptions.CultureInvariant);+public static DemoOptions Parse(string[] args){string? outDir = null; var value = 32.2d; var label = "demoInnerDiameter"; var keep = false; string? firm = null;@@ -126,13 +196,19 @@ sealed record DemoOptions(string? OutDir, double PmiValue, string PmiLabel, boolswitch (args[i]){case "--out" when i + 1 < args.Length: outDir = args[++i]; break;- case "--pmi-value" when i + 1 < args.Length: value = double.Parse(args[++i], CultureInfo.InvariantCulture); break;+ case "--pmi-value" when i + 1 < args.Length:+ if (!double.TryParse(args[++i], NumberStyles.Float, CultureInfo.InvariantCulture, out value)) throw new ArgumentException("Invalid --pmi-value. Use a positive finite number in invariant-culture format, for example 33.0.");+ break;case "--pmi-label" when i + 1 < args.Length: label = args[++i]; break;case "--keep": keep = true; break;case "--firm" when i + 1 < args.Length: firm = args[++i]; break;- default: throw new ArgumentException($"Unknown option '{args[i]}'.");+ default: throw new ArgumentException($"Unknown or incomplete option '{args[i]}'.");}}++ if (!double.IsFinite(value) || value <= 0d) throw new ArgumentException("Invalid --pmi-value. Value must be a positive finite number.");+ if (string.IsNullOrWhiteSpace(label)) throw new ArgumentException("Invalid --pmi-label. Label must be a non-empty Firmament identifier.");+ if (!Identifier.IsMatch(label)) throw new ArgumentException("Invalid --pmi-label. Label must be a simple Firmament identifier: letters, digits, or underscores, not starting with a digit.");return new(outDir, value, label, keep, firm);}}diff --git a/demos/Aetheris.PmiInjectionDemo/README.md b/demos/Aetheris.PmiInjectionDemo/README.mdindex 32f6c27d..810ce86f 100644--- a/demos/Aetheris.PmiInjectionDemo/README.md+++ b/demos/Aetheris.PmiInjectionDemo/README.md@@ -1,57 +1,71 @@-# Aetheris PMI Injection Demo+# Aetheris FTC-11 AP242 PMI Injection Demo-This demo takes a public NIST AP242 PMI test model, wraps it in Firmament InlineStep, injects editable semantic PMI, and emits an enriched AP242 STEP file.--Aetheris demonstrates a lightweight, scriptable AP242 PMI enrichment workflow:+This product-facing demo shows a conservative Aetheris workflow for adding editable semantic PMI to a public NIST AP242 STEP model:```text-Existing AP242 STEP in- -> Aetheris canonicalizes it- -> Firmament wraps it as InlineStep- -> editable PMI overlay adds semantic PMI+public NIST AP242 STEP model in+ -> Aetheris-canonical AP242 STEP+ -> editable Firmament InlineStep PMI overlay-> enriched AP242 STEP out- -> geometry remains unchanged- -> PMI evidence is present+ -> PMI evidence present+ -> STEP import/reimport pipeline remains valid```-## Why FTC-11 is bundled+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.-The bundled STEP file is copied from the repository’s vendored NIST PMI FTC-11 test data and preserves the original filename so users can compare it against the public NIST distribution.+## Bundled FTC-11 STEP asset-* Demo asset: `assets/nist_ftc_11_asme1_ap242-e2.stp`-* Vendored source: `testdata/step242/nist/FTC/nist_ftc_11_asme1_ap242-e2.stp`+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.-## Run the demo+* Demo asset: `demos/Aetheris.PmiInjectionDemo/assets/nist_ftc_11_asme1_ap242-e2.stp`+* Vendored source: `testdata/step242/nist/FTC/nist_ftc_11_asme1_ap242-e2.stp`+* Original filename preserved: `nist_ftc_11_asme1_ap242-e2.stp`-From the repository root:+## Run from the repository root```bashdotnet run --project demos/Aetheris.PmiInjectionDemo```-By default, outputs are written to `demos/Aetheris.PmiInjectionDemo/out`.+Default outputs are written to `demos/Aetheris.PmiInjectionDemo/out`. Without `--keep`, the demo removes only its known generated files before the run and then overwrites them deterministically. With `--keep`, existing files are preserved where possible, while the current run still writes the expected output paths.++A successful default run prints a receipt with the input STEP, canonical STEP, Firmament overlay, enriched AP242 output, checks, and report path.## Change the PMI value or label+Use `--pmi-value` and `--pmi-label` to generate a different semantic PMI overlay:+```bashdotnet run --project demos/Aetheris.PmiInjectionDemo -- --pmi-value 33.0 --pmi-label demoInnerDiameter33```-You can also provide an edited overlay:+The generated overlay will contain the requested label and a millimeter value such as `33mm` or `33.0mm` depending on numeric formatting. Labels must be simple Firmament identifiers: letters, digits, or underscores, not starting with a digit. Values must be positive finite numbers.++## Edit the Firmament overlay manually++After a default run, edit:++```text+demos/Aetheris.PmiInjectionDemo/out/ftc11-pmi-overlay.firm+```++Then run with the edited overlay:```bash-dotnet run --project demos/Aetheris.PmiInjectionDemo -- --firm path/to/edited-overlay.firm --keep+dotnet run --project demos/Aetheris.PmiInjectionDemo -- --firm demos/Aetheris.PmiInjectionDemo/out/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 filesA default run writes:-* `nist_ftc_11_asme1_ap242-e2.stp` — copied FTC-11 input with the original filename.-* `nist_ftc_11_asme1_ap242-e2.canonical.step` — Aetheris-canonical AP242.-* `ftc11-pmi-overlay.firm` — editable Firmament InlineStep PMI overlay.-* `ftc11-with-aetheris-pmi.step` — enriched AP242 STEP output.-* `demo-report.json` — receipt with paths, PMI evidence, and geometry preservation status.+* `out/nist_ftc_11_asme1_ap242-e2.stp` — copied FTC-11 input with the original NIST filename.+* `out/nist_ftc_11_asme1_ap242-e2.canonical.step` — Aetheris-canonical AP242 generated from the bundled input.+* `out/ftc11-pmi-overlay.firm` — editable Firmament InlineStep PMI overlay.+* `out/ftc11-with-aetheris-pmi.step` — enriched AP242 STEP output.+* `out/demo-report.json` — machine-readable receipt with import statuses, PMI label/value, PMI evidence, and exact-volume caveat fields.## What to inspect in the overlay@@ -62,7 +76,7 @@ Open `out/ftc11-pmi-overlay.firm`. The important parts are:* `value: <number>mm` changes the emitted semantic PMI value.* `target: ftc11.face("#304")` is a stable imported canonical face reference selected from the canonicalized FTC-11 demo asset.-## What to inspect in the AP242 output+## What to inspect in the enriched AP242 outputOpen `out/ftc11-with-aetheris-pmi.step` and search for semantic PMI evidence such as:@@ -70,8 +84,30 @@ Open `out/ftc11-with-aetheris-pmi.step` and search for semantic PMI evidence suc* `PROPERTY_DEFINITION('diameter:ftc11.<label>'`* `MEASURE_REPRESENTATION_ITEM('diameter',<value>`-The demo also reimports the output STEP and writes `pmiEvidenceFound: true` to `demo-report.json` when the expected semantic PMI evidence is present.+The demo reimports the enriched AP242 output and writes `pmiEvidenceFound: true` to `out/demo-report.json` when all expected semantic PMI evidence strings are present.++## Report semantics and exact volume caveat++The report intentionally separates STEP/import validity from exact volume analysis:++* `inputStepImported`, `canonicalStepImported`, and `outputStepImported` indicate that the input, canonicalized, and enriched STEP files import through the Aetheris AP242 path.+* `geometryRoundTripOk` means those import/reimport checks succeeded for the demo pipeline. It does **not** mean exact FTC-11 volume equality was verified.+* `volumeCheckSupported` is currently `false` for FTC-11.+* `volumeCheckStatus` is currently `unsupported-curved-trimmed-shell` for FTC-11.+* `volumeCheckMessage` explains that exact curved trimmed-shell integration is not currently supported for this model.++If a future simpler input supports exact volume analysis, the report structure is ready to carry `inputVolume`, `outputVolume`, `volumeDelta`, and `volumeWithinTolerance`. For FTC-11, those fields remain `null` rather than faking exact volume preservation.## Limitations-This is a product-facing PMI enrichment demo, not a full MBD replacement. It does not claim graphical PMI, drawing views, automatic recognition, automatic decompilation, full GD&T authoring, or universal raw vendor STEP support. Raw STEP is canonicalized before InlineStep is used.+This is a short AP242 semantic PMI enrichment proof, not a broad MBD or CAD replacement. It intentionally does not add or claim:++* graphical PMI;+* drawing views;+* automatic decompilation;+* automatic recognition;+* SolidWorks MBD replacement behavior;+* general vendor STEP support through InlineStep directly;+* direct raw STEP wrapping without canonicalization.++Canonicalization happens first, and the Firmament InlineStep overlay references the canonical AP242 output.