Next Gen STEP AP242 Native-ish BREP Geometric Modeling Kernel
Integrate PlasticShell workflows into the CLI
Yuechen Licb21601e3a3d
diff --git a/Aetheris.CLI.Tests/ModulesCommandTests.cs b/Aetheris.CLI.Tests/ModulesCommandTests.csindex 360714cf..8606f213 100644--- a/Aetheris.CLI.Tests/ModulesCommandTests.cs+++ b/Aetheris.CLI.Tests/ModulesCommandTests.cs@@ -9,7 +9,7 @@ public sealed class ModulesCommandTestspublic void ModulesJsonInspectsStableBuiltInsAndCapabilities(){var stdout=new StringWriter();var stderr=new StringWriter();var exit=CliRunner.Run(["modules","--json"],stdout,stderr);- Assert.Equal(0,exit);Assert.Empty(stderr.ToString());using var json=JsonDocument.Parse(stdout.ToString());var modules=json.RootElement.EnumerateArray().ToArray();Assert.Equal(["Aetheris.Core","Aetheris.Piping","Aetheris.Surfacing","Aetheris.SheetMetal"],modules.Select(m=>m.GetProperty("id").GetString()));Assert.Contains(modules.SelectMany(m=>m.GetProperty("capabilities").EnumerateArray()),c=>c.GetString()=="Piping.PipeRoute");+ Assert.Equal(0,exit);Assert.Empty(stderr.ToString());using var json=JsonDocument.Parse(stdout.ToString());var modules=json.RootElement.EnumerateArray().ToArray();Assert.Equal(["Aetheris.Core","Aetheris.Piping","Aetheris.Surfacing","Aetheris.PlasticShell","Aetheris.SheetMetal"],modules.Select(m=>m.GetProperty("id").GetString()));Assert.Contains(modules.SelectMany(m=>m.GetProperty("capabilities").EnumerateArray()),c=>c.GetString()=="Piping.PipeRoute");Assert.Contains(modules.SelectMany(m=>m.GetProperty("capabilities").EnumerateArray()),c=>c.GetString()=="PlasticShell.Intent");}[Fact]diff --git a/Aetheris.CLI/Aetheris.CLI.csproj b/Aetheris.CLI/Aetheris.CLI.csprojindex 2421edae..a5d18f3c 100644--- a/Aetheris.CLI/Aetheris.CLI.csproj+++ b/Aetheris.CLI/Aetheris.CLI.csproj@@ -28,6 +28,7 @@<ProjectReference Include="..\Aetheris.Modules.BuiltIn\Aetheris.Modules.BuiltIn.csproj" /><ProjectReference Include="..\Aetheris.Reconstruction\Aetheris.Reconstruction.csproj" /><ProjectReference Include="..\Aetheris.SheetMetal\Aetheris.SheetMetal.csproj" />+ <ProjectReference Include="..\Aetheris.PlasticShell\Aetheris.PlasticShell.csproj" /></ItemGroup><ItemGroup>diff --git a/Aetheris.CLI/CliRunner.cs b/Aetheris.CLI/CliRunner.csindex 0f8ad25a..54509755 100644--- a/Aetheris.CLI/CliRunner.cs+++ b/Aetheris.CLI/CliRunner.cs@@ -21,6 +21,7 @@ using Aetheris.FEA.Mechanics;using Aetheris.Semantics;using Aetheris.Modules.BuiltIn;using Aetheris.Piping;+using Aetheris.PlasticShell;using Aetheris.Surfacing;using Aetheris.Geometry;using Aetheris.SheetMetal;@@ -153,7 +154,8 @@ public static class CliRunnerprivate const string AsmInspectUsage = "Usage: aetheris asm inspect <assembly.firmament|assembly.firmasm> [--json] [--profile] [--out <report.json>]";private const string AsmImportStepUsage = "Usage: aetheris asm import-step <assembly.step> --out <directory> [--json]";private const string AsmExportAp242Usage = "Usage: aetheris asm export-ap242 <assembly.firmament|assembly.firmasm> --out <assembly.step> [--json]";- private const string ExperimentalUsage = "Usage: aetheris experimental <airchamfer-cube|airchamfer-corpus|prismatic-corpus|prismatic-map|loop-chamfer-corpus> [options]";+ private const string ExperimentalUsage = "Usage: aetheris experimental <airchamfer-cube|airchamfer-corpus|prismatic-corpus|prismatic-map|loop-chamfer-corpus|heightfield-art> [options]";+ private const string ExperimentalHeightFieldArtUsage = "Usage: aetheris experimental heightfield-art <plastic-shell.firmament> --out <art.step> [--json]";private const string ExperimentalAirChamferCubeUsage = "Usage: aetheris experimental airchamfer-cube --out <path> [--json]";private const string ExperimentalAirChamferCorpusUsage = "Usage: aetheris experimental airchamfer-corpus --out-dir <dir> [--json]";private const string ExperimentalPrismaticCorpusUsage = "Usage: aetheris experimental prismatic-corpus --out-dir <dir> [--json]";@@ -263,7 +265,20 @@ public static class CliRunnerif (string.Equals(Path.GetExtension(stepPath), ".firmament", StringComparison.OrdinalIgnoreCase)){var sourceText = File.Exists(stepPath) ? File.ReadAllText(stepPath) : string.Empty;- if (SculptingAuthoring.IsSculptingSource(sourceText))+ if (PlasticShellFirmament.LooksLikePlasticShell(sourceText))+ {+ var plastic = PlasticShellFirmament.Compile(sourceText, Path.GetFullPath(stepPath));+ var plasticExport = plastic.State is null ? null : PlasticShellStepExporter.Export(plastic.State, plastic.ModelName);+ if (!plastic.IsSuccess || plasticExport?.IsSuccess != true || plasticExport.Step is null)+ {+ var messages = plastic.Diagnostics.Select(x => $"{x.Code}: {x.Message}").Concat(plasticExport?.Diagnostics.Select(x => $"{x.Code}: {x.Message}") ?? []);+ if (json) stdout.WriteLine(JsonSerializer.Serialize(new { command = "verify", success = false, input = Path.GetFullPath(stepPath), diagnostics = messages }, JsonOptions));+ else foreach (var message in messages) stderr.WriteLine($"error: {message}");+ return 1;+ }+ var plasticStepPath = Path.ChangeExtension(Path.GetFullPath(stepPath), ".step"); File.WriteAllText(plasticStepPath, plasticExport.Step); stepPath = plasticStepPath;+ }+ else if (SculptingAuthoring.IsSculptingSource(sourceText)){var sculpt = SculptingAuthoring.Compile(sourceText);var sculptExport = sculpt.OutputState is null ? null : SculptStepExporter.Export(sculpt.OutputState, sculpt.ModelName);@@ -428,6 +443,8 @@ public static class CliRunner}}+ if (File.Exists(sourcePath) && PlasticShellFirmament.LooksLikePlasticShell(File.ReadAllText(sourcePath)))+ return RunPlasticShellBuild(sourcePath, outPath, json, stdout, stderr);if (File.Exists(sourcePath) && SheetMetalFirmament.LooksLikeSheetMetal(File.ReadAllText(sourcePath)))return RunSheetMetalAuthoredBuild(sourcePath, outPath, json, stdout, stderr);if (File.Exists(sourcePath) && SculptingAuthoring.IsSculptingSource(File.ReadAllText(sourcePath)))@@ -564,6 +581,31 @@ public static class CliRunnerreturn 0;}+ private static int RunPlasticShellBuild(string sourcePath, string? outPath, bool json, TextWriter stdout, TextWriter stderr)+ {+ var compile = PlasticShellFirmament.CompileFile(sourcePath);+ if (!compile.IsSuccess || compile.State is null)+ {+ if (json) stdout.WriteLine(JsonSerializer.Serialize(new { command = "build", success = false, input = Path.GetFullPath(sourcePath), domain = "PlasticShell", diagnostics = compile.Diagnostics }, JsonOptions));+ else { stderr.WriteLine("Build failed:"); foreach (var diagnostic in compile.Diagnostics) stderr.WriteLine($"- [{diagnostic.Severity}] {diagnostic.Code}: {diagnostic.Message}"); }+ return 1;+ }+ var export = PlasticShellStepExporter.Export(compile.State, compile.ModelName);+ if (!export.IsSuccess || export.Step is null)+ {+ if (json) stdout.WriteLine(JsonSerializer.Serialize(new { command = "build", success = false, input = Path.GetFullPath(sourcePath), domain = "PlasticShell", diagnostics = export.Diagnostics, surfaceInventory = export.Inventory }, JsonOptions));+ else foreach (var diagnostic in export.Diagnostics) stderr.WriteLine($"- [{diagnostic.Severity}] {diagnostic.Code}: {diagnostic.Message}");+ return 1;+ }+ var output = Path.GetFullPath(outPath ?? Path.ChangeExtension(sourcePath, ".step")); Directory.CreateDirectory(Path.GetDirectoryName(output)!); File.WriteAllText(output, export.Step);+ var evidencePath = Path.ChangeExtension(output, ".plastic-shell.json");+ File.WriteAllText(evidencePath, JsonSerializer.Serialize(new { compile.ModelName, compile.State.Intent, compile.State.StateId, compile.State.Delta, compile.State.Evidence, surfaceInventory = export.Inventory, productBoundary = new { bodies = compile.State.Body.Topology.Bodies.Count(), shells = compile.State.Body.Topology.Shells.Count(), rationalProductSurfaces = export.Inventory.RationalProductSurfaces } }, JsonOptions));+ var report = new { command = "build", success = true, input = Path.GetFullPath(sourcePath), output, evidence = evidencePath, domain = "PlasticShell", model = compile.ModelName, plasticShell = compile.State.Intent, state = compile.State.StateId, geometricDelta = compile.State.Delta, manufacturingEvidence = compile.State.Evidence, surfaceInventory = export.Inventory, rationalProductSurfaces = export.Inventory.RationalProductSurfaces, diagnostics = compile.Diagnostics };+ if (json) stdout.WriteLine(JsonSerializer.Serialize(report, JsonOptions));+ else { stdout.WriteLine($"Built {Path.GetFileName(sourcePath)}"); stdout.WriteLine($"STEP: {output}"); stdout.WriteLine($"PlasticShell: {compile.State.Intent.PlasticShellId}; wall {compile.State.Evidence.WallThickness.Minimum:G6}..{compile.State.Evidence.WallThickness.Maximum:G6} mm; selected ribs {compile.State.Evidence.RibNetwork?.SelectedCandidate ?? "none"}"); stdout.WriteLine($"Manufacturing evidence: {evidencePath}"); }+ return 0;+ }+private static object DescribeSculptState(BodyState state) => new{state.AuthoredName, state.StateId, state.PredecessorStateId, state.BodyStableId,@@ -1072,6 +1114,21 @@ Model CanonicalPanel {}var source = File.ReadAllText(fullPath);+ if (PlasticShellFirmament.LooksLikePlasticShell(source))+ {+ var plastic = PlasticShellFirmament.Compile(source, fullPath);+ var plasticReport = new { command = "inspect", success = plastic.IsSuccess, input = fullPath, domain = "PlasticShell", model = plastic.ModelName,+ plasticShell = plastic.Intent, state = plastic.State?.StateId, geometricDelta = plastic.State?.Delta, manufacturingEvidence = plastic.State?.Evidence, diagnostics = plastic.Diagnostics };+ if (json) stdout.WriteLine(JsonSerializer.Serialize(plasticReport, JsonOptions));+ else if (plastic.IsSuccess && plastic.State is { } state)+ {+ stdout.WriteLine($"PlasticShell {state.Intent.PlasticShellId}: wall {state.Evidence.WallThickness.Minimum:G6}..{state.Evidence.WallThickness.Maximum:G6} mm; draft minimum {state.Evidence.Draft.Min(x => x.DraftAngleDegrees):G6} deg; undercuts {state.Evidence.Pullability.Undercuts.Count}; ribs {state.Evidence.RibNetwork?.SelectedCandidate ?? "none"}");+ if (state.Evidence.RibNetwork is { } ribs)+ foreach (var candidate in ribs.Candidates) stdout.WriteLine($" {candidate.CandidateId}: eligible={candidate.Eligible}; support={candidate.Metrics.SupportProxy:F6}; flow={candidate.Metrics.FlowCompatibility:F6}; sink={candidate.Metrics.SinkProxy:F6}; length={candidate.Metrics.RibLength:F6}; complexity={candidate.Metrics.Complexity:F6}; utility={candidate.Metrics.Utility:F6}");+ }+ else foreach (var diagnostic in plastic.Diagnostics) stderr.WriteLine($"error: {diagnostic.Code}: {diagnostic.Message}");+ return plastic.IsSuccess ? 0 : 1;+ }if (SculptingAuthoring.IsSculptingSource(source)){var sculpt = SculptingAuthoring.Compile(source);@@ -1749,6 +1806,14 @@ Model CanonicalPanel {}var validationSource=File.ReadAllText(sourcePath);+ if (PlasticShellFirmament.LooksLikePlasticShell(validationSource))+ {+ var plastic = PlasticShellFirmament.Compile(validationSource, Path.GetFullPath(sourcePath));+ var payload = new { source = sourcePath, status = plastic.IsSuccess ? "valid" : "invalid", domain = "PlasticShell", summary = new { fatalDiagnosticCount = plastic.Diagnostics.Count(x => x.Severity == PlasticDiagnosticSeverity.Error), warningDiagnosticCount = plastic.Diagnostics.Count(x => x.Severity == PlasticDiagnosticSeverity.Warning), gates = plastic.Intent?.Gates.Count ?? 0, standoffs = plastic.Intent?.Standoffs.Count ?? 0, ejectors = plastic.Intent?.Ejectors.Count ?? 0, ribCandidates = plastic.State?.Evidence.RibNetwork?.Candidates.Count ?? 0 }, diagnostics = plastic.Diagnostics };+ if (json) stdout.WriteLine(JsonSerializer.Serialize(new { plasticShellValidation = payload }, JsonOptions));+ else stdout.WriteLine($"PlasticShell validation: {payload.status} ({payload.summary.fatalDiagnosticCount} fatal, {payload.summary.warningDiagnosticCount} warning)");+ return plastic.IsSuccess ? 0 : 1;+ }if (SculptingAuthoring.IsSculptingSource(validationSource)){var sculpt = SculptingAuthoring.Compile(validationSource);@@ -2744,6 +2809,11 @@ Model CanonicalPanel {return RunExperimentalLoopChamferCorpus(args.Skip(1).ToArray(), stdout, stderr);}+ if (string.Equals(args[0], "heightfield-art", StringComparison.Ordinal))+ {+ return RunExperimentalHeightFieldArt(args.Skip(1).ToArray(), stdout, stderr);+ }+stderr.WriteLine($"Unknown experimental subcommand '{args[0]}'.");stderr.WriteLine(ExperimentalUsage);return 1;@@ -3135,6 +3205,44 @@ Model CanonicalPanel {return 1;}+ private static int RunExperimentalHeightFieldArt(string[] args, TextWriter stdout, TextWriter stderr)+ {+ if (args.Length == 0 || IsHelpFlag(args[0]))+ {+ stdout.WriteLine("Generate the retired polar PlasticShell height field as mathematical computer art.");+ stdout.WriteLine("This path is explicitly non-manufacturing and never participates in normal build.");+ stdout.WriteLine(ExperimentalHeightFieldArtUsage);+ return args.Length == 0 ? 1 : 0;+ }+ var source = args[0]; string? output = null; var json = false;+ for (var i = 1; i < args.Length; i++)+ {+ if (args[i] == "--out" && i + 1 < args.Length) output = args[++i];+ else if (args[i] == "--json") json = true;+ else { stderr.WriteLine(ExperimentalHeightFieldArtUsage); return 1; }+ }+ if (!File.Exists(source) || string.IsNullOrWhiteSpace(output)) { stderr.WriteLine(ExperimentalHeightFieldArtUsage); return 1; }+ var compiled = PlasticShellFirmament.CompileFile(source);+ if (!compiled.IsSuccess || compiled.State is null)+ {+ if (json) stdout.WriteLine(JsonSerializer.Serialize(new { command = "experimental heightfield-art", success = false, diagnostics = compiled.Diagnostics }, JsonOptions));+ else foreach (var diagnostic in compiled.Diagnostics) stderr.WriteLine($"- [{diagnostic.Severity}] {diagnostic.Code}: {diagnostic.Message}");+ return 1;+ }+ var art = PlasticShellHeightFieldArt.Export(compiled.State, compiled.ModelName);+ if (!art.IsSuccess || art.Step is null)+ {+ if (json) stdout.WriteLine(JsonSerializer.Serialize(new { command = "experimental heightfield-art", success = false, diagnostics = art.Diagnostics }, JsonOptions));+ else foreach (var diagnostic in art.Diagnostics) stderr.WriteLine($"- [{diagnostic.Severity}] {diagnostic.Code}: {diagnostic.Message}");+ return 1;+ }+ var fullOutput = Path.GetFullPath(output); Directory.CreateDirectory(Path.GetDirectoryName(fullOutput)!); File.WriteAllText(fullOutput, art.Step);+ var report = new { command = "experimental heightfield-art", success = true, input = Path.GetFullPath(source), output = fullOutput, classification = "non-manufacturing mathematical computer art", productBuildUnaffected = true, art.BoundaryFaces, surfaceInventory = art.Inventory };+ if (json) stdout.WriteLine(JsonSerializer.Serialize(report, JsonOptions));+ else { stdout.WriteLine($"Happy little accident: {fullOutput}"); stdout.WriteLine("Classification: non-manufacturing mathematical computer art; normal PlasticShell build is unaffected."); }+ return 0;+ }+private static int RunAsmInspect(string[] args, TextWriter stdout, TextWriter stderr){if (args.Length == 0 || IsHelpFlag(args[0]))@@ -4279,6 +4387,7 @@ Model CanonicalPanel {stdout.WriteLine(" prismatic-corpus Generate the EDGE-PRISMATIC-X5 split-preserving prismatic corpus.");stdout.WriteLine(" prismatic-map Inspect EDGE-PRISMATIC-X9 generated-source-only prismatic map JSON.");stdout.WriteLine(" loop-chamfer-corpus Generate the EDGE-LOOP-X2 top-face loop chamfer STEP/JSON corpus.");+ stdout.WriteLine(" heightfield-art Export the retired polar PlasticShell height field as non-manufacturing computer art.");stdout.WriteLine();stdout.WriteLine("Notes:");stdout.WriteLine(" - Experimental only; does not route production Firmament chamfer operations through AirChamfer.");@@ -4287,6 +4396,7 @@ Model CanonicalPanel {stdout.WriteLine(" - The prismatic corpus preserves section-boundary split faces and performs no coplanar merge.");stdout.WriteLine(" - experimental prismatic-map is generated-source-only, not normal analyze map, and accepts no STEP input.");stdout.WriteLine(" - loop-chamfer-corpus is a lab-only Class B top-face outer-loop route and does not change production chamfer or fillet behavior.");+ stdout.WriteLine(" - heightfield-art is a visual Easter egg and never participates in normal PlasticShell build or manufacturing evidence.");stdout.WriteLine();stdout.WriteLine("Examples:");stdout.WriteLine(" aetheris experimental airchamfer-cube --out edge-x10-airchamfer-cube-one-edge.step --json");@@ -4294,6 +4404,7 @@ Model CanonicalPanel {stdout.WriteLine(" aetheris experimental prismatic-corpus --out-dir artifacts/edge-prismatic-x5 --json");stdout.WriteLine(" aetheris experimental prismatic-map --case rectangle-inset --rows 16 --cols 16 --json");stdout.WriteLine(" aetheris experimental loop-chamfer-corpus --out-dir artifacts/edge-loop-x2 --json");+ stdout.WriteLine(" aetheris experimental heightfield-art enclosure.firmament --out artifacts/local/happy-little-accident.step --json");}private static void WriteExperimentalLoopChamferCorpusHelp(TextWriter stdout)diff --git a/Aetheris.Modules.BuiltIn/Aetheris.Modules.BuiltIn.csproj b/Aetheris.Modules.BuiltIn/Aetheris.Modules.BuiltIn.csprojindex 945aff22..91577e2f 100644--- a/Aetheris.Modules.BuiltIn/Aetheris.Modules.BuiltIn.csproj+++ b/Aetheris.Modules.BuiltIn/Aetheris.Modules.BuiltIn.csproj@@ -5,5 +5,6 @@<ProjectReference Include="..\Aetheris.Surfacing\Aetheris.Surfacing.csproj" /><ProjectReference Include="..\Aetheris.Piping\Aetheris.Piping.csproj" /><ProjectReference Include="..\Aetheris.SheetMetal\Aetheris.SheetMetal.csproj" />+ <ProjectReference Include="..\Aetheris.PlasticShell\Aetheris.PlasticShell.csproj" /></ItemGroup></Project>diff --git a/Aetheris.Modules.BuiltIn/BuiltInModules.cs b/Aetheris.Modules.BuiltIn/BuiltInModules.csindex a35eae0d..9b2ee61b 100644--- a/Aetheris.Modules.BuiltIn/BuiltInModules.cs+++ b/Aetheris.Modules.BuiltIn/BuiltInModules.cs@@ -1,4 +1,5 @@using Aetheris.Piping;+using Aetheris.PlasticShell;using Aetheris.SheetMetal;using Aetheris.Surfacing;@@ -8,6 +9,6 @@ namespace Aetheris.Modules.BuiltIn;public static class BuiltInModules{private static readonly Lazy<AetherisModuleCatalog> CatalogValue = new(() => AetherisModuleCatalog.Create(- [CoreModule.Definition, SurfacingModule.Definition, PipingModule.Definition, SheetMetalModule.Definition]));+ [CoreModule.Definition, SurfacingModule.Definition, PipingModule.Definition, SheetMetalModule.Definition, PlasticShellModule.Definition]));public static AetherisModuleCatalog Catalog => CatalogValue.Value;}diff --git a/Aetheris.Modules.Tests/ModuleArchitectureTests.cs b/Aetheris.Modules.Tests/ModuleArchitectureTests.csindex 81cc106d..b4e86e06 100644--- a/Aetheris.Modules.Tests/ModuleArchitectureTests.cs+++ b/Aetheris.Modules.Tests/ModuleArchitectureTests.cs@@ -17,7 +17,7 @@ public sealed class ModuleArchitectureTests[Fact] public void BuiltInsHaveStableIdentityVersionAndDeterministicOrder(){var first=BuiltInModules.Catalog;var second=AetherisModuleCatalog.Create(first.Modules.Reverse());- Assert.Equal(["Aetheris.Core","Aetheris.Piping","Aetheris.Surfacing","Aetheris.SheetMetal"],first.Modules.Select(m=>m.Id.Value));+ Assert.Equal(["Aetheris.Core","Aetheris.Piping","Aetheris.Surfacing","Aetheris.PlasticShell","Aetheris.SheetMetal"],first.Modules.Select(m=>m.Id.Value));Assert.Equal(first.Modules.Select(m=>m.Id.Value),second.Modules.Select(m=>m.Id.Value));Assert.Equal("0.3.0",first.Modules.Single(m=>m.Id==SurfacingModule.Id).Version.ToString());Assert.Equal(first.Capabilities.Select(c=>c.Id).Order(StringComparer.Ordinal),first.Capabilities.Select(c=>c.Id));diff --git a/Aetheris.PlasticShell.Tests/Aetheris.PlasticShell.Tests.csproj b/Aetheris.PlasticShell.Tests/Aetheris.PlasticShell.Tests.csprojnew file mode 100644index 00000000..c10b12c6--- /dev/null+++ b/Aetheris.PlasticShell.Tests/Aetheris.PlasticShell.Tests.csproj@@ -0,0 +1,5 @@+<Project Sdk="Microsoft.NET.Sdk">+ <PropertyGroup><TargetFramework>net10.0</TargetFramework><ImplicitUsings>enable</ImplicitUsings><Nullable>enable</Nullable><IsPackable>false</IsPackable></PropertyGroup>+ <ItemGroup><PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" /><PackageReference Include="xunit" Version="2.9.3" /><PackageReference Include="xunit.runner.visualstudio" Version="3.1.4"><PrivateAssets>all</PrivateAssets></PackageReference></ItemGroup>+ <ItemGroup><ProjectReference Include="..\Aetheris.PlasticShell\Aetheris.PlasticShell.csproj" /><ProjectReference Include="..\Aetheris.Kernel.Core\Aetheris.Kernel.Core.csproj" /></ItemGroup>+</Project>diff --git a/Aetheris.PlasticShell.Tests/PlasticShellTests.cs b/Aetheris.PlasticShell.Tests/PlasticShellTests.csnew file mode 100644index 00000000..abfe1a60--- /dev/null+++ b/Aetheris.PlasticShell.Tests/PlasticShellTests.cs@@ -0,0 +1,129 @@+using Aetheris.Kernel.Core.Brep;+using Aetheris.Kernel.Core.Step242;+using Aetheris.PlasticShell;+using Xunit;++namespace Aetheris.PlasticShell.Tests;++public sealed class PlasticShellTests+{+ private static string Fixture(string name) => Path.GetFullPath(Path.Combine(AppContext.BaseDirectory, "..", "..", "..", "..", "fixtures", name));++ [Fact]+ public void Flagship_lowers_to_first_class_ir_and_exact_closed_body()+ {+ var result = PlasticShellFirmament.CompileFile(Fixture(Path.Combine("Canonical", "PlasticShell", "plastic-shell-enclosure.firmament")));+ Assert.True(result.IsSuccess, string.Join(Environment.NewLine, result.Diagnostics));+ Assert.NotNull(result.Intent); Assert.NotNull(result.State);+ Assert.Equal(4, result.Intent!.Standoffs.Count);+ Assert.Equal(4, result.Intent.Ejectors.Count);+ Assert.Equal(2, result.State!.Evidence.RibNetwork!.Candidates.Count);+ Assert.NotNull(result.State.Evidence.RibNetwork.SelectedCandidate);+ Assert.Empty(result.State.Evidence.Pullability.Undercuts);+ Assert.Equal(2.2, result.State.Evidence.WallThickness.Minimum, 10);+ Assert.Single(result.State.Body.Topology.Bodies);+ Assert.Single(result.State.Body.Topology.Shells);+ Assert.NotNull(result.State.Evidence.Materialization);+ Assert.Equal(0d, result.State.Evidence.Materialization!.ExteriorMaximumDeviation);+ Assert.False(string.IsNullOrWhiteSpace(result.State.Evidence.Materialization.ExteriorFingerprintBefore));+ Assert.Equal(result.State.Evidence.Materialization.ExteriorFingerprintBefore, result.State.Evidence.Materialization.ExteriorFingerprintAfter);+ Assert.Equal(7, result.State.Evidence.Materialization.Features.Count);+ Assert.Equal(4, result.State.Evidence.Materialization.Junctions.Count);+ Assert.All(result.State.Evidence.Materialization.Features, feature =>+ {+ Assert.NotEmpty(feature.FaceIds);+ Assert.Equal(PlasticEvidenceStrength.ExactAnalytic, feature.Strength);+ Assert.Equal(0d, feature.MinimumDraftAngleDegrees);+ });+ var ribs = result.State.Evidence.Materialization.Features.Where(f => f.Kind == "ConstantThicknessWallRib").ToArray();+ Assert.Equal(3, ribs.Length);+ Assert.All(ribs, rib =>+ {+ Assert.Equal(result.Intent.WallPolicy.NominalThickness, rib.BaseThickness, 10);+ Assert.Equal(result.Intent.WallPolicy.NominalThickness, rib.TopThickness, 10);+ Assert.Equal(3, rib.FaceIds.Count);+ });+ Assert.Equal(4, result.State.Evidence.Materialization.Features.Count(f => f.Kind == "AnalyticAnnularStandoff"));+ Assert.Contains(result.Diagnostics, d => d.Code == PlasticDiagnosticCodes.ConstantSectionFeatureZeroDraft && d.Severity == PlasticDiagnosticSeverity.Warning);+ Assert.All(result.State.Evidence.Materialization.Junctions, junction => Assert.True(junction.WithinLimit));+ Assert.InRange(result.State.Body.Topology.Faces.Count(), 20, 100);+ Assert.Contains("No product mesh", result.State.Evidence.Materialization.ConstructionMethod, StringComparison.Ordinal);+ Assert.True(BrepExportPreflight.Validate(result.State.Body).IsValid);+ }++ [Fact]+ public void Flagship_step_is_rational_free_and_reimports()+ {+ var result = PlasticShellFirmament.CompileFile(Fixture(Path.Combine("Canonical", "PlasticShell", "plastic-shell-enclosure.firmament")));+ var export = PlasticShellStepExporter.Export(result.State!, result.ModelName);+ Assert.True(export.IsSuccess, string.Join(Environment.NewLine, export.Diagnostics));+ Assert.Equal(0, export.Inventory.RationalProductSurfaces);+ var imported = Step242Importer.ImportBody(export.Step!);+ Assert.True(imported.IsSuccess, string.Join(Environment.NewLine, imported.Diagnostics));+ Assert.Single(imported.Value.Topology.Bodies);+ Assert.Single(imported.Value.Topology.Shells);+ var pmi = Step242SemanticPmiInspector.Inspect(export.Step!);+ Assert.True(pmi.Success, string.Join(Environment.NewLine, pmi.Diagnostics));+ var moldedItems = pmi.Items.Where(i => i.Name.StartsWith("standoff:", StringComparison.Ordinal) || i.Name.StartsWith("autorib:", StringComparison.Ordinal)).ToArray();+ Assert.All(moldedItems, item => Assert.NotEmpty(item.GeometricFaceEntityIds));+ var standoffAssociations = moldedItems.Where(i => i.Name.StartsWith("standoff:", StringComparison.Ordinal)).ToArray();+ Assert.Equal(4, standoffAssociations.Select(i => string.Join(',', i.GeometricFaceEntityIds)).Distinct(StringComparer.Ordinal).Count());+ var ribAssociation = moldedItems.Single(i => i.Name.StartsWith("autorib:", StringComparison.Ordinal)).GeometricFaceEntityIds;+ Assert.All(standoffAssociations, item => Assert.False(item.GeometricFaceEntityIds.SequenceEqual(ribAssociation)));+ }++ [Fact]+ public void Retired_height_field_is_available_only_as_explicit_art_export()+ {+ var result = PlasticShellFirmament.CompileFile(Fixture(Path.Combine("Canonical", "PlasticShell", "plastic-shell-enclosure.firmament")));+ Assert.True(result.IsSuccess);+ var art = PlasticShellHeightFieldArt.Export(result.State!, result.ModelName);+ Assert.True(art.IsSuccess, string.Join(Environment.NewLine, art.Diagnostics));+ Assert.NotNull(art.Step);+ Assert.True(art.BoundaryFaces > 9_000);+ Assert.Contains("height-field-art:happy-little-accident", art.Step!, StringComparison.Ordinal);+ Assert.DoesNotContain("height-field-art:happy-little-accident", PlasticShellStepExporter.Export(result.State!, result.ModelName).Step!, StringComparison.Ordinal);+ }++ [Theory]+ [InlineData("wall-collapse.firmament", PlasticDiagnosticCodes.WallOffsetCollapse)]+ [InlineData("draft-conflict.firmament", PlasticDiagnosticCodes.DraftConflict)]+ [InlineData("invalid-parting.firmament", PlasticDiagnosticCodes.InvalidParting)]+ [InlineData("invalid-gate.firmament", PlasticDiagnosticCodes.InvalidGate)]+ [InlineData("invalid-ejector.firmament", PlasticDiagnosticCodes.EjectorNotCoreAccessible)]+ [InlineData("undercut.firmament", PlasticDiagnosticCodes.Undercut)]+ [InlineData("no-valid-rib-network.firmament", PlasticDiagnosticCodes.AutoRibNoEligibleNetwork)]+ [InlineData("standoff-breaks-exterior.firmament", PlasticDiagnosticCodes.MaterializedFeatureOutsideAuthorizedRegion)]+ [InlineData("rib-undercut.firmament", PlasticDiagnosticCodes.AutoRibNoEligibleNetwork)]+ [InlineData("rib-ejector-collision.firmament", PlasticDiagnosticCodes.EjectorRibCollision)]+ [InlineData("rib-thick-junction.firmament", PlasticDiagnosticCodes.MaterialAccumulation)]+ [InlineData("rib-disconnected.firmament", PlasticDiagnosticCodes.AutoRibNoEligibleNetwork)]+ [InlineData("autorib-winner-not-materializable.firmament", PlasticDiagnosticCodes.MaterialAccumulation)]+ public void Invalid_fixture_has_focused_diagnostic(string fixture, string code)+ {+ var result = PlasticShellFirmament.CompileFile(Fixture(Path.Combine("Invalid", "PlasticShell", fixture)));+ Assert.False(result.IsSuccess);+ Assert.Contains(result.Diagnostics, d => d.Code == code && d.Severity == PlasticDiagnosticSeverity.Error);+ }++ [Fact]+ public void Autorib_is_deterministic()+ {+ var path = Fixture(Path.Combine("Canonical", "PlasticShell", "plastic-shell-enclosure.firmament"));+ var first = PlasticShellFirmament.CompileFile(path); var second = PlasticShellFirmament.CompileFile(path);+ Assert.Equal(first.State!.StateId, second.State!.StateId);+ Assert.Equal(first.State.Evidence.RibNetwork!.SelectedCandidate, second.State.Evidence.RibNetwork!.SelectedCandidate);+ }++ [Fact]+ public void Autorib_fan_root_depends_on_gate_location()+ {+ var source = File.ReadAllText(Fixture(Path.Combine("Canonical", "PlasticShell", "plastic-shell-enclosure.firmament")));+ var rear = PlasticShellFirmament.Compile(source);+ var front = PlasticShellFirmament.Compile(source.Replace("Position: [0, 57, 20]", "Position: [0, -57, 20]", StringComparison.Ordinal));+ var rearFan = rear.State!.Evidence.RibNetwork!.Candidates.Single(c => c.CandidateId == "gate-oriented-fan");+ var frontFan = front.State!.Evidence.RibNetwork!.Candidates.Single(c => c.CandidateId == "gate-oriented-fan");+ Assert.All(rearFan.Edges, edge => Assert.Equal("PcbC", edge.From));+ Assert.All(frontFan.Edges, edge => Assert.Equal("PcbA", edge.From));+ }+}diff --git a/Aetheris.PlasticShell/Aetheris.PlasticShell.csproj b/Aetheris.PlasticShell/Aetheris.PlasticShell.csprojnew file mode 100644index 00000000..2ae24a82--- /dev/null+++ b/Aetheris.PlasticShell/Aetheris.PlasticShell.csproj@@ -0,0 +1,13 @@+<Project Sdk="Microsoft.NET.Sdk">+ <PropertyGroup>+ <TargetFramework>net10.0</TargetFramework>+ <ImplicitUsings>enable</ImplicitUsings>+ <Nullable>enable</Nullable>+ <Description>Manufacturing-first molded plastic shell semantics, analysis, and bounded realization.</Description>+ </PropertyGroup>+ <ItemGroup>+ <ProjectReference Include="..\Aetheris.Kernel.Core\Aetheris.Kernel.Core.csproj" />+ <ProjectReference Include="..\Aetheris.Modules\Aetheris.Modules.csproj" />+ <ProjectReference Include="..\Aetheris.Surfacing\Aetheris.Surfacing.csproj" />+ </ItemGroup>+</Project>diff --git a/Aetheris.PlasticShell/HeightFieldArtMaterializer.cs b/Aetheris.PlasticShell/HeightFieldArtMaterializer.csnew file mode 100644index 00000000..62b4f05e--- /dev/null+++ b/Aetheris.PlasticShell/HeightFieldArtMaterializer.cs@@ -0,0 +1,361 @@+using Aetheris.Kernel.Core.Brep;+using Aetheris.Kernel.Core.Geometry;+using Aetheris.Kernel.Core.Geometry.Curves;+using Aetheris.Kernel.Core.Geometry.Surfaces;+using Aetheris.Kernel.Core.Math;+using Aetheris.Kernel.Core.Step242;+using Aetheris.Kernel.Core.Topology;+using Aetheris.Surfacing;+using System.Security.Cryptography;+using System.Text;++namespace Aetheris.PlasticShell;++public sealed record HeightFieldArtExportResult(+ bool IsSuccess,+ string? Step,+ PlasticStepSurfaceInventory Inventory,+ int BoundaryFaces,+ IReadOnlyList<PlasticDiagnostic> Diagnostics);++/// <summary>+/// Explicitly non-manufacturing export of the former polar height-field experiment.+/// This is mathematical computer art, not a PlasticShell product realization.+/// </summary>+public static class PlasticShellHeightFieldArt+{+ public static HeightFieldArtExportResult Export(PlasticShellBodyState state, string productName)+ {+ ArgumentNullException.ThrowIfNull(state);+ var art = HeightFieldArtMaterializer.Generate(state.Intent, state.Evidence.RibNetwork);+ if (!art.IsSuccess || art.Body is null)+ return new(false, null, Empty(), 0, art.Diagnostics);++ var pmi = new Step242SemanticPmi[]+ {+ new Step242SemanticPmiNote(+ "height-field-art:happy-little-accident",+ "NonManufacturingArtwork",+ "Polar height-field mathematical computer art. Explicitly not manufacturable CAD and not a PlasticShell product definition.")+ };+ var exported = Step242Exporter.ExportBody(art.Body, pmi, new Step242ExportOptions+ {+ BrepExportPreflightMode = BrepExportPreflightMode.Enforce,+ ProductName = $"{productName}-height-field-art"+ });+ if (!exported.IsSuccess)+ return new(false, null, Empty(), art.Body.Topology.Faces.Count(), exported.Diagnostics.Select(d =>+ new PlasticDiagnostic("height-field-art-step-export-failed", PlasticDiagnosticSeverity.Error, d.Message)).ToArray());++ var step = exported.Value;+ var inventory = new PlasticStepSurfaceInventory(+ Count(step, "=PLANE("), Count(step, "=CYLINDRICAL_SURFACE("), Count(step, "=CONICAL_SURFACE("),+ Count(step, "=SPHERICAL_SURFACE("), Count(step, "=TOROIDAL_SURFACE("), Count(step, "=B_SPLINE_SURFACE_WITH_KNOTS("),+ Count(step, "RATIONAL_B_SPLINE_SURFACE"));+ return new(true, step, inventory, art.Body.Topology.Faces.Count(), []);+ }++ private static int Count(string text, string value) => (text.Length - text.Replace(value, string.Empty, StringComparison.Ordinal).Length) / value.Length;+ private static PlasticStepSurfaceInventory Empty() => new(0, 0, 0, 0, 0, 0, 0);+}++internal sealed record HeightFieldArtResult(+ bool IsSuccess,+ BrepBody? Body,+ MoldedMaterializationEvidence? Evidence,+ IReadOnlyList<PlasticDiagnostic> Diagnostics);++/// <summary>+/// Generates a polar height-field artwork from PlasticShell landmarks. This deliberately+/// preserves the old faceted experiment as an Easter egg. It must never be used as product+/// geometry or manufacturing evidence.+/// </summary>+internal static class HeightFieldArtMaterializer+{+ private const int AngularSegments = 96;+ private const int RadialSegments = 48;+ private const double Tol = 1e-9;+ private static readonly Direction3D PlusX = Direction3D.Create(new Vector3D(1, 0, 0));+ private static readonly Direction3D PlusZ = Direction3D.Create(new Vector3D(0, 0, 1));+ private static readonly Direction3D MinusZ = Direction3D.Create(new Vector3D(0, 0, -1));++ public static HeightFieldArtResult Generate(PlasticShellIr intent, AutoRibJudgmentEvidence? ribJudgment, BrepBody? preGraftBody = null)+ {+ if (intent.Standoffs.Count == 0 && ribJudgment?.SelectedCandidate is null)+ return new(true, null, null, []);++ var selected = ribJudgment?.Candidates.SingleOrDefault(c => c.CandidateId == ribJudgment.SelectedCandidate);+ var ribs = selected?.Edges ?? [];+ var k = (intent.Exterior.TopRadius - intent.Exterior.BottomRadius) / intent.Exterior.Height;+ var normalScale = double.Sqrt(1d + k * k);+ var innerBottomRadius = intent.Exterior.BottomRadius + k * intent.WallPolicy.NominalThickness - intent.WallPolicy.NominalThickness * normalScale;+ var innerTopRadius = intent.Exterior.TopRadius - intent.WallPolicy.NominalThickness * normalScale;+ var floor = intent.WallPolicy.NominalThickness;+ var ribHeight = intent.AutoRib is null ? 0d : (intent.AutoRib.Policy.MinimumHeight + intent.AutoRib.Policy.MaximumHeight) / 2d;+ var constructionDraft = double.Max(intent.MinimumDraftAngleDegrees + 1d, intent.AutoRib?.Policy.DraftAngleDegrees ?? 0d);++ HeightSample Sample(double x, double y)+ {+ var best = new HeightSample(floor, "InnerBottom");+ foreach (var standoff in intent.Standoffs)+ {+ var height = StandoffHeight(standoff, x, y, floor, constructionDraft, intent.AutoRib?.Policy.BaseBlendRadius ?? .6d);+ if (height > best.Z + Tol) best = new(height, $"Standoff:{standoff.StandoffId}");+ }+ foreach (var edge in ribs)+ {+ var a = intent.Standoffs.Single(s => s.StandoffId == edge.From);+ var b = intent.Standoffs.Single(s => s.StandoffId == edge.To);+ // A rib may merge into the annular boss but may never cap its core hole.+ if (intent.Standoffs.Any(s => s.HoleDiameter is { } hole && Distance(x, y, s.Position.X, s.Position.Y) < hole / 2d)) continue;+ var height = RibHeight(intent, a, b, x, y, floor, ribHeight, constructionDraft);+ if (height > best.Z + Tol) best = new(height, $"Rib:{edge.From}->{edge.To}");+ }+ return best;+ }++ try+ {+ var builder = new Builder(intent, innerBottomRadius, innerTopRadius, k, Sample);+ var built = builder.Build();+ var preflight = BrepExportPreflight.Validate(built.Body);+ if (!preflight.IsValid)+ {+ var detail = string.Join("; ", preflight.Diagnostics.Where(d => d.Severity == BrepExportPreflightSeverity.Error).Select(d => $"{d.Code}:{d.Context}"));+ return Failure($"Materialized one-body boundary failed BRep preflight: {detail}");+ }+ var beforeFingerprint = preGraftBody is null ? "not-available" : ExteriorFingerprint(preGraftBody);+ var afterFingerprint = ExteriorFingerprint(built.Body);+ if (preGraftBody is not null && !string.Equals(beforeFingerprint, afterFingerprint, StringComparison.Ordinal))+ return Failure("Independent pre/post analytic exterior fingerprint comparison failed.", PlasticDiagnosticCodes.MaterializedFeatureOutsideAuthorizedRegion);+ var featureEvidence = built.FeatureFaces.OrderBy(p => p.Key, StringComparer.Ordinal).Select(pair =>+ {+ var kind = pair.Key.StartsWith("Standoff:", StringComparison.Ordinal) ? "ArtisticAnnularPeak" : "ArtisticRidge";+ var standoff = kind == "ArtisticAnnularPeak" ? intent.Standoffs.Single(s => pair.Key == $"Standoff:{s.StandoffId}") : null;+ var edge = kind == "ArtisticRidge" ? ribs.Single(e => pair.Key == $"Rib:{e.From}->{e.To}") : null;+ var height = standoff?.Height ?? ribHeight;+ var baseThickness = standoff is null ? intent.WallPolicy.NominalThickness * intent.AutoRib!.Policy.ThicknessRatio : (standoff.OuterDiameter - (standoff.HoleDiameter ?? 0d)) / 2d;+ var topThickness = standoff is null+ ? double.Max(.3d, baseThickness - 2d * (height - double.Min(intent.AutoRib!.Policy.BaseBlendRadius, height / 3d)) * double.Tan(constructionDraft * double.Pi / 180d))+ : double.Max(.2d, baseThickness - height * double.Tan(constructionDraft * double.Pi / 180d));+ var envelope = standoff is not null+ ? new SpatialInfluenceEnvelope(standoff.Position.X - standoff.OuterDiameter / 2d - (intent.AutoRib?.Policy.BaseBlendRadius ?? .6d), standoff.Position.Y - standoff.OuterDiameter / 2d - (intent.AutoRib?.Policy.BaseBlendRadius ?? .6d), floor,+ standoff.Position.X + standoff.OuterDiameter / 2d + (intent.AutoRib?.Policy.BaseBlendRadius ?? .6d), standoff.Position.Y + standoff.OuterDiameter / 2d + (intent.AutoRib?.Policy.BaseBlendRadius ?? .6d), floor + height)+ : RibEnvelope(intent, edge!, floor, height);+ return new MoldedFeatureEvidence(pair.Key, kind, pair.Value.Order().ToArray(), height, baseThickness, topThickness,+ baseThickness / intent.WallPolicy.NominalThickness, envelope,+ built.MinimumFeatureDraftDegrees.GetValueOrDefault(pair.Key, constructionDraft), PlasticEvidenceStrength.SampledConservative);+ }).ToArray();+ var junctions = BuildJunctionEvidence(intent, ribs);++ var evidence = new MoldedMaterializationEvidence(featureEvidence, junctions, 0d, beforeFingerprint, afterFingerprint, 1,+ built.Body.Topology.Shells.Count(), built.Body.Topology.Faces.Count(), false,+ $"Non-manufacturing polar height-field artwork ({AngularSegments} angular x {RadialSegments} radial cells). Former PlasticShell landmarks seed peaks and ridges; manufacturing gates intentionally do not apply.",+ PlasticEvidenceStrength.CertifiedBounded);+ return new(true, built.Body, evidence, []);+ }+ catch (Exception ex)+ {+ return Failure($"Bounded molded-feature construction failed: {ex.Message}");+ }++ HeightFieldArtResult Failure(string message, string code = PlasticDiagnosticCodes.MaterializationFailed) =>+ new(false, null, null, [new(code, PlasticDiagnosticSeverity.Error, message, intent.PlasticShellId)]);+ }++ private static string ExteriorFingerprint(BrepBody body)+ {+ var surfaces = body.Geometry.Surfaces.Select(p => p.Value).ToArray();+ var cone = surfaces.Where(s => s.Cone.HasValue).Select(s => s.Cone!.Value).OrderBy(c => c.Apex.Z).First();+ var planes = surfaces.Where(s => s.Plane.HasValue).Select(s => s.Plane!.Value).ToArray();+ var bottom = planes.OrderBy(p => p.Origin.Z).First();+ var rim = planes.OrderByDescending(p => p.Origin.Z).First();+ var canonical = $"outer-cone|{cone.Apex.X:R}|{cone.Apex.Y:R}|{cone.Apex.Z:R}|{cone.Axis.X:R}|{cone.Axis.Y:R}|{cone.Axis.Z:R}|{cone.SemiAngleRadians:R}|outer-bottom|{bottom.Origin.Z:R}|{bottom.Normal.X:R}|{bottom.Normal.Y:R}|{bottom.Normal.Z:R}|rim|{rim.Origin.Z:R}|{rim.Normal.X:R}|{rim.Normal.Y:R}|{rim.Normal.Z:R}";+ return Convert.ToHexString(SHA256.HashData(Encoding.UTF8.GetBytes(canonical))).ToLowerInvariant();+ }++ private static SpatialInfluenceEnvelope RibEnvelope(PlasticShellIr intent, RibEdge edge, double floor, double height)+ {+ var a = intent.Standoffs.Single(s => s.StandoffId == edge.From).Position;+ var b = intent.Standoffs.Single(s => s.StandoffId == edge.To).Position;+ var half = intent.WallPolicy.NominalThickness * intent.AutoRib!.Policy.ThicknessRatio / 2d + intent.AutoRib.Policy.BaseBlendRadius;+ return new(double.Min(a.X, b.X) - half, double.Min(a.Y, b.Y) - half, floor, double.Max(a.X, b.X) + half, double.Max(a.Y, b.Y) + half, floor + height);+ }++ private static IReadOnlyList<MoldedJunctionEvidence> BuildJunctionEvidence(PlasticShellIr intent, IReadOnlyList<RibEdge> ribs)+ {+ var result = new List<MoldedJunctionEvidence>();+ foreach (var s in intent.Standoffs)+ {+ var incident = ribs.Where(e => e.From == s.StandoffId || e.To == s.StandoffId).ToArray();+ if (incident.Length == 0) continue;+ var bossWall = (s.OuterDiameter - (s.HoleDiameter ?? 0d)) / 2d;+ var ribContribution = incident.Length * intent.WallPolicy.NominalThickness * intent.AutoRib!.Policy.ThicknessRatio / 2d;+ var ratio = (bossWall + ribContribution) / intent.WallPolicy.NominalThickness;+ result.Add(new($"Junction:{s.StandoffId}", [s.StandoffId, .. incident.Select(e => $"{e.From}->{e.To}")], ratio, ratio <= 2d + Tol,+ $"Drafted max-envelope union with {intent.AutoRib.Policy.BaseBlendRadius:R} mm linear base flare; no coincident or internal interface faces."));+ }+ return result;+ }++ private static double StandoffHeight(PlasticStandoff s, double x, double y, double floor, double draftDegrees, double blend)+ {+ var d = Distance(x, y, s.Position.X, s.Position.Y);+ var h = s.Height;+ var blendHeight = double.Min(blend, h / 3d);+ var outerShoulder = s.OuterDiameter / 2d;+ var outerBase = outerShoulder + blend;+ var outerTop = double.Max((s.HoleDiameter ?? 0d) / 2d + .35d, outerShoulder - (h - blendHeight) * double.Tan(draftDegrees * double.Pi / 180d));+ double outer;+ if (d >= outerBase) outer = 0d;+ else if (d >= outerShoulder) outer = blendHeight * (outerBase - d) / (outerBase - outerShoulder);+ else if (d >= outerTop) outer = blendHeight + (h - blendHeight) * (outerShoulder - d) / (outerShoulder - outerTop);+ else outer = h;++ var holeTop = (s.HoleDiameter ?? 0d) / 2d;+ if (holeTop <= Tol) return floor + outer;+ var holeBottom = double.Max(.2d, holeTop - h * double.Tan(draftDegrees * double.Pi / 180d));+ var inner = d <= holeBottom ? 0d : d >= holeTop ? h : h * (d - holeBottom) / (holeTop - holeBottom);+ return floor + double.Min(outer, inner);+ }++ private static double RibHeight(PlasticShellIr intent, PlasticStandoff a, PlasticStandoff b, double x, double y, double floor, double h, double draftDegrees)+ {+ var policy = intent.AutoRib!.Policy;+ var shoulder = intent.WallPolicy.NominalThickness * policy.ThicknessRatio / 2d;+ var blendHeight = double.Min(policy.BaseBlendRadius, h / 3d);+ var baseHalf = shoulder + policy.BaseBlendRadius;+ var topHalf = double.Max(.15d, shoulder - (h - blendHeight) * double.Tan(draftDegrees * double.Pi / 180d));+ var d = DistanceToSegment(x, y, a.Position.X, a.Position.Y, b.Position.X, b.Position.Y);+ double rise;+ if (d >= baseHalf) rise = 0d;+ else if (d >= shoulder) rise = blendHeight * (baseHalf - d) / (baseHalf - shoulder);+ else if (d >= topHalf) rise = blendHeight + (h - blendHeight) * (shoulder - d) / (shoulder - topHalf);+ else rise = h;+ return floor + rise;+ }++ private static double Distance(double x1, double y1, double x2, double y2) => double.Hypot(x1 - x2, y1 - y2);+ private static double DistanceToSegment(double x, double y, double ax, double ay, double bx, double by)+ {+ var dx = bx - ax; var dy = by - ay; var l2 = dx * dx + dy * dy;+ var t = l2 <= Tol ? 0d : double.Clamp(((x - ax) * dx + (y - ay) * dy) / l2, 0d, 1d);+ return Distance(x, y, ax + t * dx, ay + t * dy);+ }++ private readonly record struct HeightSample(double Z, string FeatureId);+ private sealed record BuildResult(BrepBody Body, IReadOnlyDictionary<string, IReadOnlyList<int>> FeatureFaces, IReadOnlyDictionary<string, double> MinimumFeatureDraftDegrees);++ private sealed class Builder(PlasticShellIr intent, double innerBottom, double innerTop, double slope, Func<double, double, HeightSample> sample)+ {+ private readonly TopologyBuilder _topology = new();+ private readonly BrepGeometryStore _geometry = new();+ private readonly BrepBindingModel _bindings = new();+ private readonly Dictionary<VertexId, Point3D> _points = [];+ private readonly Dictionary<(int A, int B), EdgeId> _edges = [];+ private readonly Dictionary<string, List<int>> _featureFaces = new(StringComparer.Ordinal);+ private readonly Dictionary<string, double> _minimumFeatureDraft = new(StringComparer.Ordinal);++ public BuildResult Build()+ {+ var floor = intent.WallPolicy.NominalThickness;+ var rings = new VertexId[RadialSegments + 1, AngularSegments];+ var center = _topology.AddVertex(); _points[center] = new Point3D(0, 0, sample(0, 0).Z);+ for (var ring = 1; ring <= RadialSegments; ring++)+ {+ var radius = innerBottom * ring / RadialSegments;+ for (var i = 0; i < AngularSegments; i++)+ {+ var angle = 2d * double.Pi * i / AngularSegments;+ var x = radius * double.Cos(angle); var y = radius * double.Sin(angle);+ var v = _topology.AddVertex(); _points[v] = new Point3D(x, y, ring == RadialSegments ? floor : sample(x, y).Z); rings[ring, i] = v;+ }+ }++ var boundary = new EdgeId[AngularSegments];+ for (var i = 0; i < AngularSegments; i++)+ {+ var next = (i + 1) % AngularSegments;+ var edge = _topology.AddEdge(rings[RadialSegments, i], rings[RadialSegments, next]);+ var angle = 2d * double.Pi * i / AngularSegments;+ AddCurve(edge, CurveGeometry.FromCircle(new Circle3Curve(new Point3D(0, 0, floor), PlusZ, innerBottom,+ Direction3D.Create(new Vector3D(double.Cos(angle), double.Sin(angle), 0)))), 0, 2d * double.Pi / AngularSegments);+ _edges[Key(rings[RadialSegments, i], rings[RadialSegments, next])] = edge; boundary[i] = edge;+ }++ var terrainFaces = new List<FaceId>();+ for (var i = 0; i < AngularSegments; i++) terrainFaces.Add(AddTerrainFace(center, rings[1, i], rings[1, (i + 1) % AngularSegments]));+ for (var ring = 1; ring < RadialSegments; ring++)+ for (var i = 0; i < AngularSegments; i++)+ {+ var next = (i + 1) % AngularSegments;+ terrainFaces.Add(AddTerrainFace(rings[ring, i], rings[ring + 1, i], rings[ring + 1, next]));+ terrainFaces.Add(AddTerrainFace(rings[ring, i], rings[ring + 1, next], rings[ring, next]));+ }++ var rb = intent.Exterior.BottomRadius; var rt = intent.Exterior.TopRadius; var h = intent.Exterior.Height;+ var outerBottomVertex = AddPoint(rb, 0, 0); var outerTopVertex = AddPoint(rt, 0, h); var innerTopVertex = AddPoint(innerTop, 0, h);+ var outerBottomEdge = AddCircle(outerBottomVertex, rb, 0); var outerTopEdge = AddCircle(outerTopVertex, rt, h); var innerTopEdge = AddCircle(innerTopVertex, innerTop, h);+ var outerCone = AddFace([Forward([outerBottomEdge]), Reverse([outerTopEdge])]);+ var innerCone = AddFace([Forward(boundary), Reverse([innerTopEdge])]);+ var outerBottom = AddFace([Reverse([outerBottomEdge])]);+ var rim = AddFace([Forward([outerTopEdge]), Reverse([innerTopEdge])]);+ BindSurface(outerCone, SurfaceGeometry.FromCone(Cone(rb, slope)));+ BindSurface(innerCone, SurfaceGeometry.FromCone(Cone(rb - intent.WallPolicy.NominalThickness * double.Sqrt(1d + slope * slope), slope)), false);+ BindPlane(outerBottom, new Point3D(0, 0, 0), MinusZ);+ BindPlane(rim, new Point3D(0, 0, h), PlusZ);+ var faces = new List<FaceId> { outerCone, innerCone, outerBottom, rim }; faces.AddRange(terrainFaces);+ var shell = _topology.AddShell(faces); _topology.AddBody([shell]);+ return new(new BrepBody(_topology.Model, _geometry, _bindings, _points),+ _featureFaces.ToDictionary(p => p.Key, p => (IReadOnlyList<int>)p.Value), _minimumFeatureDraft);+ }++ private FaceId AddTerrainFace(VertexId a, VertexId b, VertexId c)+ {+ var face = AddFace([[UseEdge(a, b), UseEdge(b, c), UseEdge(c, a)]]);+ var pa = _points[a]; var pb = _points[b]; var pc = _points[c];+ var normal = Direction3D.Create((pb - pa).Cross(pc - pa));+ BindPlane(face, pa, normal);+ var cx = (pa.X + pb.X + pc.X) / 3d; var cy = (pa.Y + pb.Y + pc.Y) / 3d;+ var feature = sample(cx, cy).FeatureId;+ if (feature != "InnerBottom")+ {+ if (!_featureFaces.TryGetValue(feature, out var ids)) _featureFaces[feature] = ids = [];+ ids.Add(face.Value);+ var zRange = double.Max(pa.Z, double.Max(pb.Z, pc.Z)) - double.Min(pa.Z, double.Min(pb.Z, pc.Z));+ if (zRange > 1e-7)+ {+ var draft = double.Asin(double.Clamp(double.Abs(normal.Z), 0d, 1d)) * 180d / double.Pi;+ _minimumFeatureDraft[feature] = double.Min(_minimumFeatureDraft.GetValueOrDefault(feature, double.PositiveInfinity), draft);+ }+ }+ return face;+ }++ private Use UseEdge(VertexId start, VertexId end)+ {+ var key = Key(start, end);+ if (!_edges.TryGetValue(key, out var edge))+ {+ edge = _topology.AddEdge(start, end); _edges[key] = edge;+ var a = _points[start]; var b = _points[end]; var vector = b - a;+ AddCurve(edge, CurveGeometry.FromLine(new Line3Curve(a, Direction3D.Create(vector))), 0, vector.Length);+ }+ var modelEdge = _topology.Model.GetEdge(edge);+ return new(edge, modelEdge.StartVertexId != start);+ }++ private VertexId AddPoint(double x, double y, double z) { var v = _topology.AddVertex(); _points[v] = new Point3D(x, y, z); return v; }+ private EdgeId AddCircle(VertexId vertex, double radius, double z) { var e = _topology.AddEdge(vertex, vertex); AddCurve(e, CurveGeometry.FromCircle(new Circle3Curve(new Point3D(0, 0, z), PlusZ, radius, PlusX)), 0, 2d * double.Pi); return e; }+ private ConeSurface Cone(double intercept, double k) => new(new Point3D(0, 0, -intercept / k), k > 0 ? PlusZ : MinusZ, double.Atan(double.Abs(k)), PlusX);+ private void AddCurve(EdgeId edge, CurveGeometry curve, double start, double end) { var id = new CurveGeometryId(_geometry.Curves.Count() + 1); _geometry.AddCurve(id, curve); _bindings.AddEdgeBinding(new(edge, id, new ParameterInterval(start, end))); }+ private void BindSurface(FaceId face, SurfaceGeometry surface, bool sameSense = true) { var id = new SurfaceGeometryId(_geometry.Surfaces.Count() + 1); _geometry.AddSurface(id, surface); _bindings.AddFaceBinding(new(face, id, sameSense)); }+ private void BindPlane(FaceId face, Point3D origin, Direction3D normal) => BindSurface(face, SurfaceGeometry.FromPlane(new PlaneSurface(origin, normal, Reference(normal))));+ private static Direction3D Reference(Direction3D normal) => double.Abs(normal.X) < .9 ? Direction3D.Create(new Vector3D(1, 0, 0)) : Direction3D.Create(new Vector3D(0, 1, 0));+ private FaceId AddFace(IReadOnlyList<IReadOnlyList<Use>> loops) { var ids = new List<LoopId>(); foreach (var uses in loops) { var loop = _topology.AllocateLoopId(); var coedges = uses.Select(_ => _topology.AllocateCoedgeId()).ToArray(); for (var i = 0; i < coedges.Length; i++) _topology.AddCoedge(new Coedge(coedges[i], uses[i].Edge, loop, coedges[(i + 1) % coedges.Length], coedges[(i + coedges.Length - 1) % coedges.Length], uses[i].Reverse)); _topology.AddLoop(new Loop(loop, coedges)); ids.Add(loop); } return _topology.AddFace(ids); }+ private static Use[] Forward(IReadOnlyList<EdgeId> edges) => edges.Select(e => new Use(e, false)).ToArray();+ private static Use[] Reverse(IReadOnlyList<EdgeId> edges) => edges.Reverse().Select(e => new Use(e, true)).ToArray();+ private static (int, int) Key(VertexId a, VertexId b) => a.Value < b.Value ? (a.Value, b.Value) : (b.Value, a.Value);+ private readonly record struct Use(EdgeId Edge, bool Reverse);+ }+}diff --git a/Aetheris.PlasticShell/MoldedFeatureMaterializer.cs b/Aetheris.PlasticShell/MoldedFeatureMaterializer.csnew file mode 100644index 00000000..5ef87221--- /dev/null+++ b/Aetheris.PlasticShell/MoldedFeatureMaterializer.cs@@ -0,0 +1,265 @@+using System.Security.Cryptography;+using System.Text;+using Aetheris.Kernel.Core.Brep;+using Aetheris.Kernel.Core.Geometry;+using Aetheris.Kernel.Core.Geometry.Curves;+using Aetheris.Kernel.Core.Geometry.Surfaces;+using Aetheris.Kernel.Core.Math;+using Aetheris.Kernel.Core.Topology;+using Aetheris.Surfacing;++namespace Aetheris.PlasticShell;++internal sealed record MoldedFeatureMaterializationResult(bool IsSuccess, BrepBody? Body, MoldedMaterializationEvidence? Evidence, IReadOnlyList<PlasticDiagnostic> Diagnostics);++/// <summary>+/// Exact bounded B-rep graft for annular standoffs and constant-thickness wall ribs.+/// The cavity floor owns holes matching the connected feature footprint. Rib sides,+/// flat tops, boss cylinders, and floor share edges; no mesh or feature solid is used.+/// </summary>+internal static class MoldedFeatureMaterializer+{+ private const double Tol = 1e-8;++ public static MoldedFeatureMaterializationResult Materialize(PlasticShellIr intent, AutoRibJudgmentEvidence? ribJudgment, BrepBody? preGraftBody = null)+ {+ if (intent.Standoffs.Count == 0 && ribJudgment?.SelectedCandidate is null) return new(true, null, null, []);+ var selected = ribJudgment?.Candidates.SingleOrDefault(c => c.CandidateId == ribJudgment.SelectedCandidate);+ var ribs = selected?.Edges ?? [];+ var ribHeight = intent.AutoRib is null ? 0d : (intent.AutoRib.Policy.MinimumHeight + intent.AutoRib.Policy.MaximumHeight) / 2d;+ var ribThickness = intent.WallPolicy.NominalThickness;+ try+ {+ var built = new Builder(intent, ribs, ribHeight, ribThickness).Build();+ var preflight = BrepExportPreflight.Validate(built.Body);+ if (!preflight.IsValid)+ {+ var detail = string.Join("; ", preflight.Diagnostics.Where(d => d.Severity == BrepExportPreflightSeverity.Error).Select(d => $"{d.Code}:{d.Context}"));+ return Failure($"Exact molded-wall B-rep failed preflight: {detail}");+ }+ var beforeFingerprint = preGraftBody is null ? "not-available" : ExteriorFingerprint(preGraftBody);+ var afterFingerprint = ExteriorFingerprint(built.Body);+ if (preGraftBody is not null && beforeFingerprint != afterFingerprint)+ return Failure("Independent pre/post analytic exterior fingerprint comparison failed.", PlasticDiagnosticCodes.MaterializedFeatureOutsideAuthorizedRegion);++ var features = new List<MoldedFeatureEvidence>();+ foreach (var standoff in intent.Standoffs)+ {+ var key = $"Standoff:{standoff.StandoffId}";+ if (!built.FeatureFaces.TryGetValue(key, out var faces)) return Failure($"Standoff '{standoff.StandoffId}' produced no boundary faces.");+ var wall = (standoff.OuterDiameter - (standoff.HoleDiameter ?? 0d)) / 2d;+ features.Add(new(key, "AnalyticAnnularStandoff", faces, standoff.Height, wall, wall, wall / intent.WallPolicy.NominalThickness,+ new(standoff.Position.X - standoff.OuterDiameter / 2d, standoff.Position.Y - standoff.OuterDiameter / 2d, intent.WallPolicy.NominalThickness,+ standoff.Position.X + standoff.OuterDiameter / 2d, standoff.Position.Y + standoff.OuterDiameter / 2d, intent.WallPolicy.NominalThickness + standoff.Height),+ 0d, PlasticEvidenceStrength.ExactAnalytic));+ }+ foreach (var edge in ribs)+ {+ var key = $"Rib:{edge.From}->{edge.To}";+ if (!built.FeatureFaces.TryGetValue(key, out var faces)) return Failure($"Rib '{edge.From}->{edge.To}' produced no boundary faces.");+ features.Add(new(key, "ConstantThicknessWallRib", faces, ribHeight, ribThickness, ribThickness, 1d,+ RibEnvelope(intent, edge, ribHeight, ribThickness), 0d, PlasticEvidenceStrength.ExactAnalytic));+ }+ var junctions = BuildJunctionEvidence(intent, ribs, ribThickness);+ if (junctions.Any(j => !j.WithinLimit)) return Failure("A molded junction exceeds the bounded 2.0x nominal-wall material-accumulation limit.", PlasticDiagnosticCodes.MaterialAccumulation);+ var evidence = new MoldedMaterializationEvidence(features, junctions, 0d, beforeFingerprint, afterFingerprint, 1,+ built.Body.Topology.Shells.Count(), built.Body.Topology.Faces.Count(), false,+ "Exact B-rep wall graft: analytic annular cylinders, constant-thickness planar rib sides, one flat planar top per rib, and a planar cavity floor with the connected union footprint removed. No product mesh and no separate feature solids.",+ PlasticEvidenceStrength.ExactAnalytic);+ return new(true, built.Body, evidence, []);+ }+ catch (Exception ex) { return Failure($"Exact molded-wall construction failed: {ex.Message}"); }++ MoldedFeatureMaterializationResult Failure(string message, string code = PlasticDiagnosticCodes.MaterializationFailed) =>+ new(false, null, null, [new(code, PlasticDiagnosticSeverity.Error, message, intent.PlasticShellId)]);+ }++ private static IReadOnlyList<MoldedJunctionEvidence> BuildJunctionEvidence(PlasticShellIr intent, IReadOnlyList<RibEdge> ribs, double ribThickness)+ {+ var result = new List<MoldedJunctionEvidence>();+ foreach (var s in intent.Standoffs)+ {+ var incident = ribs.Where(e => e.From == s.StandoffId || e.To == s.StandoffId).ToArray();+ if (incident.Length == 0) continue;+ var bossWall = (s.OuterDiameter - (s.HoleDiameter ?? 0d)) / 2d;+ var ratio = double.Max(bossWall, ribThickness) / intent.WallPolicy.NominalThickness;+ result.Add(new($"Junction:{s.StandoffId}", [s.StandoffId, .. incident.Select(e => $"{e.From}->{e.To}")], ratio, ratio <= 2d + Tol,+ "Exact chord-to-cylinder B-rep junction; disjoint angular openings do not stack wall sections and no coincident interface face is retained."));+ }+ return result;+ }++ private static SpatialInfluenceEnvelope RibEnvelope(PlasticShellIr intent, RibEdge edge, double height, double thickness)+ {+ var a = intent.Standoffs.Single(s => s.StandoffId == edge.From).Position; var b = intent.Standoffs.Single(s => s.StandoffId == edge.To).Position; var half = thickness / 2d;+ return new(double.Min(a.X, b.X) - half, double.Min(a.Y, b.Y) - half, intent.WallPolicy.NominalThickness,+ double.Max(a.X, b.X) + half, double.Max(a.Y, b.Y) + half, intent.WallPolicy.NominalThickness + height);+ }++ private static string ExteriorFingerprint(BrepBody body)+ {+ var surfaces = body.Geometry.Surfaces.Select(p => p.Value).ToArray();+ var cone = surfaces.Where(s => s.Cone.HasValue).Select(s => s.Cone!.Value).OrderBy(c => c.Apex.Z).First();+ var planes = surfaces.Where(s => s.Plane.HasValue).Select(s => s.Plane!.Value).ToArray(); var bottom = planes.OrderBy(p => p.Origin.Z).First(); var rim = planes.OrderByDescending(p => p.Origin.Z).First();+ var canonical = $"outer-cone|{cone.Apex.X:R}|{cone.Apex.Y:R}|{cone.Apex.Z:R}|{cone.Axis.X:R}|{cone.Axis.Y:R}|{cone.Axis.Z:R}|{cone.SemiAngleRadians:R}|outer-bottom|{bottom.Origin.Z:R}|{bottom.Normal.X:R}|{bottom.Normal.Y:R}|{bottom.Normal.Z:R}|rim|{rim.Origin.Z:R}|{rim.Normal.X:R}|{rim.Normal.Y:R}|{rim.Normal.Z:R}";+ return Convert.ToHexString(SHA256.HashData(Encoding.UTF8.GetBytes(canonical))).ToLowerInvariant();+ }++ private sealed record BuildResult(BrepBody Body, IReadOnlyDictionary<string, IReadOnlyList<int>> FeatureFaces);++ private sealed class Builder+ {+ private static readonly Direction3D PlusX = Direction3D.Create(new Vector3D(1, 0, 0));+ private static readonly Direction3D PlusZ = Direction3D.Create(new Vector3D(0, 0, 1));+ private static readonly Direction3D MinusZ = Direction3D.Create(new Vector3D(0, 0, -1));+ private readonly PlasticShellIr _intent; private readonly IReadOnlyList<RibEdge> _ribs; private readonly double _ribHeight; private readonly double _ribThickness; private readonly double _floor;+ private readonly TopologyBuilder _topology = new(); private readonly BrepGeometryStore _geometry = new(); private readonly BrepBindingModel _bindings = new(); private readonly Dictionary<VertexId, Point3D> _points = [];+ private readonly Dictionary<string, List<int>> _featureFaces = new(StringComparer.Ordinal); private readonly Dictionary<string, Node> _nodes;+ private readonly Dictionary<(string Node, string Rib, bool End, bool Top), VertexId> _openingVertices = []; private readonly Dictionary<(string Node, string Rib, bool End), EdgeId> _verticalEdges = [];++ public Builder(PlasticShellIr intent, IReadOnlyList<RibEdge> ribs, double ribHeight, double ribThickness)+ {+ _intent = intent; _ribs = ribs; _ribHeight = ribHeight; _ribThickness = ribThickness; _floor = intent.WallPolicy.NominalThickness;+ _nodes = intent.Standoffs.ToDictionary(s => s.StandoffId, s => new Node(s), StringComparer.Ordinal);+ foreach (var edge in ribs)+ {+ var a = _nodes[edge.From]; var b = _nodes[edge.To]; var half = ribThickness / 2d;+ if (ribHeight <= 0 || ribHeight >= double.Min(a.Source.Height, b.Source.Height) - Tol) throw new InvalidOperationException($"Rib {edge.From}->{edge.To} must terminate below both standoff tops.");+ if (half >= a.Radius - Tol || half >= b.Radius - Tol) throw new InvalidOperationException($"Rib {edge.From}->{edge.To} is too thick for its standoff chord junction.");+ a.Openings.Add(new(edge, Math.Atan2(b.Y - a.Y, b.X - a.X), Math.Asin(half / a.Radius)));+ b.Openings.Add(new(edge, Math.Atan2(a.Y - b.Y, a.X - b.X), Math.Asin(half / b.Radius)));+ }+ foreach (var node in _nodes.Values) node.SortAndValidateOpenings();+ }++ public BuildResult Build()+ {+ var k = (_intent.Exterior.TopRadius - _intent.Exterior.BottomRadius) / _intent.Exterior.Height; var scale = double.Sqrt(1d + k * k);+ var innerBottom = _intent.Exterior.BottomRadius + k * _floor - _floor * scale; var innerTop = _intent.Exterior.TopRadius - _floor * scale;+ foreach (var node in _nodes.Values)+ foreach (var opening in node.Openings)+ foreach (var end in new[] { false, true })+ {+ var angle = end ? opening.End : opening.Start; var bottom = AddPoint(node.X + node.Radius * Math.Cos(angle), node.Y + node.Radius * Math.Sin(angle), _floor); var top = AddPoint(node.X + node.Radius * Math.Cos(angle), node.Y + node.Radius * Math.Sin(angle), _floor + _ribHeight);+ _openingVertices[(node.Id, opening.RibId, end, false)] = bottom; _openingVertices[(node.Id, opening.RibId, end, true)] = top; _verticalEdges[(node.Id, opening.RibId, end)] = AddLine(bottom, top);+ }++ var floorBoundary = new List<Segment>(); var topByNode = _nodes.Keys.ToDictionary(k => k, _ => new List<Segment>(), StringComparer.Ordinal);+ var retainedByNode = _nodes.Keys.ToDictionary(k => k, _ => new List<Band>(), StringComparer.Ordinal); var isolatedFloorCircles = new List<EdgeId>();+ foreach (var node in _nodes.Values)+ {+ if (node.Openings.Count == 0)+ {+ var v = AddPoint(node.X + node.Radius, node.Y, _floor); var circle = AddCircle(v, node.X, node.Y, node.Radius, _floor); isolatedFloorCircles.Add(circle); BuildIsolatedStandoff(node, circle); continue;+ }+ for (var i = 0; i < node.Openings.Count; i++)+ {+ var current = node.Openings[i]; var next = node.Openings[(i + 1) % node.Openings.Count]; var retainedStart = current.End; var retainedEnd = UnwrapAfter(next.Start, retainedStart);+ var bottom = AddArc(node, current, true, false, next, false, false, retainedStart, retainedEnd, "retained");+ var top = AddArc(node, current, true, true, next, false, true, retainedStart, retainedEnd, "retained");+ floorBoundary.Add(bottom); topByNode[node.Id].Add(top); retainedByNode[node.Id].Add(new(bottom, top, current, next));+ var openingArc = AddArc(node, next, false, true, next, true, true, next.Start, UnwrapAfter(next.End, next.Start), "opening"); topByNode[node.Id].Add(openingArc);+ }+ }++ var ribGeometry = new Dictionary<string, RibGeometry>(StringComparer.Ordinal);+ foreach (var rib in _ribs)+ {+ var id = RibId(rib); var a = _nodes[rib.From]; var b = _nodes[rib.To]; var ao = a.Openings.Single(o => o.RibId == id); var bo = b.Openings.Single(o => o.RibId == id);+ var baseLeft = AddLineSegment(V(a, ao, true, false), V(b, bo, false, false)); var baseRight = AddLineSegment(V(a, ao, false, false), V(b, bo, true, false));+ var topLeft = AddLineSegment(V(a, ao, true, true), V(b, bo, false, true)); var topRight = AddLineSegment(V(a, ao, false, true), V(b, bo, true, true));+ floorBoundary.Add(baseLeft); floorBoundary.Add(baseRight); ribGeometry[id] = new(baseLeft, baseRight, topLeft, topRight);+ }++ var rb = _intent.Exterior.BottomRadius; var rt = _intent.Exterior.TopRadius; var h = _intent.Exterior.Height;+ var outerBottomV = AddPoint(rb, 0, 0); var outerTopV = AddPoint(rt, 0, h); var innerBottomV = AddPoint(innerBottom, 0, _floor); var innerTopV = AddPoint(innerTop, 0, h);+ var outerBottomE = AddCircle(outerBottomV, 0, 0, rb, 0); var outerTopE = AddCircle(outerTopV, 0, 0, rt, h); var innerBottomE = AddCircle(innerBottomV, 0, 0, innerBottom, _floor); var innerTopE = AddCircle(innerTopV, 0, 0, innerTop, h);+ var outerCone = AddFace([Forward([outerBottomE]), Reverse([outerTopE])]); var innerCone = AddFace([Forward([innerBottomE]), Reverse([innerTopE])]); var outerBottomFace = AddFace([Reverse([outerBottomE])]); var rim = AddFace([Forward([outerTopE]), Reverse([innerTopE])]);+ BindSurface(outerCone, SurfaceGeometry.FromCone(Cone(rb, k))); BindSurface(innerCone, SurfaceGeometry.FromCone(Cone(rb - _floor * scale, k)), false); BindPlane(outerBottomFace, new(0, 0, 0), MinusZ); BindPlane(rim, new(0, 0, h), PlusZ);+ var floorLoops = new List<IReadOnlyList<Use>> { Forward([innerBottomE]) }; foreach (var cycle in TraverseCycles(floorBoundary)) floorLoops.Add(ReverseUses(cycle)); foreach (var circle in isolatedFloorCircles) floorLoops.Add(Reverse([circle]));+ var floorFace = AddFace(floorLoops); BindPlane(floorFace, new(0, 0, _floor), PlusZ); var faces = new List<FaceId> { outerCone, innerCone, outerBottomFace, rim, floorFace };++ foreach (var node in _nodes.Values)+ {+ if (node.Openings.Count == 0) { faces.AddRange(node.PendingFaces); continue; }+ foreach (var band in retainedByNode[node.Id])+ {+ var face = AddFace([[new(band.Bottom.Edge, false), new(Vertical(node, band.Next, false), false), new(band.Top.Edge, true), new(Vertical(node, band.Current, true), true)]]);+ BindSurface(face, SurfaceGeometry.FromCylinder(new CylinderSurface(new(node.X, node.Y, _floor), PlusZ, node.Radius, PlusX))); AddFeatureFace(node.FeatureId, face); faces.Add(face);+ }+ var ordered = OrderCircleSegments(topByNode[node.Id]); var topV = AddPoint(node.X + node.Radius, node.Y, _floor + node.Source.Height); var topE = AddCircle(topV, node.X, node.Y, node.Radius, _floor + node.Source.Height);+ var upper = AddFace([ordered.Select(s => new Use(s.Edge, false)).ToArray(), Reverse([topE])]); BindSurface(upper, SurfaceGeometry.FromCylinder(new CylinderSurface(new(node.X, node.Y, _floor), PlusZ, node.Radius, PlusX))); AddFeatureFace(node.FeatureId, upper); faces.Add(upper); faces.AddRange(BuildHoleAndTop(node, topE));+ }++ foreach (var rib in _ribs)+ {+ var id = RibId(rib); var a = _nodes[rib.From]; var b = _nodes[rib.To]; var ao = a.Openings.Single(o => o.RibId == id); var bo = b.Openings.Single(o => o.RibId == id); var g = ribGeometry[id];+ var left = AddFace([[new(g.BaseLeft.Edge, false), new(Vertical(b, bo, false), false), new(g.TopLeft.Edge, true), new(Vertical(a, ao, true), true)]]);+ var right = AddFace([[new(g.BaseRight.Edge, false), new(Vertical(b, bo, true), false), new(g.TopRight.Edge, true), new(Vertical(a, ao, false), true)]]); BindFacePlane(left); BindFacePlane(right);+ var bOpening = topByNode[b.Id].Single(s => s.Kind == "opening" && s.RibId == id); var aOpening = topByNode[a.Id].Single(s => s.Kind == "opening" && s.RibId == id);+ var top = AddFace([[new(g.TopLeft.Edge, false), new(bOpening.Edge, false), new(g.TopRight.Edge, true), new(aOpening.Edge, false)]]); BindPlane(top, _points[g.TopLeft.Start], PlusZ);+ foreach (var face in new[] { left, right, top }) AddFeatureFace($"Rib:{rib.From}->{rib.To}", face); faces.AddRange([left, right, top]);+ }+ var shell = _topology.AddShell(faces); _topology.AddBody([shell]); return new(new BrepBody(_topology.Model, _geometry, _bindings, _points), _featureFaces.ToDictionary(p => p.Key, p => (IReadOnlyList<int>)p.Value.Order().ToArray(), StringComparer.Ordinal));+ }++ private void BuildIsolatedStandoff(Node node, EdgeId floorCircle)+ {+ var topV = AddPoint(node.X + node.Radius, node.Y, _floor + node.Source.Height); var topE = AddCircle(topV, node.X, node.Y, node.Radius, _floor + node.Source.Height); var outer = AddFace([Forward([floorCircle]), Reverse([topE])]);+ BindSurface(outer, SurfaceGeometry.FromCylinder(new CylinderSurface(new(node.X, node.Y, _floor), PlusZ, node.Radius, PlusX))); AddFeatureFace(node.FeatureId, outer); node.PendingFaces.Add(outer); node.PendingFaces.AddRange(BuildHoleAndTop(node, topE));+ }++ private IReadOnlyList<FaceId> BuildHoleAndTop(Node node, EdgeId outerTop)+ {+ var result = new List<FaceId>(); var hole = node.HoleRadius;+ if (hole <= Tol) { var top = AddFace([Forward([outerTop])]); BindPlane(top, new(node.X, node.Y, _floor + node.Source.Height), PlusZ); AddFeatureFace(node.FeatureId, top); result.Add(top); return result; }+ var bottomV = AddPoint(node.X + hole, node.Y, _floor); var topV = AddPoint(node.X + hole, node.Y, _floor + node.Source.Height); var bottomE = AddCircle(bottomV, node.X, node.Y, hole, _floor); var topE = AddCircle(topV, node.X, node.Y, hole, _floor + node.Source.Height);+ var inner = AddFace([Forward([bottomE]), Reverse([topE])]); BindSurface(inner, SurfaceGeometry.FromCylinder(new CylinderSurface(new(node.X, node.Y, _floor), PlusZ, hole, PlusX)), false); var annulus = AddFace([Forward([outerTop]), Reverse([topE])]); BindPlane(annulus, new(node.X, node.Y, _floor + node.Source.Height), PlusZ); var holeFloor = AddFace([Forward([bottomE])]); BindPlane(holeFloor, new(node.X, node.Y, _floor), PlusZ);+ foreach (var f in new[] { inner, annulus, holeFloor }) AddFeatureFace(node.FeatureId, f); result.AddRange([inner, annulus, holeFloor]); return result;+ }++ private Segment AddArc(Node node, Opening startOpening, bool startAtEnd, bool topStart, Opening endOpening, bool endAtEnd, bool topEnd, double startAngle, double endAngle, string kind)+ {+ var start = V(node, startOpening, startAtEnd, topStart); var end = V(node, endOpening, endAtEnd, topEnd); var z = topStart ? _floor + _ribHeight : _floor; var edge = _topology.AddEdge(start, end);+ AddCurve(edge, CurveGeometry.FromCircle(new Circle3Curve(new(node.X, node.Y, z), PlusZ, node.Radius, Direction3D.Create(new Vector3D(Math.Cos(startAngle), Math.Sin(startAngle), 0)))), 0, endAngle - startAngle); return new(edge, start, end, kind, startOpening.RibId);+ }++ private IReadOnlyList<Segment> OrderCircleSegments(IReadOnlyList<Segment> segments)+ {+ var result = new List<Segment>(); var current = segments[0]; result.Add(current);+ while (result.Count < segments.Count) { var next = segments.FirstOrDefault(s => !result.Contains(s) && s.Start == current.End) ?? throw new InvalidOperationException("Standoff cylinder segmentation is not a closed ordered circle."); result.Add(next); current = next; }+ if (result[^1].End != result[0].Start) throw new InvalidOperationException("Standoff cylinder segmentation does not close."); return result;+ }++ private IReadOnlyList<IReadOnlyList<Use>> TraverseCycles(IReadOnlyList<Segment> segments)+ {+ var pending = new HashSet<EdgeId>(segments.Select(s => s.Edge)); var byVertex = segments.SelectMany(s => new[] { (s.Start, s), (s.End, s) }).GroupBy(x => x.Item1).ToDictionary(g => g.Key, g => g.Select(x => x.s).ToArray()); var cycles = new List<IReadOnlyList<Use>>();+ while (pending.Count > 0) { var first = segments.First(s => pending.Contains(s.Edge)); var start = first.Start; var current = start; var uses = new List<Use>(); do { var segment = byVertex[current].FirstOrDefault(s => pending.Contains(s.Edge)) ?? throw new InvalidOperationException("Feature footprint boundary is open or branched."); var reverse = segment.End == current; uses.Add(new(segment.Edge, reverse)); pending.Remove(segment.Edge); current = reverse ? segment.Start : segment.End; } while (current != start); cycles.Add(uses); }+ return cycles;+ }++ private VertexId V(Node node, Opening opening, bool end, bool top) => _openingVertices[(node.Id, opening.RibId, end, top)]; private EdgeId Vertical(Node node, Opening opening, bool end) => _verticalEdges[(node.Id, opening.RibId, end)];+ private static double UnwrapAfter(double value, double after) { while (value <= after + Tol) value += 2d * Math.PI; return value; } private static string RibId(RibEdge rib) => $"{rib.From}->{rib.To}";+ private Segment AddLineSegment(VertexId start, VertexId end) { var edge = AddLine(start, end); return new(edge, start, end, "line", string.Empty); }+ private VertexId AddPoint(double x, double y, double z) { var v = _topology.AddVertex(); _points[v] = new(x, y, z); return v; }+ private EdgeId AddLine(VertexId start, VertexId end) { var edge = _topology.AddEdge(start, end); var a = _points[start]; var b = _points[end]; var d = b - a; AddCurve(edge, CurveGeometry.FromLine(new Line3Curve(a, Direction3D.Create(d))), 0, d.Length); return edge; }+ private EdgeId AddCircle(VertexId vertex, double cx, double cy, double radius, double z) { var edge = _topology.AddEdge(vertex, vertex); AddCurve(edge, CurveGeometry.FromCircle(new Circle3Curve(new(cx, cy, z), PlusZ, radius, PlusX)), 0, 2d * Math.PI); return edge; }+ private ConeSurface Cone(double intercept, double slope) => new(new Point3D(0, 0, -intercept / slope), slope > 0 ? PlusZ : MinusZ, Math.Atan(Math.Abs(slope)), PlusX);+ private void AddCurve(EdgeId edge, CurveGeometry curve, double start, double end) { var id = new CurveGeometryId(_geometry.Curves.Count() + 1); _geometry.AddCurve(id, curve); _bindings.AddEdgeBinding(new(edge, id, new(start, end))); }+ private void BindSurface(FaceId face, SurfaceGeometry surface, bool sameSense = true) { var id = new SurfaceGeometryId(_geometry.Surfaces.Count() + 1); _geometry.AddSurface(id, surface); _bindings.AddFaceBinding(new(face, id, sameSense)); }+ private void BindPlane(FaceId face, Point3D origin, Direction3D normal) => BindSurface(face, SurfaceGeometry.FromPlane(new PlaneSurface(origin, normal, Math.Abs(normal.X) < .9 ? PlusX : Direction3D.Create(new Vector3D(0, 1, 0)))));+ private void BindFacePlane(FaceId face) { var loop = _topology.Model.GetLoop(_topology.Model.GetFace(face).LoopIds[0]); var vertices = loop.CoedgeIds.Select(id => _topology.Model.GetEdge(_topology.Model.GetCoedge(id).EdgeId).StartVertexId).Distinct().Take(3).ToArray(); var a = _points[vertices[0]]; var b = _points[vertices[1]]; var c = _points[vertices[2]]; BindPlane(face, a, Direction3D.Create((b - a).Cross(c - a))); }+ private FaceId AddFace(IReadOnlyList<IReadOnlyList<Use>> loops) { var ids = new List<LoopId>(); foreach (var uses in loops) { var loop = _topology.AllocateLoopId(); var coedges = uses.Select(_ => _topology.AllocateCoedgeId()).ToArray(); for (var i = 0; i < coedges.Length; i++) _topology.AddCoedge(new Coedge(coedges[i], uses[i].Edge, loop, coedges[(i + 1) % coedges.Length], coedges[(i + coedges.Length - 1) % coedges.Length], uses[i].Reverse)); _topology.AddLoop(new Loop(loop, coedges)); ids.Add(loop); } return _topology.AddFace(ids); }+ private void AddFeatureFace(string id, FaceId face) { if (!_featureFaces.TryGetValue(id, out var faces)) _featureFaces[id] = faces = []; faces.Add(face.Value); }+ private static Use[] Forward(IReadOnlyList<EdgeId> edges) => edges.Select(e => new Use(e, false)).ToArray(); private static Use[] Reverse(IReadOnlyList<EdgeId> edges) => edges.Reverse().Select(e => new Use(e, true)).ToArray(); private static IReadOnlyList<Use> ReverseUses(IReadOnlyList<Use> uses) => uses.Reverse().Select(u => new Use(u.Edge, !u.Reverse)).ToArray();++ private sealed class Node+ {+ public Node(PlasticStandoff source) { Source = source; Id = source.StandoffId; X = source.Position.X; Y = source.Position.Y; Radius = source.OuterDiameter / 2d; HoleRadius = (source.HoleDiameter ?? 0d) / 2d; }+ public PlasticStandoff Source { get; } public string Id { get; } public string FeatureId => $"Standoff:{Id}"; public double X { get; } public double Y { get; } public double Radius { get; } public double HoleRadius { get; } public List<Opening> Openings { get; } = []; public List<FaceId> PendingFaces { get; } = [];+ public void SortAndValidateOpenings() { Openings.Sort((a, b) => a.NormalizedCenter.CompareTo(b.NormalizedCenter)); for (var i = 0; i < Openings.Count; i++) { var a = Openings[i]; var b = Openings[(i + 1) % Openings.Count]; var nextCenter = b.NormalizedCenter + (i == Openings.Count - 1 ? 2d * Math.PI : 0d); if (nextCenter - a.NormalizedCenter <= a.HalfAngle + b.HalfAngle + Tol) throw new InvalidOperationException($"Rib openings overlap at standoff '{Id}'."); } }+ }+ private sealed record Opening(RibEdge Rib, double Center, double HalfAngle) { public string RibId => Builder.RibId(Rib); public double NormalizedCenter { get { var a = Center % (2d * Math.PI); return a < 0 ? a + 2d * Math.PI : a; } } public double Start => NormalizedCenter - HalfAngle; public double End => NormalizedCenter + HalfAngle; }+ private sealed record Segment(EdgeId Edge, VertexId Start, VertexId End, string Kind, string RibId); private sealed record Band(Segment Bottom, Segment Top, Opening Current, Opening Next); private sealed record RibGeometry(Segment BaseLeft, Segment BaseRight, Segment TopLeft, Segment TopRight); private readonly record struct Use(EdgeId Edge, bool Reverse);+ }+}diff --git a/Aetheris.PlasticShell/PlasticShellCompiler.cs b/Aetheris.PlasticShell/PlasticShellCompiler.csnew file mode 100644index 00000000..6cb13519--- /dev/null+++ b/Aetheris.PlasticShell/PlasticShellCompiler.cs@@ -0,0 +1,304 @@+using System.Globalization;+using System.Security.Cryptography;+using System.Text;+using System.Text.RegularExpressions;+using Aetheris.Kernel.Core.Brep;+using Aetheris.Kernel.Core.Judgment;+using Aetheris.Kernel.Core.Math;+using Aetheris.Kernel.Core.Step242;+using Aetheris.Surfacing;++namespace Aetheris.PlasticShell;++public static class PlasticShellCompiler+{+ public static PlasticShellCompileResult Compile(PlasticShellIr intent, string modelName)+ {+ ArgumentNullException.ThrowIfNull(intent);+ var diagnostics = ValidateIntent(intent).ToList();+ if (diagnostics.Any(x => x.Severity == PlasticDiagnosticSeverity.Error)) return new(false, modelName, intent, null, diagnostics);++ var realized = ThinWalledBodyBRepPlanner.CreateFrustum(intent.Exterior.BottomRadius, intent.Exterior.TopRadius, intent.Exterior.Height, intent.WallPolicy.NominalThickness);+ if (!realized.IsSuccess)+ {+ diagnostics.Add(new(PlasticDiagnosticCodes.WallOffsetCollapse, PlasticDiagnosticSeverity.Error,+ "The exact parallel conical interior collapsed or failed closed-manifold admission for the requested wall.", intent.Exterior.StableId));+ return new(false, modelName, intent, null, diagnostics);+ }++ var thickness = VerifyThickness(intent, realized.Value);+ if (thickness.Violations.Count > 0)+ diagnostics.Add(new(PlasticDiagnosticCodes.WallThicknessViolation, PlasticDiagnosticSeverity.Error, string.Join("; ", thickness.Violations), intent.Exterior.StableId));+ var draft = AnalyzeDraft(intent);+ foreach (var failure in draft.Where(x => !x.Satisfied && x.DraftAngleDegrees > 0d))+ diagnostics.Add(new(intent.Exterior.Protected ? PlasticDiagnosticCodes.DraftConflict : PlasticDiagnosticCodes.DraftInsufficient, PlasticDiagnosticSeverity.Error,+ $"Region '{failure.Region}' realizes {failure.DraftAngleDegrees:G6} degrees; {failure.RequiredDegrees:G6} degrees is required.", failure.Region));+ var pullability = AnalyzePullability(intent, draft);+ if (pullability.Undercuts.Count > 0)+ foreach (var region in pullability.Undercuts) diagnostics.Add(new(PlasticDiagnosticCodes.Undercut, PlasticDiagnosticSeverity.Error, $"Region '{region}' is not directionally accessible from its required pull side.", region));+ var gates = AnalyzeGates(intent, diagnostics);+ var rib = intent.AutoRib is null ? null : JudgeRibs(intent, diagnostics);+ var ejectors = AnalyzeEjectors(intent, rib, diagnostics);+ if (diagnostics.Any(x => x.Severity == PlasticDiagnosticSeverity.Error)) return new(false, modelName, intent, null, diagnostics);++ var materialized = MoldedFeatureMaterializer.Materialize(intent, rib, realized.Value.Body);+ diagnostics.AddRange(materialized.Diagnostics);+ if (!materialized.IsSuccess || diagnostics.Any(x => x.Severity == PlasticDiagnosticSeverity.Error)) return new(false, modelName, intent, null, diagnostics);+ if (rib?.SelectedCandidate is { } materiallySelected)+ rib = rib with+ {+ OriginalSelectedCandidate = rib.OriginalSelectedCandidate ?? materiallySelected,+ MaterializationGates = rib.Candidates.Select(c => c.CandidateId == materiallySelected+ ? new RibMaterializationGateEvidence(c.CandidateId, "evaluated", true, [])+ : new RibMaterializationGateEvidence(c.CandidateId, "not-evaluated-after-semantic-loss", null, ["Lower semantic utility; selected candidate passed all materialization gates."])).ToArray()+ };+ var finalBody = materialized.Body ?? realized.Value.Body;+ if (materialized.Evidence is { } materialization)+ {+ if (materialization.Features.Any(f => f.MinimumDraftAngleDegrees + 1e-9 < intent.MinimumDraftAngleDegrees))+ diagnostics.Add(new(PlasticDiagnosticCodes.ConstantSectionFeatureZeroDraft, PlasticDiagnosticSeverity.Warning,+ $"Constant-section rib and annular-standoff walls are intentionally vertical and realize 0 degrees of release draft, below the requested {intent.MinimumDraftAngleDegrees:G6} degrees. The exact B-rep is pull-direction single-valued but requires an explicit molding-process decision.", intent.AutoRib?.RequestId ?? intent.PlasticShellId));+ draft = [.. draft, .. materialization.Features.Select(f => new PlasticDraftRegionEvidence(+ f.FeatureId, MoldPullSide.CoreSide, f.MinimumDraftAngleDegrees, intent.MinimumDraftAngleDegrees,+ f.MinimumDraftAngleDegrees + 1e-9 >= intent.MinimumDraftAngleDegrees, f.Strength,+ f.Kind == "ConstantThicknessWallRib"+ ? "Exact planar B-rep: parallel vertical side faces preserve constant shell thickness and the top is a flat pull-normal plane."+ : "Exact analytic annular B-rep: vertical cylindrical walls and a flat pull-normal top annulus."))];+ pullability = new(+ [.. pullability.CoreAccessible, .. materialization.Features.Select(f => f.FeatureId)],+ pullability.CavityAccessible, pullability.PartingBoundary, pullability.Undercuts,+ "Exact monotone frustum classification plus exact prismatic/cylindrical B-rep additions along +Z; no hidden vertical interval or side action. Zero rib release draft is reported separately.",+ PlasticEvidenceStrength.CertifiedBounded);+ }++ var stateId = BodyStateId.Derive(Canonical(intent, rib?.SelectedCandidate));+ var introduced = new List<string> { "InnerWall", "DraftedOuterWall", "DraftedInnerWall", intent.PartingPlane.StableId };+ introduced.AddRange(intent.Gates.Select(x => $"Gate:{x.GateId}"));+ introduced.AddRange(intent.Standoffs.Select(x => $"Standoff:{x.StandoffId}"));+ introduced.AddRange(intent.Ejectors.Select(x => $"EjectorPin:{x.EjectorId}"));+ if (rib?.SelectedCandidate is { } selected) introduced.Add($"RibNetwork:{selected}");+ if (materialized.Evidence is { } me) introduced.AddRange(me.Junctions.Select(j => j.JunctionId));+ var envelope = new SpatialInfluenceEnvelope(-intent.Exterior.TopRadius, -intent.Exterior.TopRadius, 0, intent.Exterior.TopRadius, intent.Exterior.TopRadius, intent.Exterior.Height);+ var delta = new GeometricDelta(+ BodyStateId.Derive($"{intent.PlasticShellId}|design-authority"), stateId,+ [intent.Exterior.StableId, intent.PartingPlane.StableId], [.. intent.PreservedEntities, intent.PartingPlane.StableId], ["InnerBottom"], [], introduced,+ [intent.Exterior.StableId, "GeneratedInterior", "GeneratedManufacturingFeatures"], envelope,+ [new(intent.Exterior.StableId, GeometricChangeKind.Preserved, [intent.Exterior.StableId], "Exterior analytic support parameters are retained exactly."),+ new("InnerBottom", GeometricChangeKind.Replaced, materialized.Evidence?.Features.Select(f => f.FeatureId).ToArray() ?? ["InnerBottom"], "Only exact feature footprints are removed from the planar cavity floor and replaced by shared-edge molded-feature faces."),+ new("<molded-additions>", GeometricChangeKind.Introduced, introduced, "Standoffs and the selected AutoRib network are grafted into the single product boundary; tooling contacts remain semantic.")]);+ var classification = new Dictionary<string, MoldPullSide>(StringComparer.Ordinal)+ {+ ["OuterConicalWall"] = MoldPullSide.CavitySide,+ ["InnerConicalWall"] = MoldPullSide.CoreSide,+ ["TopAnnularRim"] = MoldPullSide.PartingBoundary,+ ["OuterBottom"] = MoldPullSide.CavitySide,+ ["InnerBottom"] = MoldPullSide.CoreSide+ };+ if (materialized.Evidence is { } molded)+ foreach (var feature in molded.Features) classification[feature.FeatureId] = MoldPullSide.CoreSide;+ var evidence = new PlasticShellEvidence(thickness, draft, pullability, gates, ejectors, rib, materialized.Evidence, classification,+ $"Plane '{intent.PartingPlane.StableId}' at ({intent.PartingPlane.Origin.X:R},{intent.PartingPlane.Origin.Y:R},{intent.PartingPlane.Origin.Z:R}); normal parallel to tooling direction.",+ $"One BRep body, {finalBody.Topology.Shells.Count()} closed shell, {finalBody.Topology.Faces.Count()} faces; topology-authoritative molded additions and exact analytic exterior.");+ return new(true, modelName, intent, new(stateId, intent.PlasticShellId, finalBody, intent, delta, evidence), diagnostics);+ }++ private static IEnumerable<PlasticDiagnostic> ValidateIntent(PlasticShellIr x)+ {+ static bool P(double value) => double.IsFinite(value) && value > 0;+ if (!P(x.Exterior.BottomRadius) || !P(x.Exterior.TopRadius) || !P(x.Exterior.Height)) yield return new(PlasticDiagnosticCodes.SourceInvalid, PlasticDiagnosticSeverity.Error, "Exterior radii and height must be finite and positive.", x.Exterior.StableId);+ if (Math.Abs(x.Exterior.TopRadius - x.Exterior.BottomRadius) <= 1e-9) yield return new(PlasticDiagnosticCodes.DraftConflict, PlasticDiagnosticSeverity.Error, "The bounded X0 frustum exterior must carry non-zero draft; top and bottom radii cannot be equal.", x.Exterior.StableId);+ var w = x.WallPolicy;+ if (!P(w.NominalThickness) || !P(w.MinimumThickness) || !P(w.MaximumThickness) || w.MinimumThickness > w.NominalThickness || w.NominalThickness > w.MaximumThickness || w.ThicknessTolerance < 0)+ yield return new(PlasticDiagnosticCodes.SourceInvalid, PlasticDiagnosticSeverity.Error, "WallPolicy requires 0 < minimum <= nominal <= maximum and a non-negative tolerance.", x.PlasticShellId);+ if (x.Exterior.BottomRadius <= w.NominalThickness || x.Exterior.TopRadius <= w.NominalThickness || x.Exterior.Height <= w.NominalThickness)+ yield return new(PlasticDiagnosticCodes.WallOffsetCollapse, PlasticDiagnosticSeverity.Error, $"Requested {w.NominalThickness:G6} mm wall leaves no admissible bounded interior.", x.Exterior.StableId);+ var alignment = Math.Abs(x.PartingPlane.Normal.ToVector().Dot(x.ToolingDirection.ToVector()));+ if (alignment < 1d - 1e-9 || Math.Abs(x.PartingPlane.Origin.Z - x.Exterior.Height) > 1e-6)+ yield return new(PlasticDiagnosticCodes.InvalidParting, PlasticDiagnosticSeverity.Error, "X0 requires a parting plane normal parallel to ToolingDirection and located at the enclosure rim.", x.PartingPlane.StableId);+ if (Math.Abs(x.ToolingDirection.X) > 1e-9 || Math.Abs(x.ToolingDirection.Y) > 1e-9 || x.ToolingDirection.Z < 1d - 1e-9)+ yield return new(PlasticDiagnosticCodes.SourceInvalid, PlasticDiagnosticSeverity.Error, "The bounded X0 realization currently admits +Z ToolingDirection only.", x.PlasticShellId);+ if (!double.IsFinite(x.MinimumDraftAngleDegrees) || x.MinimumDraftAngleDegrees < 0 || x.MinimumDraftAngleDegrees >= 45)+ yield return new(PlasticDiagnosticCodes.SourceInvalid, PlasticDiagnosticSeverity.Error, "MinimumDraftAngle must be in [0,45) degrees.", x.PlasticShellId);+ foreach (var s in x.Standoffs)+ {+ if (!P(s.Height) || !P(s.OuterDiameter) || s.HoleDiameter is <= 0 || s.HoleDiameter >= s.OuterDiameter)+ yield return new(PlasticDiagnosticCodes.SourceInvalid, PlasticDiagnosticSeverity.Error, "Standoff dimensions are invalid.", s.StandoffId);+ var localRatio = (s.OuterDiameter - (s.HoleDiameter ?? 0d)) / (2d * x.WallPolicy.NominalThickness);+ if (localRatio > 1.5d) yield return new(PlasticDiagnosticCodes.StandoffThickSection, PlasticDiagnosticSeverity.Warning, $"Bounded material-accumulation proxy is {localRatio:G4} wall-thickness units; this is not sink prediction.", s.StandoffId);+ var radial = Math.Sqrt(s.Position.X * s.Position.X + s.Position.Y * s.Position.Y);+ var k = (x.Exterior.TopRadius - x.Exterior.BottomRadius) / x.Exterior.Height;+ var innerBottom = x.Exterior.BottomRadius + k * x.WallPolicy.NominalThickness - x.WallPolicy.NominalThickness * Math.Sqrt(1d + k * k);+ if (Math.Abs(s.Position.Z - x.WallPolicy.NominalThickness) > 1e-6 || radial + s.OuterDiameter / 2d >= innerBottom || s.Position.Z + s.Height >= x.Exterior.Height)+ yield return new(PlasticDiagnosticCodes.MaterializedFeatureOutsideAuthorizedRegion, PlasticDiagnosticSeverity.Error, "Standoff analytic envelope must remain on the core floor, inside the cavity, and below the parting plane.", s.StandoffId);+ }+ }++ private static PlasticThicknessEvidence VerifyThickness(PlasticShellIr x, ThinWalledBodyRealization realized)+ {+ var samples = realized.Construction.ThicknessWitnesses.Select((w, i) => new ThicknessSample(w.Role,+ i == 0 ? new Point3D(x.Exterior.BottomRadius, 0, 0) : new Point3D(0, 0, x.WallPolicy.NominalThickness), w.Distance, PlasticEvidenceStrength.ExactAnalytic)).ToArray();+ var min = samples.MinBy(s => s.Thickness)!; var max = samples.MaxBy(s => s.Thickness)!;+ var violations = samples.Where(s => s.Thickness < x.WallPolicy.MinimumThickness - x.WallPolicy.ThicknessTolerance || s.Thickness > x.WallPolicy.MaximumThickness + x.WallPolicy.ThicknessTolerance)+ .Select(s => $"{s.Region} measured {s.Thickness:G6} mm outside [{x.WallPolicy.MinimumThickness:G6},{x.WallPolicy.MaximumThickness:G6}] mm").ToArray();+ return new(x.WallPolicy.NominalThickness, min.Thickness, max.Thickness, samples.Average(s => s.Thickness), min.Location, max.Location, samples, violations,+ "Exact distance between parallel conical supports plus exact parallel-plane bottom supports; bounded to the admitted analytic frustum topology.", PlasticEvidenceStrength.ExactAnalytic);+ }++ private static IReadOnlyList<PlasticDraftRegionEvidence> AnalyzeDraft(PlasticShellIr x)+ {+ var angle = Math.Atan((x.Exterior.TopRadius - x.Exterior.BottomRadius) / x.Exterior.Height) * 180d / Math.PI;+ var pass = angle + 1e-10 >= x.MinimumDraftAngleDegrees;+ return+ [+ new("OuterConicalWall", MoldPullSide.CavitySide, angle, x.MinimumDraftAngleDegrees, pass, PlasticEvidenceStrength.ExactAnalytic, "Exact cone semi-angle relative to ToolingDirection."),+ new("InnerConicalWall", MoldPullSide.CoreSide, angle, x.MinimumDraftAngleDegrees, pass, PlasticEvidenceStrength.ExactAnalytic, "Parallel exact conical offset preserves semi-angle.")+ ];+ }++ private static PlasticPullabilityEvidence AnalyzePullability(PlasticShellIr x, IReadOnlyList<PlasticDraftRegionEvidence> draft)+ {+ var undercuts = draft.Where(d => d.DraftAngleDegrees <= 0d).Select(d => d.Region).ToArray();+ return new(["InnerConicalWall", "InnerBottom"], ["OuterConicalWall", "OuterBottom"], ["TopAnnularRim"], undercuts,+ "Exact monotone generatrix classification for the bounded coaxial frustum along ToolingDirection; no general arbitrary-BRep visibility claim.", PlasticEvidenceStrength.CertifiedBounded);+ }++ private static IReadOnlyList<PlasticGateEvidence> AnalyzeGates(PlasticShellIr x, ICollection<PlasticDiagnostic> diagnostics)+ {+ var result = new List<PlasticGateEvidence>();+ foreach (var gate in x.Gates)+ {+ var radial = Math.Sqrt(gate.Location.X * gate.Location.X + gate.Location.Y * gate.Location.Y);+ var onRim = Math.Abs(gate.Location.Z - x.Exterior.Height) <= 1e-4 && radial <= x.Exterior.TopRadius + 1e-4 && radial >= x.Exterior.TopRadius - x.WallPolicy.NominalThickness * 2d;+ if (!onRim) { diagnostics.Add(new(PlasticDiagnosticCodes.InvalidGate, PlasticDiagnosticSeverity.Error, "Gate must contact the admitted top annular rim in X0.", gate.GateId)); continue; }+ if (x.PreservedEntities.Contains(gate.TargetRegion, StringComparer.Ordinal)) { diagnostics.Add(new(PlasticDiagnosticCodes.GateInaccessible, PlasticDiagnosticSeverity.Error, "Gate targets a protected forbidden region.", gate.GateId)); continue; }+ var far = radial + x.Exterior.TopRadius - x.WallPolicy.NominalThickness;+ result.Add(new(gate.GateId, gate.Location, "TopAnnularRim", far, far * 0.62d, "Straight-line/geodesic-lower-bound geometric distance proxy; no rheology, pressure, or fill-time computation."));+ }+ return result;+ }++ private static IReadOnlyList<PlasticEjectorEvidence> AnalyzeEjectors(PlasticShellIr x, AutoRibJudgmentEvidence? ribJudgment, ICollection<PlasticDiagnostic> diagnostics)+ {+ var result = new List<PlasticEjectorEvidence>(); var inner = x.Exterior.BottomRadius - x.WallPolicy.NominalThickness;+ var selectedRibs = ribJudgment?.Candidates.SingleOrDefault(c => c.CandidateId == ribJudgment.SelectedCandidate)?.Edges ?? [];+ foreach (var ejector in x.Ejectors)+ {+ var radial = Math.Sqrt(ejector.Position.X * ejector.Position.X + ejector.Position.Y * ejector.Position.Y);+ var accessible = Math.Abs(ejector.Position.Z - x.WallPolicy.NominalThickness) <= 1e-4 && radial + ejector.Diameter / 2d < inner;+ var standoffCollision = x.Standoffs.Any(s => Distance2(ejector.Position, s.Position) < (ejector.Diameter + s.OuterDiameter) / 2d);+ var collidingRibs = selectedRibs.Where(edge =>+ {+ var a = x.Standoffs.Single(s => s.StandoffId == edge.From).Position;+ var b = x.Standoffs.Single(s => s.StandoffId == edge.To).Position;+ var ribHalfWidth = x.WallPolicy.NominalThickness / 2d;+ return DistanceToSegment(ejector.Position, a, b) < ejector.Diameter / 2d + ribHalfWidth;+ }).ToArray();+ var ribCollision = collidingRibs.Length > 0;+ var collision = standoffCollision || ribCollision;+ var cosmetic = x.PreservedEntities.Contains(ejector.TargetRegion, StringComparer.Ordinal);+ if (!accessible) diagnostics.Add(new(PlasticDiagnosticCodes.EjectorNotCoreAccessible, PlasticDiagnosticSeverity.Error, "Ejector contact is not on the accessible inner core floor.", ejector.EjectorId));+ if (standoffCollision) diagnostics.Add(new(PlasticDiagnosticCodes.EjectorCollidesFeature, PlasticDiagnosticSeverity.Error, "Ejector contact overlaps a standoff envelope.", ejector.EjectorId));+ if (ribCollision) diagnostics.Add(new(PlasticDiagnosticCodes.EjectorRibCollision, PlasticDiagnosticSeverity.Error,+ $"Ejector contact overlaps selected molded rib(s) {string.Join(", ", collidingRibs.Select(e => $"{e.From}->{e.To}"))}; X0a does not relocate ejectors, and no alternate semantic candidate is selected after this post-selection conflict.", ejector.EjectorId));+ if (cosmetic) diagnostics.Add(new(PlasticDiagnosticCodes.EjectorCosmeticRegion, PlasticDiagnosticSeverity.Error, "Ejector contact targets a protected cosmetic region.", ejector.EjectorId));+ result.Add(new(ejector.EjectorId, accessible, !collision, !cosmetic, "Post-selection analytic radial containment and planar clearance against standoff plus selected-rib base envelopes."));+ }+ return result;+ }++ private static AutoRibJudgmentEvidence JudgeRibs(PlasticShellIr x, ICollection<PlasticDiagnostic> diagnostics)+ {+ var request = x.AutoRib!; var supports = request.Supports.Select(id => x.Standoffs.SingleOrDefault(s => s.StandoffId == id)).ToArray();+ if (!x.Gates.Any(g => g.GateId == request.GateId))+ {+ diagnostics.Add(new(PlasticDiagnosticCodes.AutoRibNoEligibleNetwork, PlasticDiagnosticSeverity.Error, $"AutoRib gate '{request.GateId}' is unresolved.", request.RequestId));+ return new(request.RequestId, [], null, ["Unresolved gate."], "No judgment performed.");+ }+ if (supports.Any(s => s is null) || supports.Length < 2)+ {+ diagnostics.Add(new(PlasticDiagnosticCodes.AutoRibNoEligibleNetwork, PlasticDiagnosticSeverity.Error, "AutoRib requires at least two resolved Standoff supports.", request.RequestId));+ return new(request.RequestId, [], null, ["Unresolved or insufficient supports."], "No judgment performed.");+ }+ var s = supports.Select(v => v!).OrderBy(v => Math.Atan2(v.Position.Y, v.Position.X)).ThenBy(v => v.StandoffId, StringComparer.Ordinal).ToArray();+ var gate = x.Gates.Single(g => g.GateId == request.GateId);+ var fanRoot = s.OrderBy(v => Distance2(v.Position, gate.Location)).ThenBy(v => v.StandoffId, StringComparer.Ordinal).First();+ var ring = Enumerable.Range(0, s.Length).Select(i => Edge(s[i], s[(i + 1) % s.Length], "perimeter")).ToArray();+ var chord = s.Where(v => v.StandoffId != fanRoot.StandoffId).Select(v => Edge(fanRoot, v, "fan")).ToArray();+ var candidates = new[] { Candidate("perimeter-network", ring), Candidate("gate-oriented-fan", chord) };+ var engineCandidates = candidates.Select((candidate, index) => new JudgmentCandidate<IReadOnlyDictionary<string, RibCandidateEvidence>>(+ candidate.CandidateId, context => context[candidate.CandidateId].Eligible, context => context[candidate.CandidateId].Metrics.Utility,+ context => string.Join("; ", context[candidate.CandidateId].RejectionReasons), index)).ToArray();+ var map = candidates.ToDictionary(c => c.CandidateId, StringComparer.Ordinal);+ var judged = new JudgmentEngine<IReadOnlyDictionary<string, RibCandidateEvidence>>().Evaluate(map, engineCandidates);+ if (!judged.IsSuccess) diagnostics.Add(new(PlasticDiagnosticCodes.AutoRibNoEligibleNetwork, PlasticDiagnosticSeverity.Error, "No AutoRib candidate passed manufacturing eligibility.", request.RequestId));+ var selectedName = judged.Selection?.Candidate.Name;+ return new(request.RequestId, candidates, selectedName, judged.Rejections.Select(r => $"{r.CandidateName}: {r.Reason}").ToArray(),+ "Eligibility precedes normalized utility; deterministic tie-break is priority, ordinal candidate id, then declaration order.", selectedName);++ RibEdge Edge(PlasticStandoff a, PlasticStandoff b, string kind) => new(a.StandoffId, b.StandoffId, Distance2(a.Position, b.Position), kind);+ RibCandidateEvidence Candidate(string id, IReadOnlyList<RibEdge> edges)+ {+ var rejects = new List<string>(); var p = request.Policy;+ if (Math.Abs(p.ThicknessRatio - 1d) > 1e-9) rejects.Add(PlasticDiagnosticCodes.RibThicknessViolation);+ if (p.MinimumHeight <= 0 || p.MaximumHeight < p.MinimumHeight || p.DraftAngleDegrees < x.MinimumDraftAngleDegrees) rejects.Add(PlasticDiagnosticCodes.RibToolingConflict);+ if (edges.Any(edge => edge.Length < p.MinimumSpacing)) rejects.Add($"minimum spacing {p.MinimumSpacing:R} mm is violated");+ if (request.KeepOuts.Contains(id, StringComparer.Ordinal)) rejects.Add("keepout intersects candidate network");+ var length = edges.Sum(e => e.Length); var complexity = Math.Min(1d, edges.Count / (double)(s.Length * 2)); var lengthScore = 1d - Math.Min(1d, length / (x.Exterior.TopRadius * 8d));+ var adjacency = s.ToDictionary(v => v.StandoffId, _ => new HashSet<string>(StringComparer.Ordinal), StringComparer.Ordinal);+ foreach (var edge in edges) { adjacency[edge.From].Add(edge.To); adjacency[edge.To].Add(edge.From); }+ var reached = new HashSet<string>(StringComparer.Ordinal) { s[0].StandoffId }; var pending = new Queue<string>(reached);+ while (pending.Count > 0) foreach (var next in adjacency[pending.Dequeue()]) if (reached.Add(next)) pending.Enqueue(next);+ var connectivity = reached.Count / (double)s.Length; var redundancy = Math.Min(1d, edges.Count / (double)s.Length); var support = Utility.Weighted((connectivity, .7), (redundancy, .3));+ var gateTravel = edges.Average(edge =>+ {+ var a = s.Single(v => v.StandoffId == edge.From).Position; var b = s.Single(v => v.StandoffId == edge.To).Position;+ return Distance2(new((a.X + b.X) / 2d, (a.Y + b.Y) / 2d, 0d), gate.Location);+ });+ var flow = 1d - Math.Min(1d, gateTravel / (2d * x.Exterior.TopRadius));+ var maximumConvergence = adjacency.Max(pair => pair.Value.Count) / (double)s.Length;+ var sink = Utility.Clamp01(1d - .35d * p.ThicknessRatio - .25d * maximumConvergence);+ var utility = Utility.Weighted((support, .30), (flow, .25), (sink, .15), (lengthScore, .20), (1d - complexity, .10));+ return new(id, rejects.Count == 0, new(support, flow, sink, length, complexity, utility), edges, rejects);+ }+ }++ private static double Distance2(Point3D a, Point3D b) { var dx = a.X - b.X; var dy = a.Y - b.Y; return Math.Sqrt(dx * dx + dy * dy); }+ private static double DistanceToSegment(Point3D p, Point3D a, Point3D b)+ {+ var dx = b.X - a.X; var dy = b.Y - a.Y; var l2 = dx * dx + dy * dy;+ var t = l2 <= 1e-12 ? 0d : double.Clamp(((p.X - a.X) * dx + (p.Y - a.Y) * dy) / l2, 0d, 1d);+ return Math.Sqrt(Math.Pow(p.X - (a.X + t * dx), 2d) + Math.Pow(p.Y - (a.Y + t * dy), 2d));+ }+ private static string Canonical(PlasticShellIr x, string? rib) => $"{x.PlasticShellId}|{x.Exterior.BottomRadius:R}|{x.Exterior.TopRadius:R}|{x.Exterior.Height:R}|{x.WallPolicy.NominalThickness:R}|{x.MinimumDraftAngleDegrees:R}|{rib}|{string.Join(',', x.Gates.Select(g => g.GateId))}|{string.Join(',', x.Standoffs.Select(s => s.StandoffId))}";+}++public sealed record PlasticStepSurfaceInventory(int Planes, int Cylinders, int Cones, int Spheres, int Tori, int NonRationalBSplines, int RationalProductSurfaces);+public sealed record PlasticStepExportResult(bool IsSuccess, string? Step, PlasticStepSurfaceInventory Inventory, IReadOnlyList<PlasticDiagnostic> Diagnostics);++public static class PlasticShellStepExporter+{+ public static PlasticStepExportResult Export(PlasticShellBodyState state, string productName)+ {+ var pmi = new List<Step242SemanticPmi>();+ var materialized = state.Evidence.Materialization?.Features.ToDictionary(f => f.FeatureId, StringComparer.Ordinal)+ ?? new Dictionary<string, MoldedFeatureEvidence>(StringComparer.Ordinal);+ pmi.Add(new Step242SemanticPmiNote($"plastic-shell:{state.Intent.PlasticShellId}", state.Intent.Exterior.StableId, $"First-class molded plastic product definition; wall={state.Intent.WallPolicy.NominalThickness:R} mm, tooling=({state.Intent.ToolingDirection.X:R},{state.Intent.ToolingDirection.Y:R},{state.Intent.ToolingDirection.Z:R}), parting={state.Intent.PartingPlane.StableId}, draft={state.Intent.MinimumDraftAngleDegrees:R} deg; gate, ejection, and reinforcement intent retained."));+ pmi.AddRange(state.Intent.Gates.Select(g => new Step242SemanticPmiNote($"gate:{g.GateId}", g.TargetRegion, $"{g.Kind} gate at ({g.Location.X:R},{g.Location.Y:R},{g.Location.Z:R}); geometric flow proxy only.")));+ pmi.AddRange(state.Intent.Standoffs.Select(s => (Step242SemanticPmi)new Step242SemanticPmiNote($"standoff:{s.StandoffId}", $"Standoff:{s.StandoffId}", $"{s.Intent} support at ({s.Position.X:R},{s.Position.Y:R},{s.Position.Z:R}); exact analytic annular feature with retained core hole.")+ {+ GeometricFaceIds = materialized.GetValueOrDefault($"Standoff:{s.StandoffId}")?.FaceIds ?? []+ }));+ pmi.AddRange(state.Intent.Ejectors.Select(e => new Step242SemanticPmiNote($"ejector-pin:{e.EjectorId}", e.TargetRegion, $"Tooling contact diameter {e.Diameter:R} mm; not a product hole.")));+ if (state.Evidence.RibNetwork?.SelectedCandidate is { } rib) pmi.Add(new Step242SemanticPmiNote($"autorib:{state.Intent.AutoRib!.RequestId}", $"AutoRib:{state.Intent.AutoRib.RequestId}", $"Selected network {rib}; physically grafted as constant-shell-thickness B-rep walls with flat tops and explicitly reported zero release draft; see judgment evidence sidecar.")+ {+ GeometricFaceIds = materialized.Where(p => p.Key.StartsWith("Rib:", StringComparison.Ordinal)).SelectMany(p => p.Value.FaceIds).Distinct().Order().ToArray()+ });+ var export = Step242Exporter.ExportBody(state.Body, pmi, new Step242ExportOptions { BrepExportPreflightMode = BrepExportPreflightMode.Enforce, ProductName = productName });+ if (!export.IsSuccess) return new(false, null, Empty(), export.Diagnostics.Select(d => new PlasticDiagnostic("plastic-shell-step-export-failed", PlasticDiagnosticSeverity.Error, d.Message)).ToArray());+ var step = export.Value; var inv = new PlasticStepSurfaceInventory(Count(step, "=PLANE("), Count(step, "=CYLINDRICAL_SURFACE("), Count(step, "=CONICAL_SURFACE("), Count(step, "=SPHERICAL_SURFACE("), Count(step, "=TOROIDAL_SURFACE("), Count(step, "=B_SPLINE_SURFACE_WITH_KNOTS("), Count(step, "RATIONAL_B_SPLINE_SURFACE"));+ if (inv.RationalProductSurfaces != 0) return new(false, null, inv, [new("plastic-shell-surface-export-normalization-failed", PlasticDiagnosticSeverity.Error, "Rational product surface emission is prohibited.")]);+ return new(true, step, inv, []);+ }+ private static int Count(string text, string value) => (text.Length - text.Replace(value, string.Empty, StringComparison.Ordinal).Length) / value.Length;+ private static PlasticStepSurfaceInventory Empty() => new(0, 0, 0, 0, 0, 0, 0);+}diff --git a/Aetheris.PlasticShell/PlasticShellFirmament.cs b/Aetheris.PlasticShell/PlasticShellFirmament.csnew file mode 100644index 00000000..d5ae8f27--- /dev/null+++ b/Aetheris.PlasticShell/PlasticShellFirmament.cs@@ -0,0 +1,144 @@+using System.Globalization;+using System.Text.RegularExpressions;+using Aetheris.Kernel.Core.Math;++namespace Aetheris.PlasticShell;++/// <summary>Module-owned manufacturing-first Firmament surface. It lowers to PlasticShellIr before any BRep operation.</summary>+public static class PlasticShellFirmament+{+ private static readonly RegexOptions Rx = RegexOptions.CultureInvariant | RegexOptions.IgnoreCase;++ public static bool LooksLikePlasticShell(string? source) => source is not null && Regex.IsMatch(Strip(source), @"\bPlasticShell\s+[A-Za-z_]\w*\s*\{", Rx);+ public static PlasticShellCompileResult CompileFile(string path) => Compile(File.ReadAllText(path), path);++ public static PlasticShellCompileResult Compile(string source, string sourcePath = "authored.firmament")+ {+ ArgumentNullException.ThrowIfNull(source);+ var clean = Strip(source); var diagnostics = new List<PlasticDiagnostic>();+ var model = Regex.Match(clean, @"\bModel\s+(?<name>[A-Za-z_]\w*)\s*\{", Rx);+ if (!model.Success) return Fail("<unknown>", "PlasticShell source requires 'Model Name { ... }'.");+ var modelName = model.Groups["name"].Value;+ if (!Regex.IsMatch(clean, @"\bUnits\s*:\s*mm\b", Rx)) diagnostics.Add(new(PlasticDiagnosticCodes.SourceInvalid, PlasticDiagnosticSeverity.Error, "PlasticShell X0 requires Units: mm."));+ var blocks = Blocks(clean, "PlasticShell").ToArray();+ if (blocks.Length != 1) diagnostics.Add(new(PlasticDiagnosticCodes.SourceInvalid, PlasticDiagnosticSeverity.Error, "A bounded X0 source requires exactly one PlasticShell block."));+ if (diagnostics.Count > 0 || blocks.Length != 1) return new(false, modelName, null, null, diagnostics);+ var shell = blocks[0];+ try+ {+ var exteriorKind = Scalar(shell.Body, "Exterior") ?? "Frustum";+ if (!exteriorKind.Equals("Frustum", StringComparison.OrdinalIgnoreCase)) diagnostics.Add(new(PlasticDiagnosticCodes.SourceInvalid, PlasticDiagnosticSeverity.Error, "X0 realizes only the exact analytic Frustum exterior family; the IR remains extensible to accepted SURF authority."));+ var bottomRadius = Length(shell.Body, "BottomRadius", diagnostics); var topRadius = Length(shell.Body, "TopRadius", diagnostics); var height = Length(shell.Body, "Height", diagnostics);+ var material = Scalar(shell.Body, "Material") ?? "UnspecifiedPlastic";+ var tooling = Direction(shell.Body, "ToolingDirection", diagnostics);+ var minimumDraft = Angle(shell.Body, "MinimumDraftAngle", diagnostics);+ var wallBlock = Blocks(shell.Body, "WallPolicy").SingleOrDefault();+ if (wallBlock is null) diagnostics.Add(new(PlasticDiagnosticCodes.SourceInvalid, PlasticDiagnosticSeverity.Error, "PlasticShell requires WallPolicy."));+ var nominal = wallBlock is null ? null : Length(wallBlock.Body, "NominalThickness", diagnostics);+ var minimum = wallBlock is null ? null : Length(wallBlock.Body, "MinimumThickness", diagnostics);+ var maximum = wallBlock is null ? null : Length(wallBlock.Body, "MaximumThickness", diagnostics);+ var tolerance = wallBlock is null ? null : Length(wallBlock.Body, "ThicknessTolerance", diagnostics, allowZero: true);+ var partingBlock = Blocks(shell.Body, "PartingPlane").SingleOrDefault();+ if (partingBlock is null) diagnostics.Add(new(PlasticDiagnosticCodes.InvalidParting, PlasticDiagnosticSeverity.Error, "PlasticShell X0 requires an explicit PartingPlane."));+ var partingOrigin = partingBlock is null ? null : Point(partingBlock.Body, "Origin", diagnostics);+ var partingNormal = partingBlock is null ? null : Direction(partingBlock.Body, "Normal", diagnostics);+ var preserved = List(shell.Body, "Preserve");+ var gates = Blocks(shell.Body, "Gate").Select(b => ParseGate(b, diagnostics)).Where(x => x is not null).Select(x => x!).ToArray();+ var standoffs = Blocks(shell.Body, "Standoff").Select(b => ParseStandoff(b, diagnostics)).Where(x => x is not null).Select(x => x!).ToArray();+ var ejectors = Blocks(shell.Body, "EjectorPin").Select(b => ParseEjector(b, diagnostics)).Where(x => x is not null).Select(x => x!).ToArray();+ var autoBlock = Blocks(shell.Body, "AutoRib").SingleOrDefault();+ var autoRib = autoBlock is null ? null : ParseAutoRib(autoBlock, diagnostics);+ if (gates.Length == 0) diagnostics.Add(new(PlasticDiagnosticCodes.InvalidGate, PlasticDiagnosticSeverity.Error, "PlasticShell X0 requires at least one explicit Gate."));+ if (ejectors.Length == 0) diagnostics.Add(new(PlasticDiagnosticCodes.EjectorNotCoreAccessible, PlasticDiagnosticSeverity.Error, "PlasticShell X0 policy requires at least one explicit EjectorPin."));+ if (diagnostics.Any(d => d.Severity == PlasticDiagnosticSeverity.Error) || bottomRadius is null || topRadius is null || height is null || tooling is null || minimumDraft is null || nominal is null || minimum is null || maximum is null || tolerance is null || partingOrigin is null || partingNormal is null)+ return new(false, modelName, null, null, diagnostics);+ var exteriorToken = preserved.FirstOrDefault(p => p is "ExteriorDesignSurface" or "ExteriorCrown");+ var exteriorId = $"{shell.Name}.{exteriorToken ?? "ExteriorDesignSurface"}";+ var ir = new PlasticShellIr(shell.Name,+ new(exteriorId, exteriorKind, bottomRadius.Value, topRadius.Value, height.Value, exteriorToken is not null),+ material, new(nominal.Value, minimum.Value, maximum.Value, tolerance.Value), tooling.Value,+ new(partingBlock?.Name ?? $"{shell.Name}.PartingPlane", partingOrigin.Value, partingNormal.Value), minimumDraft.Value,+ gates, standoffs, ejectors, autoRib, preserved.Select(p => p is "ExteriorDesignSurface" or "ExteriorCrown" ? $"{shell.Name}.{p}" : p).ToArray());+ var compiled = PlasticShellCompiler.Compile(ir, modelName);+ return compiled with { Diagnostics = diagnostics.Concat(compiled.Diagnostics).ToArray() };+ }+ catch (Exception ex) when (ex is ArgumentException or InvalidOperationException or OverflowException)+ {+ diagnostics.Add(new(PlasticDiagnosticCodes.SourceInvalid, PlasticDiagnosticSeverity.Error, ex.Message));+ return new(false, modelName, null, null, diagnostics);+ }+ }++ private static PlasticGate? ParseGate(Block b, ICollection<PlasticDiagnostic> d)+ {+ var position = Point(b.Body, "Position", d); var target = Scalar(b.Body, "Target") ?? "TopAnnularRim"; var size = OptionalLength(b.Body, "Size", d);+ var kindText = Scalar(b.Body, "Kind") ?? "Point";+ if (!Enum.TryParse<GateKind>(kindText, true, out var kind)) { d.Add(new(PlasticDiagnosticCodes.SourceInvalid, PlasticDiagnosticSeverity.Error, $"Unknown Gate Kind '{kindText}'.", b.Name)); return null; }+ return position is null ? null : new(b.Name, position.Value, target, kind, size);+ }++ private static PlasticStandoff? ParseStandoff(Block b, ICollection<PlasticDiagnostic> d)+ {+ var p = Point(b.Body, "Position", d); var h = Length(b.Body, "Height", d); var od = Length(b.Body, "OuterDiameter", d); var hole = OptionalLength(b.Body, "HoleDiameter", d);+ var intentText = Scalar(b.Body, "SupportIntent") ?? "Pcb";+ if (!Enum.TryParse<StandoffSupportIntent>(intentText, true, out var intent)) { d.Add(new(PlasticDiagnosticCodes.SourceInvalid, PlasticDiagnosticSeverity.Error, $"Unknown Standoff SupportIntent '{intentText}'.", b.Name)); return null; }+ return p is null || h is null || od is null ? null : new(b.Name, p.Value, h.Value, od.Value, hole, intent);+ }++ private static PlasticEjectorPin? ParseEjector(Block b, ICollection<PlasticDiagnostic> d)+ {+ var p = Point(b.Body, "Position", d); var diameter = Length(b.Body, "Diameter", d); var target = Scalar(b.Body, "Target") ?? "InnerBottom";+ return p is null || diameter is null ? null : new(b.Name, p.Value, diameter.Value, target);+ }++ private static PlasticAutoRibRequest? ParseAutoRib(Block b, ICollection<PlasticDiagnostic> d)+ {+ var supports = List(b.Body, "Support"); var gate = Scalar(b.Body, "Gate") ?? string.Empty; var keepouts = List(b.Body, "KeepOut");+ var policyBlock = Blocks(b.Body, "RibPolicy").SingleOrDefault();+ if (policyBlock is null) { d.Add(new(PlasticDiagnosticCodes.SourceInvalid, PlasticDiagnosticSeverity.Error, "AutoRib requires RibPolicy.", b.Name)); return null; }+ var ratio = Number(policyBlock.Body, "ThicknessRatio", d); var min = Length(policyBlock.Body, "MinimumHeight", d); var max = Length(policyBlock.Body, "MaximumHeight", d); var spacing = Length(policyBlock.Body, "MinimumSpacing", d); var draft = Angle(policyBlock.Body, "DraftAngle", d); var blend = Length(policyBlock.Body, "BaseBlendRadius", d, allowZero: true);+ return ratio is null || min is null || max is null || spacing is null || draft is null || blend is null ? null : new(b.Name, supports, gate, keepouts, new(ratio.Value, min.Value, max.Value, spacing.Value, draft.Value, blend.Value));+ }++ private static string Strip(string source) => Regex.Replace(source, @"//.*?$|#.*?$", string.Empty, RegexOptions.Multiline);+ private static string? Scalar(string body, string key) => Regex.Match(body, $@"\b{Regex.Escape(key)}\s*:\s*(?<v>[A-Za-z_][\w.:-]*)", Rx) is { Success: true } m ? m.Groups["v"].Value : null;+ private static double? Number(string body, string key, ICollection<PlasticDiagnostic> d) => Quantity(body, key, null, d, false);+ private static double? Length(string body, string key, ICollection<PlasticDiagnostic> d, bool allowZero = false) => Quantity(body, key, "mm", d, allowZero);+ private static double? Angle(string body, string key, ICollection<PlasticDiagnostic> d) => Quantity(body, key, "deg", d, true);+ private static double? OptionalLength(string body, string key, ICollection<PlasticDiagnostic> d) => Regex.IsMatch(body, $@"\b{Regex.Escape(key)}\s*:", Rx) ? Length(body, key, d) : null;+ private static double? Quantity(string body, string key, string? unit, ICollection<PlasticDiagnostic> d, bool allowZero)+ {+ var suffix = unit is null ? string.Empty : $@"\s*{unit}"; var m = Regex.Match(body, $@"\b{Regex.Escape(key)}\s*:\s*(?<v>[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?)" + suffix + @"\s*;?", Rx);+ if (!m.Success || !double.TryParse(m.Groups["v"].Value, NumberStyles.Float, CultureInfo.InvariantCulture, out var v) || !double.IsFinite(v) || (allowZero ? v < 0 : v <= 0)) { d.Add(new(PlasticDiagnosticCodes.SourceInvalid, PlasticDiagnosticSeverity.Error, $"{key} requires a finite {(allowZero ? "non-negative" : "positive")} value{(unit is null ? string.Empty : " in " + unit)}.")); return null; }+ return v;+ }+ private static Point3D? Point(string body, string key, ICollection<PlasticDiagnostic> d) { var v = Vector(body, key, d); return v is null ? null : new(v[0], v[1], v[2]); }+ private static Direction3D? Direction(string body, string key, ICollection<PlasticDiagnostic> d)+ {+ var v = Vector(body, key, d); if (v is null) return null;+ try { return Direction3D.Create(new Vector3D(v[0], v[1], v[2])); } catch (ArgumentException) { d.Add(new(PlasticDiagnosticCodes.SourceInvalid, PlasticDiagnosticSeverity.Error, $"{key} must be a non-zero direction.")); return null; }+ }+ private static double[]? Vector(string body, string key, ICollection<PlasticDiagnostic> d)+ {+ var m = Regex.Match(body, $@"\b{Regex.Escape(key)}\s*:\s*\[(?<v>[^\]]+)\]", Rx); if (!m.Success) { d.Add(new(PlasticDiagnosticCodes.SourceInvalid, PlasticDiagnosticSeverity.Error, $"{key} requires [x, y, z].")); return null; }+ var parts = m.Groups["v"].Value.Split(',').Select(x => double.TryParse(x.Trim(), NumberStyles.Float, CultureInfo.InvariantCulture, out var v) ? (double?)v : null).ToArray();+ if (parts.Length != 3 || parts.Any(x => x is null || !double.IsFinite(x.Value))) { d.Add(new(PlasticDiagnosticCodes.SourceInvalid, PlasticDiagnosticSeverity.Error, $"{key} requires three finite numbers.")); return null; }+ return parts.Select(x => x!.Value).ToArray();+ }+ private static IReadOnlyList<string> List(string body, string key)+ {+ var m = Regex.Match(body, $@"\b{Regex.Escape(key)}\s*:\s*\[(?<v>[^\]]*)\]", Rx); return !m.Success ? [] : m.Groups["v"].Value.Split(',', StringSplitOptions.TrimEntries | StringSplitOptions.RemoveEmptyEntries);+ }+ private static IEnumerable<Block> Blocks(string source, string keyword)+ {+ var matches = Regex.Matches(source, $@"\b{Regex.Escape(keyword)}(?:\s+(?<name>[A-Za-z_]\w*))?\s*\{{", Rx);+ foreach (Match match in matches)+ {+ var depth = 1; var i = match.Index + match.Length;+ for (; i < source.Length && depth > 0; i++) { if (source[i] == '{') depth++; else if (source[i] == '}') depth--; }+ if (depth == 0) yield return new(match.Groups["name"].Success ? match.Groups["name"].Value : keyword, source[(match.Index + match.Length)..(i - 1)]);+ }+ }+ private static PlasticShellCompileResult Fail(string model, string message) => new(false, model, null, null, [new(PlasticDiagnosticCodes.SourceInvalid, PlasticDiagnosticSeverity.Error, message)]);+ private sealed record Block(string Name, string Body);+}diff --git a/Aetheris.PlasticShell/PlasticShellIr.cs b/Aetheris.PlasticShell/PlasticShellIr.csnew file mode 100644index 00000000..72471a89--- /dev/null+++ b/Aetheris.PlasticShell/PlasticShellIr.cs@@ -0,0 +1,123 @@+using Aetheris.Kernel.Core.Brep;+using Aetheris.Kernel.Core.Math;+using Aetheris.Surfacing;++namespace Aetheris.PlasticShell;++public enum PlasticEvidenceStrength { ExactAnalytic, CertifiedBounded, SampledConservative, GeometricProxy }+public enum PlasticDiagnosticSeverity { Information, Warning, Error }+public enum MoldPullSide { CoreSide, CavitySide, PartingBoundary, Undercut }+public enum StandoffSupportIntent { Pcb, Fastener, Spacing }+public enum GateKind { Point, Edge }++public static class PlasticDiagnosticCodes+{+ public const string SourceInvalid = "plastic-shell-source-invalid";+ public const string WallOffsetCollapse = "plastic-shell-wall-offset-collapse";+ public const string WallThicknessViolation = "plastic-shell-wall-thickness-violation";+ public const string DraftConflict = "plastic-shell-draft-conflicts-preserved-surface";+ public const string DraftInsufficient = "plastic-shell-draft-insufficient";+ public const string Undercut = "plastic-shell-undercut";+ public const string InvalidParting = "plastic-shell-invalid-parting";+ public const string InvalidGate = "plastic-shell-gate-invalid-region";+ public const string GateInaccessible = "plastic-shell-gate-inaccessible";+ public const string EjectorNotCoreAccessible = "plastic-shell-ejector-not-core-accessible";+ public const string EjectorCollidesFeature = "plastic-shell-ejector-collides-feature";+ public const string EjectorCosmeticRegion = "plastic-shell-ejector-cosmetic-region";+ public const string StandoffThickSection = "plastic-shell-standoff-thick-section-proxy";+ public const string AutoRibNoEligibleNetwork = "plastic-shell-autorib-no-eligible-network";+ public const string RibThicknessViolation = "plastic-shell-rib-thickness-violation";+ public const string RibToolingConflict = "plastic-shell-rib-tooling-conflict";+ public const string ConstantSectionFeatureZeroDraft = "plastic-shell-constant-section-feature-zero-draft";+ public const string MaterializationFailed = "plastic-shell-materialization-failed";+ public const string MaterialAccumulation = "plastic-shell-material-accumulation";+ public const string MaterializedFeatureOutsideAuthorizedRegion = "plastic-shell-materialized-feature-outside-authorized-region";+ public const string EjectorRibCollision = "plastic-shell-ejector-rib-collision";+}++public sealed record PlasticDiagnostic(string Code, PlasticDiagnosticSeverity Severity, string Message, string? Entity = null);+public sealed record PlasticWallPolicy(double NominalThickness, double MinimumThickness, double MaximumThickness, double ThicknessTolerance);+public sealed record PlasticPartingPlane(string StableId, Point3D Origin, Direction3D Normal);+public sealed record PlasticGate(string GateId, Point3D Location, string TargetRegion, GateKind Kind, double? Size);+public sealed record PlasticStandoff(string StandoffId, Point3D Position, double Height, double OuterDiameter, double? HoleDiameter, StandoffSupportIntent Intent);+public sealed record PlasticEjectorPin(string EjectorId, Point3D Position, double Diameter, string TargetRegion);+public sealed record PlasticRibPolicy(double ThicknessRatio, double MinimumHeight, double MaximumHeight, double MinimumSpacing, double DraftAngleDegrees, double BaseBlendRadius);+public sealed record PlasticAutoRibRequest(string RequestId, IReadOnlyList<string> Supports, string GateId, IReadOnlyList<string> KeepOuts, PlasticRibPolicy Policy);++public sealed record PlasticExteriorAuthority(+ string StableId,+ string Kind,+ double BottomRadius,+ double TopRadius,+ double Height,+ bool Protected);++public sealed record PlasticShellIr(+ string PlasticShellId,+ PlasticExteriorAuthority Exterior,+ string Material,+ PlasticWallPolicy WallPolicy,+ Direction3D ToolingDirection,+ PlasticPartingPlane PartingPlane,+ double MinimumDraftAngleDegrees,+ IReadOnlyList<PlasticGate> Gates,+ IReadOnlyList<PlasticStandoff> Standoffs,+ IReadOnlyList<PlasticEjectorPin> Ejectors,+ PlasticAutoRibRequest? AutoRib,+ IReadOnlyList<string> PreservedEntities);++public sealed record ThicknessSample(string Region, Point3D Location, double Thickness, PlasticEvidenceStrength Strength);+public sealed record PlasticThicknessEvidence(double RequestedNominal, double Minimum, double Maximum, double Mean, Point3D MinimumLocation, Point3D MaximumLocation, IReadOnlyList<ThicknessSample> Samples, IReadOnlyList<string> Violations, string Method, PlasticEvidenceStrength Strength);+public sealed record PlasticDraftRegionEvidence(string Region, MoldPullSide PullSide, double DraftAngleDegrees, double RequiredDegrees, bool Satisfied, PlasticEvidenceStrength Strength, string Basis);+public sealed record PlasticPullabilityEvidence(IReadOnlyList<string> CoreAccessible, IReadOnlyList<string> CavityAccessible, IReadOnlyList<string> PartingBoundary, IReadOnlyList<string> Undercuts, string Method, PlasticEvidenceStrength Strength);+public sealed record PlasticGateEvidence(string GateId, Point3D Location, string SurfaceAssociation, double MaximumProxyDistance, double MeanRepresentativeProxyDistance, string Method);+public sealed record PlasticEjectorEvidence(string EjectorId, bool CoreAccessible, bool CollisionFree, bool OutsideProtectedCosmeticRegion, string Basis);+public sealed record RibEdge(string From, string To, double Length, string Kind);+public sealed record RibCandidateMetrics(double SupportProxy, double FlowCompatibility, double SinkProxy, double RibLength, double Complexity, double Utility);+public sealed record RibCandidateEvidence(string CandidateId, bool Eligible, RibCandidateMetrics Metrics, IReadOnlyList<RibEdge> Edges, IReadOnlyList<string> RejectionReasons);+public sealed record RibMaterializationGateEvidence(string CandidateId, string Status, bool? Eligible, IReadOnlyList<string> RejectionReasons);+public sealed record AutoRibJudgmentEvidence(string RequestId, IReadOnlyList<RibCandidateEvidence> Candidates, string? SelectedCandidate, IReadOnlyList<string> Rejections, string DeterministicBasis,+ string? OriginalSelectedCandidate = null, IReadOnlyList<RibMaterializationGateEvidence>? MaterializationGates = null);+public sealed record MoldedFeatureEvidence(string FeatureId, string Kind, IReadOnlyList<int> FaceIds, double Height,+ double BaseThickness, double TopThickness, double NominalWallRatio, SpatialInfluenceEnvelope AuthorizedRegion,+ double MinimumDraftAngleDegrees, PlasticEvidenceStrength Strength);+public sealed record MoldedJunctionEvidence(string JunctionId, IReadOnlyList<string> Members, double AccumulationRatio, bool WithinLimit, string Transition);+public sealed record MoldedMaterializationEvidence(+ IReadOnlyList<MoldedFeatureEvidence> Features,+ IReadOnlyList<MoldedJunctionEvidence> Junctions,+ double ExteriorMaximumDeviation,+ string ExteriorFingerprintBefore,+ string ExteriorFingerprintAfter,+ int ConnectedBodies,+ int ClosedShells,+ int BoundaryFaces,+ bool HasInternalDuplicateFaces,+ string ConstructionMethod,+ PlasticEvidenceStrength Strength);++public sealed record PlasticShellEvidence(+ PlasticThicknessEvidence WallThickness,+ IReadOnlyList<PlasticDraftRegionEvidence> Draft,+ PlasticPullabilityEvidence Pullability,+ IReadOnlyList<PlasticGateEvidence> Gates,+ IReadOnlyList<PlasticEjectorEvidence> Ejectors,+ AutoRibJudgmentEvidence? RibNetwork,+ MoldedMaterializationEvidence? Materialization,+ IReadOnlyDictionary<string, MoldPullSide> SurfaceClassification,+ string PartingSummary,+ string TopologySummary);++public sealed record PlasticShellBodyState(+ BodyStateId StateId,+ string BodyStableId,+ BrepBody Body,+ PlasticShellIr Intent,+ GeometricDelta Delta,+ PlasticShellEvidence Evidence);++public sealed record PlasticShellCompileResult(+ bool IsSuccess,+ string ModelName,+ PlasticShellIr? Intent,+ PlasticShellBodyState? State,+ IReadOnlyList<PlasticDiagnostic> Diagnostics);diff --git a/Aetheris.PlasticShell/PlasticShellModule.cs b/Aetheris.PlasticShell/PlasticShellModule.csnew file mode 100644index 00000000..fec0a50f--- /dev/null+++ b/Aetheris.PlasticShell/PlasticShellModule.cs@@ -0,0 +1,27 @@+using Aetheris.Modules;+using Aetheris.Surfacing;++namespace Aetheris.PlasticShell;++public static class PlasticShellModule+{+ public static readonly AetherisModuleId Id = new("Aetheris.PlasticShell");+ public static readonly ModuleVersion Version = new(0, 1, 0);+ public static AetherisModule Definition { get; } = new(Id, "Plastic Shell", Version,+ [+ Capability("PlasticShell.Intent", "First-class molded-product intent retaining exterior authority, wall policy, tooling, parting, gates, standoffs, ejectors, and AutoRib."),+ Capability("PlasticShell.Wall", "Exact paired-support wall realization and independent analytic thickness evidence for the bounded frustum family."),+ Capability("PlasticShell.Tooling", "Exact tooling direction, planar parting, signed draft classification, and bounded directional pullability evidence."),+ Capability("PlasticShell.FlowProxy", "Explicitly non-physical geometric distance proxy from semantic gates."),+ Capability("PlasticShell.AutoRib", "Eligibility-first deterministic rib-network selection through the shared Judgment Engine."),+ Capability("PlasticShell.Step", "Closed-manifold AP242 product body with semantic manufacturing notes and zero rational product surfaces.")+ ],+ ["PlasticShell", "MoldedProduct", "ToolingIntent", "ConstantWall"],+ ["PlasticShell<Exterior,WallPolicy,Tooling,Parting,ManufacturingFeatures>"],+ ["Firmament PlasticShell -> PlasticShellIr -> molding constraints -> exact bounded body -> evidence -> AP242"],+ typeof(PlasticDiagnosticCodes).GetFields().Where(f => f.IsLiteral).Select(f => (string)f.GetRawConstantValue()!).ToArray(),+ [new(CoreModule.Id, new(1, 0, 0)), new(SurfacingModule.Id, new(0, 1, 0))],+ new("docs/public/firmament/plastic-shell.md"));++ private static ModuleCapability Capability(string id, string description) => new(id, Id, Version, description);+}diff --git a/Aetheris.slnx b/Aetheris.slnxindex cf8ac9da..5c6338a9 100644--- a/Aetheris.slnx+++ b/Aetheris.slnx@@ -13,6 +13,8 @@<Project Path="Aetheris.Piping/Aetheris.Piping.csproj" /><Project Path="Aetheris.SheetMetal/Aetheris.SheetMetal.csproj" /><Project Path="Aetheris.SheetMetal.Tests/Aetheris.SheetMetal.Tests.csproj" />+ <Project Path="Aetheris.PlasticShell/Aetheris.PlasticShell.csproj" />+ <Project Path="Aetheris.PlasticShell.Tests/Aetheris.PlasticShell.Tests.csproj" /><Project Path="Aetheris.Modules.BuiltIn/Aetheris.Modules.BuiltIn.csproj" /><Project Path="Aetheris.Modules.Tests/Aetheris.Modules.Tests.csproj" /><Project Path="Aetheris.Continuum/Aetheris.Continuum.csproj" />diff --git a/docs/public/README.md b/docs/public/README.mdindex d54b47c3..59496d05 100644--- a/docs/public/README.md+++ b/docs/public/README.md@@ -4,7 +4,7 @@ This directory is the only authoritative in-repository guide to behavior shippedStart with [Getting Started](getting-started.md), then use these guides:-- Firmament: [overview](firmament/overview.md), [language style](firmament/language-style.md), [syntax](firmament/syntax.md), [geometry](firmament/geometry.md), [bounded mathematical sculpting](firmament/sculpting.md), [Circular Sweep](firmament/sweep.md), [Structural members and weldments](firmament/structural.md), [Semantic piping and local autorouting](firmament/piping.md), [Paperclip Template](firmament/paperclip.md), [Templates](firmament/templates.md), [materials](firmament/materials.md), [PMI](firmament/pmi.md), [Sheet Metal](firmament/sheet-metal.md), [FEA](firmament/fea.md), and [STEP import](firmament/step-import.md)+- Firmament: [overview](firmament/overview.md), [language style](firmament/language-style.md), [syntax](firmament/syntax.md), [geometry](firmament/geometry.md), [bounded mathematical sculpting](firmament/sculpting.md), [PlasticShell](firmament/plastic-shell.md), [Circular Sweep](firmament/sweep.md), [Structural members and weldments](firmament/structural.md), [Semantic piping and local autorouting](firmament/piping.md), [Paperclip Template](firmament/paperclip.md), [Templates](firmament/templates.md), [materials](firmament/materials.md), [PMI](firmament/pmi.md), [Sheet Metal](firmament/sheet-metal.md), [FEA](firmament/fea.md), and [STEP import](firmament/step-import.md)- Standard Library: [product-family index, invocation, authoring, and compatibility](standard-library/README.md)- Interoperability: [Forge Host Protocol v1](forge/interop.md)- Inspection: [Cadmata](cadmata/overview.md) and [Cadmata PMI](cadmata/pmi.md)diff --git a/docs/public/firmament/plastic-shell.md b/docs/public/firmament/plastic-shell.mdnew file mode 100644index 00000000..0485fe67--- /dev/null+++ b/docs/public/firmament/plastic-shell.md@@ -0,0 +1,75 @@+# PlasticShell++`PlasticShell` is Aetheris's manufacturing-first domain for injection-molded product definitions. Wall thickness, tooling direction, parting, and reinforcement intent live in the domain model rather than as a sequence of cleanup features.++```firmament+PlasticShell EnclosureHalf {+ Exterior: Frustum+ BottomRadius: 55 mm+ TopRadius: 57 mm+ Height: 20 mm+ Material: ABS+ ToolingDirection: [0, 0, 1]+ MinimumDraftAngle: 3 deg+ Preserve: [ExteriorDesignSurface]++ WallPolicy {+ NominalThickness: 2.2 mm+ MinimumThickness: 2.1 mm+ MaximumThickness: 2.3 mm+ ThicknessTolerance: 0.05 mm+ }++ PartingPlane MainParting {+ Origin: [0, 0, 20]+ Normal: [0, 0, 1]+ }+}+```++## Bounded X0a geometry++The accepted exterior is an open coaxial frustum. Its inner cone and bottom plane are exact analytic offsets. Aetheris reports exact wall thickness and cone-draft evidence, plus bounded +Z core/cavity/parting classification. This is not a general arbitrary-B-rep visibility or freeform-offset certificate.++Standoffs become analytic annular cylinders with retained core holes. Selected AutoRib edges become explicit B-rep walls:++- thickness equals `WallPolicy.NominalThickness` from base to top;+- each rib has two parallel planar side faces and one flat planar top;+- rib ends meet standoff cylinders through shared chord and vertical edges;+- the cavity floor owns the exact connected feature-footprint loops;+- shell, standoffs, and ribs form one closed product boundary with no mesh, feature solids, or coincident interface faces.++`RibPolicy.ThicknessRatio` must be `1.0` for this constant-shell-thickness realization. `BaseBlendRadius` remains retained intent but the current exact wall route does not claim a fillet or base flare.++There is an unavoidable molding tradeoff: parallel vertical rib sides and cylindrical standoff walls have **0° release draft**. The compiler keeps the requested clean constant sections and emits `plastic-shell-constant-section-feature-zero-draft` as a warning when the model requests positive draft. The geometry is +Z single-valued and has no reverse undercut, but tooling release remains an explicit process decision. A future tapered-wall construction may satisfy positive draft, but it would not be constant thickness in horizontal section.++## AutoRib and manufacturing evidence++AutoRib evaluates manufacturing eligibility before the shared Judgment Engine scores support connectivity, gate-flow compatibility, a bounded sink proxy, material length, and graph complexity. The sidecar retains all candidates, metrics, rejections, the selected network, and deterministic tie-break basis.++Each realized feature reports exact face associations, its authorized envelope, height, base/top thickness, nominal-wall ratio, and draft. Junction accumulation is bounded by the largest wall section meeting at the shared-edge junction:++```text+max(standoff radial wall, rib wall thickness) / nominal shell wall+```++This is a simple thick-section guard, not sink, cooling, shrinkage, warpage, or moldflow simulation. Ejector checks cover core-floor containment and exact selected-rib/standoff planar clearance; ejectors are never silently relocated.++## The happy little accident++The retired `96 × 48` polar height-field experiment is preserved as mathematical computer art. It is deliberately isolated from normal PlasticShell build and manufacturing evidence:++```powershell+dotnet run --project Aetheris.CLI -- experimental heightfield-art fixtures/Canonical/PlasticShell/plastic-shell-enclosure.firmament --out artifacts/local/heightfield-art/happy-little-accident.step --json+```++That command emits an AP242 note classifying the artifact as non-manufacturing artwork. A normal `build` never calls the height-field generator.++## Build and inspect++```powershell+dotnet run --project Aetheris.CLI -- build fixtures/Canonical/PlasticShell/plastic-shell-enclosure.firmament --output artifacts/local/mold-x0a/mold-x0a-materialized-enclosure.step --json+dotnet run --project Aetheris.CLI -- inspect fixtures/Canonical/PlasticShell/plastic-shell-enclosure.firmament --json+```++X0a does not generate mold blocks, runners, sprues, cooling channels, slides, lifters, or moldflow results. Freeform PlasticShell exteriors, arbitrary rib graphs, smooth junction blends, and automatic ejector relocation remain outside this bounded milestone.diff --git a/docs/public/reference/supported-features.md b/docs/public/reference/supported-features.mdindex dae70bb6..d5cebd8c 100644--- a/docs/public/reference/supported-features.md+++ b/docs/public/reference/supported-features.md@@ -6,6 +6,7 @@|---|---|---|| Firmament V2 native primitives/profiles | Bounded | Named Box/Cylinder/Frustum/RoundedBox and admitted line/arc profile construction/composition || Bounded mathematical sculpting | Bounded (SURF-X2 subset) | Immutable single-predecessor `BodyState`; rectangular-housing `OffsetRegion`; direct or imported-face `ReplaceRegion`; qualified crown-to-planar-shoulder `BlendBoundary` with hard G1/G2 evidence, four deterministic polynomial candidates, fairness/curvature/compactness/complexity judgment, override/fallback trace, qualified intersections and pcurves, exact lower-body locality, AP242 association persistence, and rational-free STEP. General blend networks remain unsupported. See the [sculpting guide](../firmament/sculpting.md). |+| Molded plastic shell | Bounded (MOLD-X0a) | First-class `PlasticShell` IR; exact drafted coaxial-frustum shell; analytic annular standoffs with retained core holes; constant-shell-thickness planar B-rep rib walls with flat tops; one closed product boundary; face-associated AP242 notes; and explicit zero-release-draft warning for constant-section vertical features. The retired polar height field is available only through the non-manufacturing experimental art command. Freeform exterior offsets and general junctions remain unsupported. See the [PlasticShell guide](../firmament/plastic-shell.md). || Firmament V2 analytic primitives | Bounded | Direct named Sphere, Cone (including zero-radius pointed end), and Torus routes round-trip through AP242; legacy `solid` declarations remain compatibility inputs, not canonical authoring || Circular Sweep | Bounded (X0) | Open planar XY Concept Path, tangent line/arc segments, constant circular diameter, analytic cylinder/torus faces, capped solid; no general 3D/variable/rail/twist sweep || Structural / weldment | Bounded (X2) | Explicit 3D nodes and straight paths; identifiable members; square/rectangular/round tube, angle, flat/round bar; orientation; catalog material; two-member butt and polygonal miter joints; semantic fillet welds; AP242 member assembly and deterministic JSON Cut List. No coping, curved routing, multi-member miter, connection design, weld analysis, or structural FEA. See [guide](../firmament/structural.md). |diff --git a/docs/release/MOLD-X0-PLASTIC-SHELL-FOUNDATION.md b/docs/release/MOLD-X0-PLASTIC-SHELL-FOUNDATION.mdnew file mode 100644index 00000000..537bad7f--- /dev/null+++ b/docs/release/MOLD-X0-PLASTIC-SHELL-FOUNDATION.md@@ -0,0 +1,138 @@+# MOLD-X0 — Plastic Shell Foundation++## Executive verdict++**Meaningful progression**++Aetheris can now define and realize a bounded molded plastic shell from `PlasticShell` manufacturing intent instead of a post-hoc Shell/Draft sequence. The real path is:++```text+PlasticShell source+→ retained PlasticShellIr+→ wall/tooling/parting constraint checks+→ exact drafted thin-wall realization+→ thickness, draft, and pullability evidence+→ gate/ejector validation and AutoRib judgment+→ GeometricDelta+→ rational-free STEP AP242 plus evidence sidecar+```++This is not yet Accepted because standoff and selected-rib added material is not grafted into the single product boundary, and the admitted exterior is a bounded analytic frustum rather than the requested accepted SURF freeform housing. Those are concrete geometry-lowering blockers; representing them as disconnected solids would violate the one-solid acceptance condition.++## Domain architecture++`PlasticShellIr` retains shell identity, exterior authority, material identity, `PlasticWallPolicy`, normalized tooling direction, explicit `PlasticPartingPlane`, minimum draft, gates, standoffs, ejectors, preservation targets, and `PlasticAutoRibRequest`. Parser syntax does not expand into generic Shell and Draft operations.++The module reuses SURF `BodyStateId`, `GeometricDelta`, preservation identifiers, and authorized influence envelopes. AutoRib uses the shared `JudgmentEngine`; eligibility is a hard gate and utility cannot override it.++## Thickness algorithm++The X0 exterior family is a coaxial frustum with radius++```text+r_o(z) = R_b + kz, k = (R_t - R_b) / H.+```++The inner conical support is the exact parallel offset at normal distance `T`:++```text+r_i(z) = R_b + kz - T sqrt(1 + k²), z ∈ [T, H].+```++The bottom inner plane is `z = T`. Admission requires positive inner radii and height clearance. Independent thickness evidence consumes the paired-support witnesses and measures exact cone-to-cone normal distance and plane-to-plane distance. No medial-axis or general freeform thickness claim is made. X0 has no local correction path: a collapsed exact offset fails with `plastic-shell-wall-offset-collapse` and never deforms the protected exterior.++Flagship wall evidence:++- Requested nominal: 2.2 mm+- Minimum measured: 2.2 mm at `(55, 0, 0)`+- Maximum measured: 2.2 mm at `(55, 0, 0)`+- Mean: 2.2 mm+- Violations: none+- Strength: exact analytic on the admitted topology++## Draft and pullability++Draft is the signed cone semi-angle relative to +Z:++```text+θ = atan((R_t - R_b) / H).+```++The flagship realizes `5.710593137499643°` against a `3°` requirement on both outer and parallel-offset inner conical walls. The outer wall is cavity-side, the inner wall and inner bottom are core-side, and the annular rim is the parting boundary.++Pullability uses exact monotone-generatrix classification for the admitted coaxial family. Negative taper is an undercut; insufficient positive taper is a draft conflict. This is bounded directional accessibility, not general ray certification. The flagship has no undercut regions.++## Gate and geometric flow proxy++`MainGate` is an edge gate at `(0, 57, 20)` associated with `TopAnnularRim`. The proxy uses bounded geometric distance statistics only:++- Maximum proxy distance: 111.8 mm+- Representative mean proxy distance: 69.316 mm++It does not compute pressure, fill time, temperature, weld lines, air traps, shrinkage, or warpage.++## Standoffs and ejectors++The flagship retains four PCB standoffs (`PcbA`–`PcbD`) with position, height, outer diameter, core-hole diameter, and support intent. It retains four 4 mm ejector contacts (`E1`–`E4`) on the core floor. Analytic radial containment and circle-clearance checks show all ejectors are core-accessible, collision-free against standoff envelopes, and outside the protected exterior.++Ejectors remain tooling contacts and are not subtracted as product holes. Standoffs remain semantic product features in this progression; their cylindrical added material is not present in the STEP boundary.++## AutoRib judgment++The request generates two deterministic networks from the four support nodes. The fan root is the standoff nearest the declared gate, so moving the gate changes the proposed graph. Flow compatibility is computed from mean gate-to-edge-midpoint distance normalized by shell diameter; support is graph connectivity plus edge redundancy; the sink proxy penalizes authored thickness ratio and node convergence. Both flagship candidates pass thickness-ratio, height/draft, measured minimum-spacing, parting-family, and named-keepout gates.++| Candidate | Eligible | Support proxy | Flow compatibility | Sink proxy | Rib length (mm) | Complexity | Utility |+| --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: |+| perimeter-network | yes | 1.000 | 0.477011 | 0.6825 | 200.000000 | 0.500 | 0.6839084810544059 |+| gate-oriented-fan | yes | 0.925 | 0.557773 | 0.6200 | 170.710678 | 0.375 | 0.6975702688965096 |++The Judgment Engine selects `gate-oriented-fan`. Candidate metrics and the deterministic tie-break basis survive in the JSON evidence. The stiffness and sink values are geometric proxies, not FEA or verified sink analysis. Rib solid realization is the next isolated blocker.++## BodyState, locality, and interfaces++The delta reads the protected exterior and parting plane, preserves `EnclosureHalf.ExteriorDesignSurface` and `MountingInterface`, and authorizes only generated interior/manufacturing regions inside `[-57,57] × [-57,57] × [0,20]` mm. Exact exterior parameters are unchanged. The assembly-interface name survives semantic evidence, but no face-bound interface binding was present in the new fixture to round-trip.++## Flagship and representation inventory++- Model: `MoldX0ElectronicsEnclosureHalf`+- Material: `ABS` identity only; no unsourced constitutive or process properties were added+- Tooling direction: +Z+- Parting plane: origin `(0,0,20)`, normal +Z+- Body topology: 1 body, 1 closed shell, 5 faces, 4 edges, 4 vertices+- STEP reinspection: `enclosed-manifold`+- Planes: 3+- Cylinders: 0+- Cones: 2+- Spheres: 0+- Tori: 0+- Non-rational B-splines: 0+- Rational product surfaces: 0++## Diagnostics and fixtures++Focused invalid fixtures exercise wall collapse, draft conflict, negative-taper undercut, invalid parting, invalid gate, invalid ejector, and no eligible rib network. Canonical fixtures exercise the minimal shell and flagship enclosure. Public docs state the precise bounded scope and explicitly reject Moldflow and mold-tool claims.++## Manual artifact++- STEP: `artifacts/local/mold-x0/mold-x0-plastic-shell-enclosure.step`+- Evidence: `artifacts/local/mold-x0/mold-x0-plastic-shell-enclosure.plastic-shell.json`+- SHA-256: `e9f583677771c4be940e11a64607e35488a5341b48a5fb107addd2589e29b430`++Please inspect the STEP manually for the exterior taper, open rim, inner wall, bottom thickness, parting location, unexpected undercuts, and topology artifacts. Standoffs, ribs, gate, and ejectors are intentionally semantic annotations in this progression and should not be expected as visible solids.++## Remaining blocker++The next convergent step is a topology-authoritative feature graft that integrates drafted cylindrical standoffs and drafted rib networks with the inner bottom and wall while preserving one closed manifold, exact analytic surfaces, locality correspondence, and zero rational product surfaces. After that, the same offset/verification interfaces can be generalized to accepted non-rational SURF patches with adaptive draft and accessibility evidence.++## Qualification record++- Release solution build: passed, 0 warnings and 0 errors.+- Full serial .NET suite: 3,151 tests passed; the existing `Aetheris.FrictionLab.Tests` assembly reports no discoverable tests.+- PlasticShell domain suite: 11 tests passed, including parser/IR, exact wall, STEP reimport, rational prohibition, seven focused invalid fixtures, deterministic judgment, and gate-dependent fan generation.+- Canonical fixture qualification: 99 fixtures passed, including both PlasticShell fixtures.+- Real CLI `build`, `validate`, `inspect`, `analyze`, and `verify`: passed. Reimport is one enclosed, orientation-consistent body/shell; external CAD display remains a requested manual step.+- Client: 16 test files / 82 tests passed; production build and lint passed.+- VS Code extension via TSPack: sync/check/typecheck, 13 tests, build, and VSIX packaging passed. TSPack repeated the repository's acknowledged multi-version and blocked lifecycle-script notices.+- Repository layout guard and `git diff --check`: passed.+- Independent fresh-agent A–G review: correct PlasticShell/Standoff/Gate/AutoRib authoring and bounded pullability/export/judgment evidence were discoverable. Reviewers independently confirmed the same remaining blockers: no freeform exterior realization and no standoff/rib material in the B-rep.+- NativeAOT Forge was not affected by this managed built-in domain addition.diff --git a/docs/release/MOLD-X0A-MOLDED-FEATURE-MATERIALIZATION.md b/docs/release/MOLD-X0A-MOLDED-FEATURE-MATERIALIZATION.mdnew file mode 100644index 00000000..37bbe6b6--- /dev/null+++ b/docs/release/MOLD-X0A-MOLDED-FEATURE-MATERIALIZATION.md@@ -0,0 +1,85 @@+# MOLD-X0a — Exact Molded-Feature B-rep++## Executive verdict++**Accepted for the bounded analytic-frustum CAD route, with an explicit zero-release-draft qualification.**++PlasticShell standoffs and the selected AutoRib network now lower to a compact, exact B-rep product boundary. The `96 × 48` polar height field has been removed from production and retained only as an experimental, non-manufacturing art export.++```text+PlasticShellIr+→ eligibility-first AutoRib judgment+→ analytic standoffs and constant-thickness wall ribs+→ exact shared-edge one-body B-rep+→ evidence and face-associated AP242 notes+→ rational-free STEP+```++## Product construction++The product path builds no mesh, feature solid, or arbitrary Boolean. The planar cavity floor contains exact footprint loops. Annular standoff cylinders and rib faces reuse those boundary edges, so there are no retained internal or coincident interface faces.++The flagship contains:++- four analytic annular standoffs, `7 mm` outer diameter, `3 mm` core hole, and `8 mm` height;+- three selected fan ribs, each exactly `2.2 mm` thick from base to top and `5 mm` high;+- two planar side faces and one flat planar top per rib;+- exact chord-to-cylinder rib/standoff junctions;+- the original analytic inner/outer cone, bottom, and rim supports.++The protected-exterior pre/post fingerprints remain equal at `5ab4561aee043362815686e09b457c1768244112cd9748005c56519522491512`; recorded maximum deviation is `0 mm`.++## Draft qualification++Constant-width vertical walls and positive release draft are geometrically incompatible: adding draft tapers the horizontal section. X0a follows the requested constant-section geometry and reports ribs and annular standoffs at `0°` release draft. A positive-draft model emits the warning `plastic-shell-constant-section-feature-zero-draft`; it is never presented as passing the requested `3°`.++The additions are +Z single-valued with no reverse undercut or side action in this bounded classification. That does not remove the molding-process decision created by zero release draft.++## AutoRib and junctions++With the canonical `ThicknessRatio: 1.0`, the gate-oriented fan remains the semantic winner:++| Candidate | Eligible | Utility | Length |+| --- | ---: | ---: | ---: |+| perimeter-network | yes | `0.6602834811` | `200 mm` |+| gate-oriented-fan | yes | `0.6739452689` | `170.710678 mm` |++The selected edges are `PcbC→PcbA`, `PcbC→PcbB`, and `PcbC→PcbD`. Each junction has accumulation proxy `1.0`:++```text+max(standoff radial wall, rib thickness) / nominal shell wall+```++This is a bounded thick-section check, not sink, cooling, shrinkage, warpage, or moldflow analysis.++## Reimported product artifact++Real CLI build and STEP reinspection report:++- one body and one closed shell;+- `enclosed-manifold` structural assessment;+- 36 faces, 58 edges, and 40 vertices;+- 20 planes, 14 cylinders, and 2 cones;+- no B-spline or rational product surfaces;+- four distinct standoff face associations and one distinct AutoRib face association;+- bounds `[-57,-57,0] .. [57,57,20] mm`.++Artifact: `artifacts/local/mold-x0a/mold-x0a-materialized-enclosure.step`+SHA-256: `060f2316429a60e648b840c98f068bf60df492b420fe179f6ee4cd826ce5153c`++## Happy little accident++The old faceted generator now has exactly one explicit route:++```powershell+dotnet run --project Aetheris.CLI -- experimental heightfield-art fixtures/Canonical/PlasticShell/plastic-shell-enclosure.firmament --out artifacts/local/heightfield-art/happy-little-accident.step --json+```++It exports 9,124 faces and carries the AP242 annotation `height-field-art:happy-little-accident` targeting `NonManufacturingArtwork`, with text stating that it is not manufacturable CAD or a PlasticShell product definition. Normal `build` never invokes it.++Art artifact: `artifacts/local/heightfield-art/happy-little-accident.step`+SHA-256: `ecf965ee2858c3d06f89177a695a4e63a90b2268f5156e0f54dd008a26ec2b3f`++## Remaining bounded limits++X0a still supports only the admitted analytic frustum and simple non-overlapping selected rib graphs. It does not provide general freeform shell offsets, arbitrary Boolean grafting, smooth fillets, mold blocks, side actions, moldflow, or automatic ejector relocation.diff --git a/fixtures/Canonical/PlasticShell/README.md b/fixtures/Canonical/PlasticShell/README.mdnew file mode 100644index 00000000..51313876--- /dev/null+++ b/fixtures/Canonical/PlasticShell/README.md@@ -0,0 +1,15 @@+# PlasticShell canonical fixtures++`plastic-shell-basic.firmament` is the minimal bounded analytic shell. `plastic-shell-enclosure.firmament` is the MOLD-X0/X0a flagship with an explicit gate, four physically materialized PCB standoffs, four ejector contacts, and two AutoRib candidates.++The focused X0a fixtures isolate a single standoff, a two-support rib, a three-support rib/standoff junction, the four-support AutoRib workflow, and the complete materialized enclosure. All lower through the same exact one-body B-rep materializer; none are manual Boss or Rib authoring examples.++Build the flagship through the real domain path:++```powershell+dotnet run --project Aetheris.CLI -- build fixtures/Canonical/PlasticShell/plastic-shell-enclosure.firmament --output artifacts/local/mold-x0a/mold-x0a-materialized-enclosure.step --json+```++X0a physically realizes the exact drafted shell, analytic annular standoffs, and constant-shell-thickness flat-top rib walls as one manifold body. Standoff and rib identities retain geometric face associations in AP242 and the evidence sidecar; ejectors and gates remain tooling/manufacturing semantics rather than extra product bodies. The vertical ribs truthfully report zero release draft.++The former polar height field is not a canonical product fixture. It survives only behind `aetheris experimental heightfield-art` as explicitly non-manufacturing mathematical art.diff --git a/fixtures/Canonical/PlasticShell/plastic-shell-autorib-materialized.firmament b/fixtures/Canonical/PlasticShell/plastic-shell-autorib-materialized.firmamentnew file mode 100644index 00000000..d245a41c--- /dev/null+++ b/fixtures/Canonical/PlasticShell/plastic-shell-autorib-materialized.firmament@@ -0,0 +1,16 @@+Model PlasticShellAutoRibMaterialized {+ Units: mm+ PlasticShell Housing {+ Exterior: Frustum BottomRadius: 50 mm TopRadius: 52 mm Height: 20 mm Material: ABS+ ToolingDirection: [0, 0, 1] MinimumDraftAngle: 3 deg Preserve: [ExteriorDesignSurface]+ WallPolicy { NominalThickness: 2.2 mm MinimumThickness: 2.1 mm MaximumThickness: 2.3 mm ThicknessTolerance: 0.05 mm }+ PartingPlane MainParting { Origin: [0, 0, 20] Normal: [0, 0, 1] }+ Gate RearGate { Kind: Edge Position: [0, 52, 20] Target: TopAnnularRim Size: 1 mm }+ Standoff A { Position: [-20, -20, 2.2] Height: 8 mm OuterDiameter: 7 mm HoleDiameter: 3 mm SupportIntent: Pcb }+ Standoff B { Position: [20, -20, 2.2] Height: 8 mm OuterDiameter: 7 mm HoleDiameter: 3 mm SupportIntent: Pcb }+ Standoff C { Position: [20, 20, 2.2] Height: 8 mm OuterDiameter: 7 mm HoleDiameter: 3 mm SupportIntent: Pcb }+ Standoff D { Position: [-20, 20, 2.2] Height: 8 mm OuterDiameter: 7 mm HoleDiameter: 3 mm SupportIntent: Pcb }+ EjectorPin E1 { Position: [0, -30, 2.2] Diameter: 3 mm Target: InnerBottom }+ AutoRib Support { Support: [A, B, C, D] Gate: RearGate KeepOut: [] RibPolicy { ThicknessRatio: 1.0 MinimumHeight: 3 mm MaximumHeight: 7 mm MinimumSpacing: 4 mm DraftAngle: 3 deg BaseBlendRadius: 0.8 mm } }+ }+}diff --git a/fixtures/Canonical/PlasticShell/plastic-shell-basic.firmament b/fixtures/Canonical/PlasticShell/plastic-shell-basic.firmamentnew file mode 100644index 00000000..2909eb21--- /dev/null+++ b/fixtures/Canonical/PlasticShell/plastic-shell-basic.firmament@@ -0,0 +1,17 @@+Model PlasticShellBasic {+ Units: mm+ PlasticShell Cup {+ Exterior: Frustum+ BottomRadius: 30 mm+ TopRadius: 31.5 mm+ Height: 15 mm+ Material: ABS+ ToolingDirection: [0, 0, 1]+ MinimumDraftAngle: 3 deg+ Preserve: [ExteriorDesignSurface]+ WallPolicy { NominalThickness: 2 mm MinimumThickness: 1.9 mm MaximumThickness: 2.1 mm ThicknessTolerance: 0.05 mm }+ PartingPlane MainParting { Origin: [0, 0, 15] Normal: [0, 0, 1] }+ Gate RearGate { Kind: Point Position: [0, 31.5, 15] Target: TopAnnularRim Size: 1 mm }+ EjectorPin CenterPin { Position: [0, 0, 2] Diameter: 3 mm Target: InnerBottom }+ }+}diff --git a/fixtures/Canonical/PlasticShell/plastic-shell-enclosure.firmament b/fixtures/Canonical/PlasticShell/plastic-shell-enclosure.firmamentnew file mode 100644index 00000000..c417be99--- /dev/null+++ b/fixtures/Canonical/PlasticShell/plastic-shell-enclosure.firmament@@ -0,0 +1,30 @@+Model MoldX0ElectronicsEnclosureHalf {+ Units: mm+ PlasticShell EnclosureHalf {+ Exterior: Frustum+ BottomRadius: 55 mm+ TopRadius: 57 mm+ Height: 20 mm+ Material: ABS+ ToolingDirection: [0, 0, 1]+ MinimumDraftAngle: 3 deg+ Preserve: [ExteriorDesignSurface, MountingInterface]+ WallPolicy { NominalThickness: 2.2 mm MinimumThickness: 2.1 mm MaximumThickness: 2.3 mm ThicknessTolerance: 0.05 mm }+ PartingPlane MainParting { Origin: [0, 0, 20] Normal: [0, 0, 1] }+ Gate MainGate { Kind: Edge Position: [0, 57, 20] Target: TopAnnularRim Size: 1.2 mm }+ Standoff PcbA { Position: [-25, -25, 2.2] Height: 8 mm OuterDiameter: 7 mm HoleDiameter: 3 mm SupportIntent: Pcb }+ Standoff PcbB { Position: [25, -25, 2.2] Height: 8 mm OuterDiameter: 7 mm HoleDiameter: 3 mm SupportIntent: Pcb }+ Standoff PcbC { Position: [25, 25, 2.2] Height: 8 mm OuterDiameter: 7 mm HoleDiameter: 3 mm SupportIntent: Pcb }+ Standoff PcbD { Position: [-25, 25, 2.2] Height: 8 mm OuterDiameter: 7 mm HoleDiameter: 3 mm SupportIntent: Pcb }+ EjectorPin E1 { Position: [-12, 0, 2.2] Diameter: 4 mm Target: InnerBottom }+ EjectorPin E2 { Position: [12, 0, 2.2] Diameter: 4 mm Target: InnerBottom }+ EjectorPin E3 { Position: [0, -12, 2.2] Diameter: 4 mm Target: InnerBottom }+ EjectorPin E4 { Position: [0, 12, 2.2] Diameter: 4 mm Target: InnerBottom }+ AutoRib PcbSupportNetwork {+ Support: [PcbA, PcbB, PcbC, PcbD]+ Gate: MainGate+ KeepOut: []+ RibPolicy { ThicknessRatio: 1.0 MinimumHeight: 3 mm MaximumHeight: 7 mm MinimumSpacing: 4 mm DraftAngle: 3 deg BaseBlendRadius: 0.8 mm }+ }+ }+}diff --git a/fixtures/Canonical/PlasticShell/plastic-shell-enclosure.step b/fixtures/Canonical/PlasticShell/plastic-shell-enclosure.stepnew file mode 100644index 00000000..a2e58da0--- /dev/null+++ b/fixtures/Canonical/PlasticShell/plastic-shell-enclosure.step@@ -0,0 +1,940 @@+ISO-10303-21;+HEADER;+FILE_DESCRIPTION(('Aetheris AP242 subset export'),'2;1');+FILE_NAME('aetheris_export.step','1970-01-01T00:00:00',('Aetheris'),('Aetheris'),'Aetheris.Kernel','Aetheris.Kernel','');+FILE_SCHEMA(('AP242_MANAGED_MODEL_BASED_3D_ENGINEERING_MIM_LF'));+ENDSEC;+DATA;+#1=CARTESIAN_POINT($,(0,0,-550));+#2=DIRECTION($,(0,0,1));+#3=DIRECTION($,(1,0,0));+#4=AXIS2_PLACEMENT_3D($,#1,#2,#3);+#5=CONICAL_SURFACE($,#4,0,0.0996686524912);+#6=CARTESIAN_POINT($,(55,0,0));+#7=VERTEX_POINT($,#6);+#8=CARTESIAN_POINT($,(0,0,0));+#9=DIRECTION($,(0,0,1));+#10=DIRECTION($,(1,0,0));+#11=AXIS2_PLACEMENT_3D($,#8,#9,#10);+#12=CIRCLE($,#11,55);+#13=EDGE_CURVE($,#7,#7,#12,.T.);+#14=ORIENTED_EDGE($,$,$,#13,.T.);+#15=EDGE_LOOP($,(#14));+#16=FACE_OUTER_BOUND('',#15,.T.);+#17=CARTESIAN_POINT($,(57,0,20));+#18=VERTEX_POINT($,#17);+#19=CARTESIAN_POINT($,(0,0,20));+#20=DIRECTION($,(0,0,1));+#21=DIRECTION($,(1,0,0));+#22=AXIS2_PLACEMENT_3D($,#19,#20,#21);+#23=CIRCLE($,#22,57);+#24=EDGE_CURVE($,#18,#18,#23,.T.);+#25=ORIENTED_EDGE($,$,$,#24,.F.);+#26=EDGE_LOOP($,(#25));+#27=FACE_BOUND('',#26,.T.);+#28=ADVANCED_FACE('',(#16,#27),#5,.T.);+#29=CARTESIAN_POINT($,(0,0,-527.890273633534));+#30=DIRECTION($,(0,0,1));+#31=DIRECTION($,(1,0,0));+#32=AXIS2_PLACEMENT_3D($,#29,#30,#31);+#33=CONICAL_SURFACE($,#32,0,0.0996686524912);+#34=CARTESIAN_POINT($,(53.0090273633534,0,2.2));+#35=VERTEX_POINT($,#34);+#36=CARTESIAN_POINT($,(0,0,2.2));+#37=DIRECTION($,(0,0,1));+#38=DIRECTION($,(1,0,0));+#39=AXIS2_PLACEMENT_3D($,#36,#37,#38);+#40=CIRCLE($,#39,53.0090273633534);+#41=EDGE_CURVE($,#35,#35,#40,.T.);+#42=ORIENTED_EDGE($,$,$,#41,.T.);+#43=EDGE_LOOP($,(#42));+#44=FACE_OUTER_BOUND('',#43,.T.);+#45=CARTESIAN_POINT($,(54.7890273633534,0,20));+#46=VERTEX_POINT($,#45);+#47=CARTESIAN_POINT($,(0,0,20));+#48=DIRECTION($,(0,0,1));+#49=DIRECTION($,(1,0,0));+#50=AXIS2_PLACEMENT_3D($,#47,#48,#49);+#51=CIRCLE($,#50,54.7890273633534);+#52=EDGE_CURVE($,#46,#46,#51,.T.);+#53=ORIENTED_EDGE($,$,$,#52,.F.);+#54=EDGE_LOOP($,(#53));+#55=FACE_BOUND('',#54,.T.);+#56=ADVANCED_FACE('',(#44,#55),#33,.F.);+#57=CARTESIAN_POINT($,(0,0,0));+#58=DIRECTION($,(0,0,-1));+#59=DIRECTION($,(1,0,0));+#60=AXIS2_PLACEMENT_3D($,#57,#58,#59);+#61=PLANE($,#60);+#62=ORIENTED_EDGE($,$,$,#13,.F.);+#63=EDGE_LOOP($,(#62));+#64=FACE_OUTER_BOUND('',#63,.T.);+#65=ADVANCED_FACE('',(#64),#61,.T.);+#66=CARTESIAN_POINT($,(0,0,20));+#67=DIRECTION($,(0,0,1));+#68=DIRECTION($,(1,0,0));+#69=AXIS2_PLACEMENT_3D($,#66,#67,#68);+#70=PLANE($,#69);+#71=ORIENTED_EDGE($,$,$,#24,.T.);+#72=EDGE_LOOP($,(#71));+#73=FACE_OUTER_BOUND('',#72,.T.);+#74=ORIENTED_EDGE($,$,$,#52,.F.);+#75=EDGE_LOOP($,(#74));+#76=FACE_BOUND('',#75,.T.);+#77=ADVANCED_FACE('',(#73,#76),#70,.T.);+#78=CARTESIAN_POINT($,(0,0,2.2));+#79=DIRECTION($,(0,0,1));+#80=DIRECTION($,(1,0,0));+#81=AXIS2_PLACEMENT_3D($,#78,#79,#80);+#82=PLANE($,#81);+#83=ORIENTED_EDGE($,$,$,#41,.T.);+#84=EDGE_LOOP($,(#83));+#85=FACE_OUTER_BOUND('',#84,.T.);+#86=CARTESIAN_POINT($,(21.8727145158007,23.4283494344111,2.2));+#87=VERTEX_POINT($,#86);+#88=CARTESIAN_POINT($,(-23.4283494344111,-21.8727145158007,2.2));+#89=VERTEX_POINT($,#88);+#90=CARTESIAN_POINT($,(21.8727145158007,23.4283494344111,2.2));+#91=DIRECTION($,(-0.7071067811865,-0.7071067811865,0));+#92=VECTOR($,#91,1);+#93=LINE($,#90,#92);+#94=EDGE_CURVE($,#87,#89,#93,.T.);+#95=ORIENTED_EDGE($,$,$,#94,.F.);+#96=CARTESIAN_POINT($,(21.6773504548328,23.9,2.2));+#97=VERTEX_POINT($,#96);+#98=CARTESIAN_POINT($,(25,25,2.2));+#99=DIRECTION($,(0,0,1));+#100=DIRECTION($,(-0.9493284414764,-0.3142857142857,0));+#101=AXIS2_PLACEMENT_3D($,#98,#99,#100);+#102=CIRCLE($,#101,3.5);+#103=TRIMMED_CURVE($,#102,(PARAMETER_VALUE(0)),(PARAMETER_VALUE(0.145989866072)),.T.,.PARAMETER.);+#104=EDGE_CURVE($,#97,#87,#103,.T.);+#105=ORIENTED_EDGE($,$,$,#104,.F.);+#106=CARTESIAN_POINT($,(-21.6773504548328,23.9,2.2));+#107=VERTEX_POINT($,#106);+#108=CARTESIAN_POINT($,(21.6773504548328,23.9,2.2));+#109=DIRECTION($,(-1,0,0));+#110=VECTOR($,#109,1);+#111=LINE($,#108,#110);+#112=EDGE_CURVE($,#97,#107,#111,.T.);+#113=ORIENTED_EDGE($,$,$,#112,.T.);+#114=CARTESIAN_POINT($,(-21.6773504548328,26.1,2.2));+#115=VERTEX_POINT($,#114);+#116=CARTESIAN_POINT($,(-25,25,2.2));+#117=DIRECTION($,(0,0,1));+#118=DIRECTION($,(0.9493284414764,0.3142857142857,0));+#119=AXIS2_PLACEMENT_3D($,#116,#117,#118);+#120=CIRCLE($,#119,3.5);+#121=TRIMMED_CURVE($,#120,(PARAMETER_VALUE(0)),(PARAMETER_VALUE(5.6437770098541)),.T.,.PARAMETER.);+#122=EDGE_CURVE($,#115,#107,#121,.T.);+#123=ORIENTED_EDGE($,$,$,#122,.F.);+#124=CARTESIAN_POINT($,(21.6773504548328,26.1,2.2));+#125=VERTEX_POINT($,#124);+#126=CARTESIAN_POINT($,(21.6773504548328,26.1,2.2));+#127=DIRECTION($,(-1,0,0));+#128=VECTOR($,#127,1);+#129=LINE($,#126,#128);+#130=EDGE_CURVE($,#125,#115,#129,.T.);+#131=ORIENTED_EDGE($,$,$,#130,.F.);+#132=CARTESIAN_POINT($,(26.1,21.6773504548328,2.2));+#133=VERTEX_POINT($,#132);+#134=CARTESIAN_POINT($,(25,25,2.2));+#135=DIRECTION($,(0,0,1));+#136=DIRECTION($,(0.3142857142857,-0.9493284414764,0));+#137=AXIS2_PLACEMENT_3D($,#134,#135,#136);+#138=CIRCLE($,#137,3.5);+#139=TRIMMED_CURVE($,#138,(PARAMETER_VALUE(0)),(PARAMETER_VALUE(4.0729806830592)),.T.,.PARAMETER.);+#140=EDGE_CURVE($,#133,#125,#139,.T.);+#141=ORIENTED_EDGE($,$,$,#140,.F.);+#142=CARTESIAN_POINT($,(26.1,-21.6773504548328,2.2));+#143=VERTEX_POINT($,#142);+#144=CARTESIAN_POINT($,(26.1,21.6773504548328,2.2));+#145=DIRECTION($,(0,-1,0));+#146=VECTOR($,#145,1);+#147=LINE($,#144,#146);+#148=EDGE_CURVE($,#133,#143,#147,.T.);+#149=ORIENTED_EDGE($,$,$,#148,.T.);+#150=CARTESIAN_POINT($,(23.9,-21.6773504548328,2.2));+#151=VERTEX_POINT($,#150);+#152=CARTESIAN_POINT($,(25,-25,2.2));+#153=DIRECTION($,(0,0,1));+#154=DIRECTION($,(-0.3142857142857,0.9493284414764,0));+#155=AXIS2_PLACEMENT_3D($,#152,#153,#154);+#156=CIRCLE($,#155,3.5);+#157=TRIMMED_CURVE($,#156,(PARAMETER_VALUE(0)),(PARAMETER_VALUE(5.6437770098541)),.T.,.PARAMETER.);+#158=EDGE_CURVE($,#151,#143,#157,.T.);+#159=ORIENTED_EDGE($,$,$,#158,.F.);+#160=CARTESIAN_POINT($,(23.9,21.6773504548328,2.2));+#161=VERTEX_POINT($,#160);+#162=CARTESIAN_POINT($,(23.9,21.6773504548328,2.2));+#163=DIRECTION($,(0,-1,0));+#164=VECTOR($,#163,1);+#165=LINE($,#162,#164);+#166=EDGE_CURVE($,#161,#151,#165,.T.);+#167=ORIENTED_EDGE($,$,$,#166,.F.);+#168=CARTESIAN_POINT($,(23.4283494344111,21.8727145158007,2.2));+#169=VERTEX_POINT($,#168);+#170=CARTESIAN_POINT($,(25,25,2.2));+#171=DIRECTION($,(0,0,1));+#172=DIRECTION($,(-0.4490430187397,-0.8935101383427,0));+#173=AXIS2_PLACEMENT_3D($,#170,#171,#172);+#174=CIRCLE($,#173,3.5);+#175=TRIMMED_CURVE($,#174,(PARAMETER_VALUE(0)),(PARAMETER_VALUE(0.145989866072)),.T.,.PARAMETER.);+#176=EDGE_CURVE($,#169,#161,#175,.T.);+#177=ORIENTED_EDGE($,$,$,#176,.F.);+#178=CARTESIAN_POINT($,(-21.8727145158007,-23.4283494344111,2.2));+#179=VERTEX_POINT($,#178);+#180=CARTESIAN_POINT($,(23.4283494344111,21.8727145158007,2.2));+#181=DIRECTION($,(-0.7071067811865,-0.7071067811865,0));+#182=VECTOR($,#181,1);+#183=LINE($,#180,#182);+#184=EDGE_CURVE($,#169,#179,#183,.T.);+#185=ORIENTED_EDGE($,$,$,#184,.T.);+#186=CARTESIAN_POINT($,(-25,-25,2.2));+#187=DIRECTION($,(0,0,1));+#188=DIRECTION($,(0.4490430187397,0.8935101383427,0));+#189=AXIS2_PLACEMENT_3D($,#186,#187,#188);+#190=CIRCLE($,#189,3.5);+#191=TRIMMED_CURVE($,#190,(PARAMETER_VALUE(0)),(PARAMETER_VALUE(5.6437770098541)),.T.,.PARAMETER.);+#192=EDGE_CURVE($,#89,#179,#191,.T.);+#193=ORIENTED_EDGE($,$,$,#192,.F.);+#194=EDGE_LOOP($,(#95,#105,#113,#123,#131,#141,#149,#159,#167,#177,#185,#193));+#195=FACE_BOUND('',#194,.T.);+#196=ADVANCED_FACE('',(#85,#195),#82,.T.);+#197=CARTESIAN_POINT($,(-25,-25,2.2));+#198=DIRECTION($,(0,0,1));+#199=DIRECTION($,(1,0,0));+#200=AXIS2_PLACEMENT_3D($,#197,#198,#199);+#201=CYLINDRICAL_SURFACE($,#200,3.5);+#202=ORIENTED_EDGE($,$,$,#192,.T.);+#203=CARTESIAN_POINT($,(-21.8727145158007,-23.4283494344111,7.2));+#204=VERTEX_POINT($,#203);+#205=CARTESIAN_POINT($,(-21.8727145158007,-23.4283494344111,2.2));+#206=DIRECTION($,(0,0,1));+#207=VECTOR($,#206,1);+#208=LINE($,#205,#207);+#209=EDGE_CURVE($,#179,#204,#208,.T.);+#210=ORIENTED_EDGE($,$,$,#209,.T.);+#211=CARTESIAN_POINT($,(-23.4283494344111,-21.8727145158007,7.2));+#212=VERTEX_POINT($,#211);+#213=CARTESIAN_POINT($,(-25,-25,7.2));+#214=DIRECTION($,(0,0,1));+#215=DIRECTION($,(0.4490430187397,0.8935101383427,0));+#216=AXIS2_PLACEMENT_3D($,#213,#214,#215);+#217=CIRCLE($,#216,3.5);+#218=TRIMMED_CURVE($,#217,(PARAMETER_VALUE(0)),(PARAMETER_VALUE(5.6437770098541)),.T.,.PARAMETER.);+#219=EDGE_CURVE($,#212,#204,#218,.T.);+#220=ORIENTED_EDGE($,$,$,#219,.F.);+#221=CARTESIAN_POINT($,(-23.4283494344111,-21.8727145158007,2.2));+#222=DIRECTION($,(0,0,1));+#223=VECTOR($,#222,1);+#224=LINE($,#221,#223);+#225=EDGE_CURVE($,#89,#212,#224,.T.);+#226=ORIENTED_EDGE($,$,$,#225,.F.);+#227=EDGE_LOOP($,(#202,#210,#220,#226));+#228=FACE_OUTER_BOUND('',#227,.T.);+#229=ADVANCED_FACE('',(#228),#201,.T.);+#230=CARTESIAN_POINT($,(-25,-25,2.2));+#231=DIRECTION($,(0,0,1));+#232=DIRECTION($,(1,0,0));+#233=AXIS2_PLACEMENT_3D($,#230,#231,#232);+#234=CYLINDRICAL_SURFACE($,#233,3.5);+#235=ORIENTED_EDGE($,$,$,#219,.T.);+#236=CARTESIAN_POINT($,(-25,-25,7.2));+#237=DIRECTION($,(0,0,1));+#238=DIRECTION($,(0.8935101383427,0.4490430187397,0));+#239=AXIS2_PLACEMENT_3D($,#236,#237,#238);+#240=CIRCLE($,#239,3.5);+#241=TRIMMED_CURVE($,#240,(PARAMETER_VALUE(0)),(PARAMETER_VALUE(0.6394082973255)),.T.,.PARAMETER.);+#242=EDGE_CURVE($,#204,#212,#241,.T.);+#243=ORIENTED_EDGE($,$,$,#242,.T.);+#244=EDGE_LOOP($,(#235,#243));+#245=FACE_OUTER_BOUND('',#244,.T.);+#246=CARTESIAN_POINT($,(-21.5,-25,10.2));+#247=VERTEX_POINT($,#246);+#248=CARTESIAN_POINT($,(-25,-25,10.2));+#249=DIRECTION($,(0,0,1));+#250=DIRECTION($,(1,0,0));+#251=AXIS2_PLACEMENT_3D($,#248,#249,#250);+#252=CIRCLE($,#251,3.5);+#253=EDGE_CURVE($,#247,#247,#252,.T.);+#254=ORIENTED_EDGE($,$,$,#253,.F.);+#255=EDGE_LOOP($,(#254));+#256=FACE_BOUND('',#255,.T.);+#257=ADVANCED_FACE('',(#245,#256),#234,.T.);+#258=CARTESIAN_POINT($,(-25,-25,2.2));+#259=DIRECTION($,(0,0,1));+#260=DIRECTION($,(1,0,0));+#261=AXIS2_PLACEMENT_3D($,#258,#259,#260);+#262=CYLINDRICAL_SURFACE($,#261,1.5);+#263=CARTESIAN_POINT($,(-23.5,-25,2.2));+#264=VERTEX_POINT($,#263);+#265=CARTESIAN_POINT($,(-25,-25,2.2));+#266=DIRECTION($,(0,0,1));+#267=DIRECTION($,(1,0,0));+#268=AXIS2_PLACEMENT_3D($,#265,#266,#267);+#269=CIRCLE($,#268,1.5);+#270=EDGE_CURVE($,#264,#264,#269,.T.);+#271=ORIENTED_EDGE($,$,$,#270,.T.);+#272=EDGE_LOOP($,(#271));+#273=FACE_OUTER_BOUND('',#272,.T.);+#274=CARTESIAN_POINT($,(-23.5,-25,10.2));+#275=VERTEX_POINT($,#274);+#276=CARTESIAN_POINT($,(-25,-25,10.2));+#277=DIRECTION($,(0,0,1));+#278=DIRECTION($,(1,0,0));+#279=AXIS2_PLACEMENT_3D($,#276,#277,#278);+#280=CIRCLE($,#279,1.5);+#281=EDGE_CURVE($,#275,#275,#280,.T.);+#282=ORIENTED_EDGE($,$,$,#281,.F.);+#283=EDGE_LOOP($,(#282));+#284=FACE_BOUND('',#283,.T.);+#285=ADVANCED_FACE('',(#273,#284),#262,.F.);+#286=CARTESIAN_POINT($,(-25,-25,10.2));+#287=DIRECTION($,(0,0,1));+#288=DIRECTION($,(1,0,0));+#289=AXIS2_PLACEMENT_3D($,#286,#287,#288);+#290=PLANE($,#289);+#291=ORIENTED_EDGE($,$,$,#253,.T.);+#292=EDGE_LOOP($,(#291));+#293=FACE_OUTER_BOUND('',#292,.T.);+#294=ORIENTED_EDGE($,$,$,#281,.F.);+#295=EDGE_LOOP($,(#294));+#296=FACE_BOUND('',#295,.T.);+#297=ADVANCED_FACE('',(#293,#296),#290,.T.);+#298=CARTESIAN_POINT($,(-25,-25,2.2));+#299=DIRECTION($,(0,0,1));+#300=DIRECTION($,(1,0,0));+#301=AXIS2_PLACEMENT_3D($,#298,#299,#300);+#302=PLANE($,#301);+#303=ORIENTED_EDGE($,$,$,#270,.T.);+#304=EDGE_LOOP($,(#303));+#305=FACE_OUTER_BOUND('',#304,.T.);+#306=ADVANCED_FACE('',(#305),#302,.T.);+#307=CARTESIAN_POINT($,(25,-25,2.2));+#308=DIRECTION($,(0,0,1));+#309=DIRECTION($,(1,0,0));+#310=AXIS2_PLACEMENT_3D($,#307,#308,#309);+#311=CYLINDRICAL_SURFACE($,#310,3.5);+#312=ORIENTED_EDGE($,$,$,#158,.T.);+#313=CARTESIAN_POINT($,(26.1,-21.6773504548328,7.2));+#314=VERTEX_POINT($,#313);+#315=CARTESIAN_POINT($,(26.1,-21.6773504548328,2.2));+#316=DIRECTION($,(0,0,1));+#317=VECTOR($,#316,1);+#318=LINE($,#315,#317);+#319=EDGE_CURVE($,#143,#314,#318,.T.);+#320=ORIENTED_EDGE($,$,$,#319,.T.);+#321=CARTESIAN_POINT($,(23.9,-21.6773504548328,7.2));+#322=VERTEX_POINT($,#321);+#323=CARTESIAN_POINT($,(25,-25,7.2));+#324=DIRECTION($,(0,0,1));+#325=DIRECTION($,(-0.3142857142857,0.9493284414764,0));+#326=AXIS2_PLACEMENT_3D($,#323,#324,#325);+#327=CIRCLE($,#326,3.5);+#328=TRIMMED_CURVE($,#327,(PARAMETER_VALUE(0)),(PARAMETER_VALUE(5.6437770098541)),.T.,.PARAMETER.);+#329=EDGE_CURVE($,#322,#314,#328,.T.);+#330=ORIENTED_EDGE($,$,$,#329,.F.);+#331=CARTESIAN_POINT($,(23.9,-21.6773504548328,2.2));+#332=DIRECTION($,(0,0,1));+#333=VECTOR($,#332,1);+#334=LINE($,#331,#333);+#335=EDGE_CURVE($,#151,#322,#334,.T.);+#336=ORIENTED_EDGE($,$,$,#335,.F.);+#337=EDGE_LOOP($,(#312,#320,#330,#336));+#338=FACE_OUTER_BOUND('',#337,.T.);+#339=ADVANCED_FACE('',(#338),#311,.T.);+#340=CARTESIAN_POINT($,(25,-25,2.2));+#341=DIRECTION($,(0,0,1));+#342=DIRECTION($,(1,0,0));+#343=AXIS2_PLACEMENT_3D($,#340,#341,#342);+#344=CYLINDRICAL_SURFACE($,#343,3.5);+#345=ORIENTED_EDGE($,$,$,#329,.T.);+#346=CARTESIAN_POINT($,(25,-25,7.2));+#347=DIRECTION($,(0,0,1));+#348=DIRECTION($,(0.3142857142857,0.9493284414764,0));+#349=AXIS2_PLACEMENT_3D($,#346,#347,#348);+#350=CIRCLE($,#349,3.5);+#351=TRIMMED_CURVE($,#350,(PARAMETER_VALUE(0)),(PARAMETER_VALUE(0.6394082973255)),.T.,.PARAMETER.);+#352=EDGE_CURVE($,#314,#322,#351,.T.);+#353=ORIENTED_EDGE($,$,$,#352,.T.);+#354=EDGE_LOOP($,(#345,#353));+#355=FACE_OUTER_BOUND('',#354,.T.);+#356=CARTESIAN_POINT($,(28.5,-25,10.2));+#357=VERTEX_POINT($,#356);+#358=CARTESIAN_POINT($,(25,-25,10.2));+#359=DIRECTION($,(0,0,1));+#360=DIRECTION($,(1,0,0));+#361=AXIS2_PLACEMENT_3D($,#358,#359,#360);+#362=CIRCLE($,#361,3.5);+#363=EDGE_CURVE($,#357,#357,#362,.T.);+#364=ORIENTED_EDGE($,$,$,#363,.F.);+#365=EDGE_LOOP($,(#364));+#366=FACE_BOUND('',#365,.T.);+#367=ADVANCED_FACE('',(#355,#366),#344,.T.);+#368=CARTESIAN_POINT($,(25,-25,2.2));+#369=DIRECTION($,(0,0,1));+#370=DIRECTION($,(1,0,0));+#371=AXIS2_PLACEMENT_3D($,#368,#369,#370);+#372=CYLINDRICAL_SURFACE($,#371,1.5);+#373=CARTESIAN_POINT($,(26.5,-25,2.2));+#374=VERTEX_POINT($,#373);+#375=CARTESIAN_POINT($,(25,-25,2.2));+#376=DIRECTION($,(0,0,1));+#377=DIRECTION($,(1,0,0));+#378=AXIS2_PLACEMENT_3D($,#375,#376,#377);+#379=CIRCLE($,#378,1.5);+#380=EDGE_CURVE($,#374,#374,#379,.T.);+#381=ORIENTED_EDGE($,$,$,#380,.T.);+#382=EDGE_LOOP($,(#381));+#383=FACE_OUTER_BOUND('',#382,.T.);+#384=CARTESIAN_POINT($,(26.5,-25,10.2));+#385=VERTEX_POINT($,#384);+#386=CARTESIAN_POINT($,(25,-25,10.2));+#387=DIRECTION($,(0,0,1));+#388=DIRECTION($,(1,0,0));+#389=AXIS2_PLACEMENT_3D($,#386,#387,#388);+#390=CIRCLE($,#389,1.5);+#391=EDGE_CURVE($,#385,#385,#390,.T.);+#392=ORIENTED_EDGE($,$,$,#391,.F.);+#393=EDGE_LOOP($,(#392));+#394=FACE_BOUND('',#393,.T.);+#395=ADVANCED_FACE('',(#383,#394),#372,.F.);+#396=CARTESIAN_POINT($,(25,-25,10.2));+#397=DIRECTION($,(0,0,1));+#398=DIRECTION($,(1,0,0));+#399=AXIS2_PLACEMENT_3D($,#396,#397,#398);+#400=PLANE($,#399);+#401=ORIENTED_EDGE($,$,$,#363,.T.);+#402=EDGE_LOOP($,(#401));+#403=FACE_OUTER_BOUND('',#402,.T.);+#404=ORIENTED_EDGE($,$,$,#391,.F.);+#405=EDGE_LOOP($,(#404));+#406=FACE_BOUND('',#405,.T.);+#407=ADVANCED_FACE('',(#403,#406),#400,.T.);+#408=CARTESIAN_POINT($,(25,-25,2.2));+#409=DIRECTION($,(0,0,1));+#410=DIRECTION($,(1,0,0));+#411=AXIS2_PLACEMENT_3D($,#408,#409,#410);+#412=PLANE($,#411);+#413=ORIENTED_EDGE($,$,$,#380,.T.);+#414=EDGE_LOOP($,(#413));+#415=FACE_OUTER_BOUND('',#414,.T.);+#416=ADVANCED_FACE('',(#415),#412,.T.);+#417=CARTESIAN_POINT($,(25,25,2.2));+#418=DIRECTION($,(0,0,1));+#419=DIRECTION($,(1,0,0));+#420=AXIS2_PLACEMENT_3D($,#417,#418,#419);+#421=CYLINDRICAL_SURFACE($,#420,3.5);+#422=ORIENTED_EDGE($,$,$,#104,.T.);+#423=CARTESIAN_POINT($,(21.8727145158007,23.4283494344111,7.2));+#424=VERTEX_POINT($,#423);+#425=CARTESIAN_POINT($,(21.8727145158007,23.4283494344111,2.2));+#426=DIRECTION($,(0,0,1));+#427=VECTOR($,#426,1);+#428=LINE($,#425,#427);+#429=EDGE_CURVE($,#87,#424,#428,.T.);+#430=ORIENTED_EDGE($,$,$,#429,.T.);+#431=CARTESIAN_POINT($,(21.6773504548328,23.9,7.2));+#432=VERTEX_POINT($,#431);+#433=CARTESIAN_POINT($,(25,25,7.2));+#434=DIRECTION($,(0,0,1));+#435=DIRECTION($,(-0.9493284414764,-0.3142857142857,0));+#436=AXIS2_PLACEMENT_3D($,#433,#434,#435);+#437=CIRCLE($,#436,3.5);+#438=TRIMMED_CURVE($,#437,(PARAMETER_VALUE(0)),(PARAMETER_VALUE(0.145989866072)),.T.,.PARAMETER.);+#439=EDGE_CURVE($,#432,#424,#438,.T.);+#440=ORIENTED_EDGE($,$,$,#439,.F.);+#441=CARTESIAN_POINT($,(21.6773504548328,23.9,2.2));+#442=DIRECTION($,(0,0,1));+#443=VECTOR($,#442,1);+#444=LINE($,#441,#443);+#445=EDGE_CURVE($,#97,#432,#444,.T.);+#446=ORIENTED_EDGE($,$,$,#445,.F.);+#447=EDGE_LOOP($,(#422,#430,#440,#446));+#448=FACE_OUTER_BOUND('',#447,.T.);+#449=ADVANCED_FACE('',(#448),#421,.T.);+#450=CARTESIAN_POINT($,(25,25,2.2));+#451=DIRECTION($,(0,0,1));+#452=DIRECTION($,(1,0,0));+#453=AXIS2_PLACEMENT_3D($,#450,#451,#452);+#454=CYLINDRICAL_SURFACE($,#453,3.5);+#455=ORIENTED_EDGE($,$,$,#176,.T.);+#456=CARTESIAN_POINT($,(23.9,21.6773504548328,7.2));+#457=VERTEX_POINT($,#456);+#458=CARTESIAN_POINT($,(23.9,21.6773504548328,2.2));+#459=DIRECTION($,(0,0,1));+#460=VECTOR($,#459,1);+#461=LINE($,#458,#460);+#462=EDGE_CURVE($,#161,#457,#461,.T.);+#463=ORIENTED_EDGE($,$,$,#462,.T.);+#464=CARTESIAN_POINT($,(23.4283494344111,21.8727145158007,7.2));+#465=VERTEX_POINT($,#464);+#466=CARTESIAN_POINT($,(25,25,7.2));+#467=DIRECTION($,(0,0,1));+#468=DIRECTION($,(-0.4490430187397,-0.8935101383427,0));+#469=AXIS2_PLACEMENT_3D($,#466,#467,#468);+#470=CIRCLE($,#469,3.5);+#471=TRIMMED_CURVE($,#470,(PARAMETER_VALUE(0)),(PARAMETER_VALUE(0.145989866072)),.T.,.PARAMETER.);+#472=EDGE_CURVE($,#465,#457,#471,.T.);+#473=ORIENTED_EDGE($,$,$,#472,.F.);+#474=CARTESIAN_POINT($,(23.4283494344111,21.8727145158007,2.2));+#475=DIRECTION($,(0,0,1));+#476=VECTOR($,#475,1);+#477=LINE($,#474,#476);+#478=EDGE_CURVE($,#169,#465,#477,.T.);+#479=ORIENTED_EDGE($,$,$,#478,.F.);+#480=EDGE_LOOP($,(#455,#463,#473,#479));+#481=FACE_OUTER_BOUND('',#480,.T.);+#482=ADVANCED_FACE('',(#481),#454,.T.);+#483=CARTESIAN_POINT($,(25,25,2.2));+#484=DIRECTION($,(0,0,1));+#485=DIRECTION($,(1,0,0));+#486=AXIS2_PLACEMENT_3D($,#483,#484,#485);+#487=CYLINDRICAL_SURFACE($,#486,3.5);+#488=ORIENTED_EDGE($,$,$,#140,.T.);+#489=CARTESIAN_POINT($,(21.6773504548328,26.1,7.2));+#490=VERTEX_POINT($,#489);+#491=CARTESIAN_POINT($,(21.6773504548328,26.1,2.2));+#492=DIRECTION($,(0,0,1));+#493=VECTOR($,#492,1);+#494=LINE($,#491,#493);+#495=EDGE_CURVE($,#125,#490,#494,.T.);+#496=ORIENTED_EDGE($,$,$,#495,.T.);+#497=CARTESIAN_POINT($,(26.1,21.6773504548328,7.2));+#498=VERTEX_POINT($,#497);+#499=CARTESIAN_POINT($,(25,25,7.2));+#500=DIRECTION($,(0,0,1));+#501=DIRECTION($,(0.3142857142857,-0.9493284414764,0));+#502=AXIS2_PLACEMENT_3D($,#499,#500,#501);+#503=CIRCLE($,#502,3.5);+#504=TRIMMED_CURVE($,#503,(PARAMETER_VALUE(0)),(PARAMETER_VALUE(4.0729806830592)),.T.,.PARAMETER.);+#505=EDGE_CURVE($,#498,#490,#504,.T.);+#506=ORIENTED_EDGE($,$,$,#505,.F.);+#507=CARTESIAN_POINT($,(26.1,21.6773504548328,2.2));+#508=DIRECTION($,(0,0,1));+#509=VECTOR($,#508,1);+#510=LINE($,#507,#509);+#511=EDGE_CURVE($,#133,#498,#510,.T.);+#512=ORIENTED_EDGE($,$,$,#511,.F.);+#513=EDGE_LOOP($,(#488,#496,#506,#512));+#514=FACE_OUTER_BOUND('',#513,.T.);+#515=ADVANCED_FACE('',(#514),#487,.T.);+#516=CARTESIAN_POINT($,(25,25,2.2));+#517=DIRECTION($,(0,0,1));+#518=DIRECTION($,(1,0,0));+#519=AXIS2_PLACEMENT_3D($,#516,#517,#518);+#520=CYLINDRICAL_SURFACE($,#519,3.5);+#521=ORIENTED_EDGE($,$,$,#439,.T.);+#522=CARTESIAN_POINT($,(25,25,7.2));+#523=DIRECTION($,(0,0,1));+#524=DIRECTION($,(-0.8935101383427,-0.4490430187397,0));+#525=AXIS2_PLACEMENT_3D($,#522,#523,#524);+#526=CIRCLE($,#525,3.5);+#527=TRIMMED_CURVE($,#526,(PARAMETER_VALUE(0)),(PARAMETER_VALUE(0.6394082973255)),.T.,.PARAMETER.);+#528=EDGE_CURVE($,#424,#465,#527,.T.);+#529=ORIENTED_EDGE($,$,$,#528,.T.);+#530=ORIENTED_EDGE($,$,$,#472,.T.);+#531=CARTESIAN_POINT($,(25,25,7.2));+#532=DIRECTION($,(0,0,1));+#533=DIRECTION($,(-0.3142857142857,-0.9493284414764,0));+#534=AXIS2_PLACEMENT_3D($,#531,#532,#533);+#535=CIRCLE($,#534,3.5);+#536=TRIMMED_CURVE($,#535,(PARAMETER_VALUE(0)),(PARAMETER_VALUE(0.6394082973255)),.T.,.PARAMETER.);+#537=EDGE_CURVE($,#457,#498,#536,.T.);+#538=ORIENTED_EDGE($,$,$,#537,.T.);+#539=ORIENTED_EDGE($,$,$,#505,.T.);+#540=CARTESIAN_POINT($,(25,25,7.2));+#541=DIRECTION($,(0,0,1));+#542=DIRECTION($,(-0.9493284414764,0.3142857142857,0));+#543=AXIS2_PLACEMENT_3D($,#540,#541,#542);+#544=CIRCLE($,#543,3.5);+#545=TRIMMED_CURVE($,#544,(PARAMETER_VALUE(0)),(PARAMETER_VALUE(0.6394082973255)),.T.,.PARAMETER.);+#546=EDGE_CURVE($,#490,#432,#545,.T.);+#547=ORIENTED_EDGE($,$,$,#546,.T.);+#548=EDGE_LOOP($,(#521,#529,#530,#538,#539,#547));+#549=FACE_OUTER_BOUND('',#548,.T.);+#550=CARTESIAN_POINT($,(28.5,25,10.2));+#551=VERTEX_POINT($,#550);+#552=CARTESIAN_POINT($,(25,25,10.2));+#553=DIRECTION($,(0,0,1));+#554=DIRECTION($,(1,0,0));+#555=AXIS2_PLACEMENT_3D($,#552,#553,#554);+#556=CIRCLE($,#555,3.5);+#557=EDGE_CURVE($,#551,#551,#556,.T.);+#558=ORIENTED_EDGE($,$,$,#557,.F.);+#559=EDGE_LOOP($,(#558));+#560=FACE_BOUND('',#559,.T.);+#561=ADVANCED_FACE('',(#549,#560),#520,.T.);+#562=CARTESIAN_POINT($,(25,25,2.2));+#563=DIRECTION($,(0,0,1));+#564=DIRECTION($,(1,0,0));+#565=AXIS2_PLACEMENT_3D($,#562,#563,#564);+#566=CYLINDRICAL_SURFACE($,#565,1.5);+#567=CARTESIAN_POINT($,(26.5,25,2.2));+#568=VERTEX_POINT($,#567);+#569=CARTESIAN_POINT($,(25,25,2.2));+#570=DIRECTION($,(0,0,1));+#571=DIRECTION($,(1,0,0));+#572=AXIS2_PLACEMENT_3D($,#569,#570,#571);+#573=CIRCLE($,#572,1.5);+#574=EDGE_CURVE($,#568,#568,#573,.T.);+#575=ORIENTED_EDGE($,$,$,#574,.T.);+#576=EDGE_LOOP($,(#575));+#577=FACE_OUTER_BOUND('',#576,.T.);+#578=CARTESIAN_POINT($,(26.5,25,10.2));+#579=VERTEX_POINT($,#578);+#580=CARTESIAN_POINT($,(25,25,10.2));+#581=DIRECTION($,(0,0,1));+#582=DIRECTION($,(1,0,0));+#583=AXIS2_PLACEMENT_3D($,#580,#581,#582);+#584=CIRCLE($,#583,1.5);+#585=EDGE_CURVE($,#579,#579,#584,.T.);+#586=ORIENTED_EDGE($,$,$,#585,.F.);+#587=EDGE_LOOP($,(#586));+#588=FACE_BOUND('',#587,.T.);+#589=ADVANCED_FACE('',(#577,#588),#566,.F.);+#590=CARTESIAN_POINT($,(25,25,10.2));+#591=DIRECTION($,(0,0,1));+#592=DIRECTION($,(1,0,0));+#593=AXIS2_PLACEMENT_3D($,#590,#591,#592);+#594=PLANE($,#593);+#595=ORIENTED_EDGE($,$,$,#557,.T.);+#596=EDGE_LOOP($,(#595));+#597=FACE_OUTER_BOUND('',#596,.T.);+#598=ORIENTED_EDGE($,$,$,#585,.F.);+#599=EDGE_LOOP($,(#598));+#600=FACE_BOUND('',#599,.T.);+#601=ADVANCED_FACE('',(#597,#600),#594,.T.);+#602=CARTESIAN_POINT($,(25,25,2.2));+#603=DIRECTION($,(0,0,1));+#604=DIRECTION($,(1,0,0));+#605=AXIS2_PLACEMENT_3D($,#602,#603,#604);+#606=PLANE($,#605);+#607=ORIENTED_EDGE($,$,$,#574,.T.);+#608=EDGE_LOOP($,(#607));+#609=FACE_OUTER_BOUND('',#608,.T.);+#610=ADVANCED_FACE('',(#609),#606,.T.);+#611=CARTESIAN_POINT($,(-25,25,2.2));+#612=DIRECTION($,(0,0,1));+#613=DIRECTION($,(1,0,0));+#614=AXIS2_PLACEMENT_3D($,#611,#612,#613);+#615=CYLINDRICAL_SURFACE($,#614,3.5);+#616=ORIENTED_EDGE($,$,$,#122,.T.);+#617=CARTESIAN_POINT($,(-21.6773504548328,23.9,7.2));+#618=VERTEX_POINT($,#617);+#619=CARTESIAN_POINT($,(-21.6773504548328,23.9,2.2));+#620=DIRECTION($,(0,0,1));+#621=VECTOR($,#620,1);+#622=LINE($,#619,#621);+#623=EDGE_CURVE($,#107,#618,#622,.T.);+#624=ORIENTED_EDGE($,$,$,#623,.T.);+#625=CARTESIAN_POINT($,(-21.6773504548328,26.1,7.2));+#626=VERTEX_POINT($,#625);+#627=CARTESIAN_POINT($,(-25,25,7.2));+#628=DIRECTION($,(0,0,1));+#629=DIRECTION($,(0.9493284414764,0.3142857142857,0));+#630=AXIS2_PLACEMENT_3D($,#627,#628,#629);+#631=CIRCLE($,#630,3.5);+#632=TRIMMED_CURVE($,#631,(PARAMETER_VALUE(0)),(PARAMETER_VALUE(5.6437770098541)),.T.,.PARAMETER.);+#633=EDGE_CURVE($,#626,#618,#632,.T.);+#634=ORIENTED_EDGE($,$,$,#633,.F.);+#635=CARTESIAN_POINT($,(-21.6773504548328,26.1,2.2));+#636=DIRECTION($,(0,0,1));+#637=VECTOR($,#636,1);+#638=LINE($,#635,#637);+#639=EDGE_CURVE($,#115,#626,#638,.T.);+#640=ORIENTED_EDGE($,$,$,#639,.F.);+#641=EDGE_LOOP($,(#616,#624,#634,#640));+#642=FACE_OUTER_BOUND('',#641,.T.);+#643=ADVANCED_FACE('',(#642),#615,.T.);+#644=CARTESIAN_POINT($,(-25,25,2.2));+#645=DIRECTION($,(0,0,1));+#646=DIRECTION($,(1,0,0));+#647=AXIS2_PLACEMENT_3D($,#644,#645,#646);+#648=CYLINDRICAL_SURFACE($,#647,3.5);+#649=ORIENTED_EDGE($,$,$,#633,.T.);+#650=CARTESIAN_POINT($,(-25,25,7.2));+#651=DIRECTION($,(0,0,1));+#652=DIRECTION($,(0.9493284414764,-0.3142857142857,0));+#653=AXIS2_PLACEMENT_3D($,#650,#651,#652);+#654=CIRCLE($,#653,3.5);+#655=TRIMMED_CURVE($,#654,(PARAMETER_VALUE(0)),(PARAMETER_VALUE(0.6394082973255)),.T.,.PARAMETER.);+#656=EDGE_CURVE($,#618,#626,#655,.T.);+#657=ORIENTED_EDGE($,$,$,#656,.T.);+#658=EDGE_LOOP($,(#649,#657));+#659=FACE_OUTER_BOUND('',#658,.T.);+#660=CARTESIAN_POINT($,(-21.5,25,10.2));+#661=VERTEX_POINT($,#660);+#662=CARTESIAN_POINT($,(-25,25,10.2));+#663=DIRECTION($,(0,0,1));+#664=DIRECTION($,(1,0,0));+#665=AXIS2_PLACEMENT_3D($,#662,#663,#664);+#666=CIRCLE($,#665,3.5);+#667=EDGE_CURVE($,#661,#661,#666,.T.);+#668=ORIENTED_EDGE($,$,$,#667,.F.);+#669=EDGE_LOOP($,(#668));+#670=FACE_BOUND('',#669,.T.);+#671=ADVANCED_FACE('',(#659,#670),#648,.T.);+#672=CARTESIAN_POINT($,(-25,25,2.2));+#673=DIRECTION($,(0,0,1));+#674=DIRECTION($,(1,0,0));+#675=AXIS2_PLACEMENT_3D($,#672,#673,#674);+#676=CYLINDRICAL_SURFACE($,#675,1.5);+#677=CARTESIAN_POINT($,(-23.5,25,2.2));+#678=VERTEX_POINT($,#677);+#679=CARTESIAN_POINT($,(-25,25,2.2));+#680=DIRECTION($,(0,0,1));+#681=DIRECTION($,(1,0,0));+#682=AXIS2_PLACEMENT_3D($,#679,#680,#681);+#683=CIRCLE($,#682,1.5);+#684=EDGE_CURVE($,#678,#678,#683,.T.);+#685=ORIENTED_EDGE($,$,$,#684,.T.);+#686=EDGE_LOOP($,(#685));+#687=FACE_OUTER_BOUND('',#686,.T.);+#688=CARTESIAN_POINT($,(-23.5,25,10.2));+#689=VERTEX_POINT($,#688);+#690=CARTESIAN_POINT($,(-25,25,10.2));+#691=DIRECTION($,(0,0,1));+#692=DIRECTION($,(1,0,0));+#693=AXIS2_PLACEMENT_3D($,#690,#691,#692);+#694=CIRCLE($,#693,1.5);+#695=EDGE_CURVE($,#689,#689,#694,.T.);+#696=ORIENTED_EDGE($,$,$,#695,.F.);+#697=EDGE_LOOP($,(#696));+#698=FACE_BOUND('',#697,.T.);+#699=ADVANCED_FACE('',(#687,#698),#676,.F.);+#700=CARTESIAN_POINT($,(-25,25,10.2));+#701=DIRECTION($,(0,0,1));+#702=DIRECTION($,(1,0,0));+#703=AXIS2_PLACEMENT_3D($,#700,#701,#702);+#704=PLANE($,#703);+#705=ORIENTED_EDGE($,$,$,#667,.T.);+#706=EDGE_LOOP($,(#705));+#707=FACE_OUTER_BOUND('',#706,.T.);+#708=ORIENTED_EDGE($,$,$,#695,.F.);+#709=EDGE_LOOP($,(#708));+#710=FACE_BOUND('',#709,.T.);+#711=ADVANCED_FACE('',(#707,#710),#704,.T.);+#712=CARTESIAN_POINT($,(-25,25,2.2));+#713=DIRECTION($,(0,0,1));+#714=DIRECTION($,(1,0,0));+#715=AXIS2_PLACEMENT_3D($,#712,#713,#714);+#716=PLANE($,#715);+#717=ORIENTED_EDGE($,$,$,#684,.T.);+#718=EDGE_LOOP($,(#717));+#719=FACE_OUTER_BOUND('',#718,.T.);+#720=ADVANCED_FACE('',(#719),#716,.T.);+#721=CARTESIAN_POINT($,(23.4283494344111,21.8727145158007,2.2));+#722=DIRECTION($,(-0.7071067811865,0.7071067811865,0));+#723=DIRECTION($,(0.7071067811865,0.7071067811865,0));+#724=AXIS2_PLACEMENT_3D($,#721,#722,#723);+#725=PLANE($,#724);+#726=ORIENTED_EDGE($,$,$,#184,.T.);+#727=ORIENTED_EDGE($,$,$,#209,.T.);+#728=CARTESIAN_POINT($,(23.4283494344111,21.8727145158007,7.2));+#729=DIRECTION($,(-0.7071067811865,-0.7071067811865,0));+#730=VECTOR($,#729,1);+#731=LINE($,#728,#730);+#732=EDGE_CURVE($,#465,#204,#731,.T.);+#733=ORIENTED_EDGE($,$,$,#732,.F.);+#734=ORIENTED_EDGE($,$,$,#478,.F.);+#735=EDGE_LOOP($,(#726,#727,#733,#734));+#736=FACE_OUTER_BOUND('',#735,.T.);+#737=ADVANCED_FACE('',(#736),#725,.T.);+#738=CARTESIAN_POINT($,(21.8727145158007,23.4283494344111,2.2));+#739=DIRECTION($,(-0.7071067811865,0.7071067811865,0));+#740=DIRECTION($,(0.7071067811865,0.7071067811865,0));+#741=AXIS2_PLACEMENT_3D($,#738,#739,#740);+#742=PLANE($,#741);+#743=ORIENTED_EDGE($,$,$,#94,.T.);+#744=ORIENTED_EDGE($,$,$,#225,.T.);+#745=CARTESIAN_POINT($,(21.8727145158007,23.4283494344111,7.2));+#746=DIRECTION($,(-0.7071067811865,-0.7071067811865,0));+#747=VECTOR($,#746,1);+#748=LINE($,#745,#747);+#749=EDGE_CURVE($,#424,#212,#748,.T.);+#750=ORIENTED_EDGE($,$,$,#749,.F.);+#751=ORIENTED_EDGE($,$,$,#429,.F.);+#752=EDGE_LOOP($,(#743,#744,#750,#751));+#753=FACE_OUTER_BOUND('',#752,.T.);+#754=ADVANCED_FACE('',(#753),#742,.T.);+#755=CARTESIAN_POINT($,(23.4283494344111,21.8727145158007,7.2));+#756=DIRECTION($,(0,0,1));+#757=DIRECTION($,(1,0,0));+#758=AXIS2_PLACEMENT_3D($,#755,#756,#757);+#759=PLANE($,#758);+#760=ORIENTED_EDGE($,$,$,#732,.T.);+#761=ORIENTED_EDGE($,$,$,#242,.T.);+#762=ORIENTED_EDGE($,$,$,#749,.F.);+#763=ORIENTED_EDGE($,$,$,#528,.T.);+#764=EDGE_LOOP($,(#760,#761,#762,#763));+#765=FACE_OUTER_BOUND('',#764,.T.);+#766=ADVANCED_FACE('',(#765),#759,.T.);+#767=CARTESIAN_POINT($,(26.1,21.6773504548328,2.2));+#768=DIRECTION($,(-1,0,0));+#769=DIRECTION($,(0,1,0));+#770=AXIS2_PLACEMENT_3D($,#767,#768,#769);+#771=PLANE($,#770);+#772=ORIENTED_EDGE($,$,$,#148,.T.);+#773=ORIENTED_EDGE($,$,$,#319,.T.);+#774=CARTESIAN_POINT($,(26.1,21.6773504548328,7.2));+#775=DIRECTION($,(0,-1,0));+#776=VECTOR($,#775,1);+#777=LINE($,#774,#776);+#778=EDGE_CURVE($,#498,#314,#777,.T.);+#779=ORIENTED_EDGE($,$,$,#778,.F.);+#780=ORIENTED_EDGE($,$,$,#511,.F.);+#781=EDGE_LOOP($,(#772,#773,#779,#780));+#782=FACE_OUTER_BOUND('',#781,.T.);+#783=ADVANCED_FACE('',(#782),#771,.T.);+#784=CARTESIAN_POINT($,(23.9,21.6773504548328,2.2));+#785=DIRECTION($,(-1,0,0));+#786=DIRECTION($,(0,1,0));+#787=AXIS2_PLACEMENT_3D($,#784,#785,#786);+#788=PLANE($,#787);+#789=ORIENTED_EDGE($,$,$,#166,.T.);+#790=ORIENTED_EDGE($,$,$,#335,.T.);+#791=CARTESIAN_POINT($,(23.9,21.6773504548328,7.2));+#792=DIRECTION($,(0,-1,0));+#793=VECTOR($,#792,1);+#794=LINE($,#791,#793);+#795=EDGE_CURVE($,#457,#322,#794,.T.);+#796=ORIENTED_EDGE($,$,$,#795,.F.);+#797=ORIENTED_EDGE($,$,$,#462,.F.);+#798=EDGE_LOOP($,(#789,#790,#796,#797));+#799=FACE_OUTER_BOUND('',#798,.T.);+#800=ADVANCED_FACE('',(#799),#788,.T.);+#801=CARTESIAN_POINT($,(26.1,21.6773504548328,7.2));+#802=DIRECTION($,(0,0,1));+#803=DIRECTION($,(1,0,0));+#804=AXIS2_PLACEMENT_3D($,#801,#802,#803);+#805=PLANE($,#804);+#806=ORIENTED_EDGE($,$,$,#778,.T.);+#807=ORIENTED_EDGE($,$,$,#352,.T.);+#808=ORIENTED_EDGE($,$,$,#795,.F.);+#809=ORIENTED_EDGE($,$,$,#537,.T.);+#810=EDGE_LOOP($,(#806,#807,#808,#809));+#811=FACE_OUTER_BOUND('',#810,.T.);+#812=ADVANCED_FACE('',(#811),#805,.T.);+#813=CARTESIAN_POINT($,(21.6773504548328,23.9,2.2));+#814=DIRECTION($,(0,1,-0));+#815=DIRECTION($,(1,0,0));+#816=AXIS2_PLACEMENT_3D($,#813,#814,#815);+#817=PLANE($,#816);+#818=ORIENTED_EDGE($,$,$,#112,.T.);+#819=ORIENTED_EDGE($,$,$,#623,.T.);+#820=CARTESIAN_POINT($,(21.6773504548328,23.9,7.2));+#821=DIRECTION($,(-1,0,0));+#822=VECTOR($,#821,1);+#823=LINE($,#820,#822);+#824=EDGE_CURVE($,#432,#618,#823,.T.);+#825=ORIENTED_EDGE($,$,$,#824,.F.);+#826=ORIENTED_EDGE($,$,$,#445,.F.);+#827=EDGE_LOOP($,(#818,#819,#825,#826));+#828=FACE_OUTER_BOUND('',#827,.T.);+#829=ADVANCED_FACE('',(#828),#817,.T.);+#830=CARTESIAN_POINT($,(21.6773504548328,26.1,2.2));+#831=DIRECTION($,(0,1,-0));+#832=DIRECTION($,(1,0,0));+#833=AXIS2_PLACEMENT_3D($,#830,#831,#832);+#834=PLANE($,#833);+#835=ORIENTED_EDGE($,$,$,#130,.T.);+#836=ORIENTED_EDGE($,$,$,#639,.T.);+#837=CARTESIAN_POINT($,(21.6773504548328,26.1,7.2));+#838=DIRECTION($,(-1,0,0));+#839=VECTOR($,#838,1);+#840=LINE($,#837,#839);+#841=EDGE_CURVE($,#490,#626,#840,.T.);+#842=ORIENTED_EDGE($,$,$,#841,.F.);+#843=ORIENTED_EDGE($,$,$,#495,.F.);+#844=EDGE_LOOP($,(#835,#836,#842,#843));+#845=FACE_OUTER_BOUND('',#844,.T.);+#846=ADVANCED_FACE('',(#845),#834,.T.);+#847=CARTESIAN_POINT($,(21.6773504548328,23.9,7.2));+#848=DIRECTION($,(0,0,1));+#849=DIRECTION($,(1,0,0));+#850=AXIS2_PLACEMENT_3D($,#847,#848,#849);+#851=PLANE($,#850);+#852=ORIENTED_EDGE($,$,$,#824,.T.);+#853=ORIENTED_EDGE($,$,$,#656,.T.);+#854=ORIENTED_EDGE($,$,$,#841,.F.);+#855=ORIENTED_EDGE($,$,$,#546,.T.);+#856=EDGE_LOOP($,(#852,#853,#854,#855));+#857=FACE_OUTER_BOUND('',#856,.T.);+#858=ADVANCED_FACE('',(#857),#851,.T.);+#859=CLOSED_SHELL($,(#28,#56,#65,#77,#196,#229,#257,#285,#297,#306,#339,#367,#395,#407,#416,#449,#482,#515,#561,#589,#601,#610,#643,#671,#699,#711,#720,#737,#754,#766,#783,#800,#812,#829,#846,#858));+#860=MANIFOLD_SOLID_BREP('MoldX0ElectronicsEnclosureHalf',#859);+#861=APPLICATION_CONTEXT('mechanical design');+#862=PRODUCT_CONTEXT('',#861,'mechanical');+#863=PRODUCT('AETHERIS','MoldX0ElectronicsEnclosureHalf','',(#862));+#864=PRODUCT_DEFINITION_FORMATION('','',#863);+#865=PRODUCT_DEFINITION_CONTEXT('design',#861,'design');+#866=PRODUCT_DEFINITION('','',#864,#865);+#867=PRODUCT_DEFINITION_SHAPE('','',#866);+#868=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.));+#869=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.));+#870=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT());+#871=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNIT_ASSIGNED_CONTEXT((#868,#869,#870))REPRESENTATION_CONTEXT('3','3D'));+#872=SHAPE_REPRESENTATION('MoldX0ElectronicsEnclosureHalf',(#860),#871);+#873=SHAPE_DEFINITION_REPRESENTATION(#867,#872);+#874=SHAPE_ASPECT('firmament-note:plastic-shell:EnclosureHalf','semantic note target=EnclosureHalf.ExteriorDesignSurface',#867,.F.);+#875=PROPERTY_DEFINITION('note:plastic-shell:EnclosureHalf','First-class molded plastic product definition; wall=2.2 mm, tooling=(0,0,1), parting=MainParting, draft=3 deg; gate, ejection, and reinforcement intent retained.',#874);+#876=SHAPE_ASPECT('firmament-note:gate:MainGate','semantic note target=TopAnnularRim',#867,.F.);+#877=PROPERTY_DEFINITION('note:gate:MainGate','Edge gate at (0,57,20); geometric flow proxy only.',#876);+#878=SHAPE_ASPECT('firmament-note:standoff:PcbA','semantic note target=Standoff:PcbA',#867,.F.);+#879=PROPERTY_DEFINITION('note:standoff:PcbA','Pcb support at (-25,-25,2.2); exact analytic annular feature with retained core hole.',#878);+#880=SHAPE_ASPECT('firmament-geometric-target:Standoff:PcbA','semantic geometry binding target=Standoff:PcbA',#867,.T.);+#881=GEOMETRIC_ITEM_SPECIFIC_USAGE('firmament semantic target','target=Standoff:PcbA',#880,#872,#229);+#882=GEOMETRIC_ITEM_SPECIFIC_USAGE('firmament semantic target','target=Standoff:PcbA',#880,#872,#257);+#883=GEOMETRIC_ITEM_SPECIFIC_USAGE('firmament semantic target','target=Standoff:PcbA',#880,#872,#285);+#884=GEOMETRIC_ITEM_SPECIFIC_USAGE('firmament semantic target','target=Standoff:PcbA',#880,#872,#297);+#885=GEOMETRIC_ITEM_SPECIFIC_USAGE('firmament semantic target','target=Standoff:PcbA',#880,#872,#306);+#886=SHAPE_ASPECT('firmament-note:standoff:PcbB','semantic note target=Standoff:PcbB',#867,.F.);+#887=PROPERTY_DEFINITION('note:standoff:PcbB','Pcb support at (25,-25,2.2); exact analytic annular feature with retained core hole.',#886);+#888=SHAPE_ASPECT('firmament-geometric-target:Standoff:PcbB','semantic geometry binding target=Standoff:PcbB',#867,.T.);+#889=GEOMETRIC_ITEM_SPECIFIC_USAGE('firmament semantic target','target=Standoff:PcbB',#888,#872,#339);+#890=GEOMETRIC_ITEM_SPECIFIC_USAGE('firmament semantic target','target=Standoff:PcbB',#888,#872,#367);+#891=GEOMETRIC_ITEM_SPECIFIC_USAGE('firmament semantic target','target=Standoff:PcbB',#888,#872,#395);+#892=GEOMETRIC_ITEM_SPECIFIC_USAGE('firmament semantic target','target=Standoff:PcbB',#888,#872,#407);+#893=GEOMETRIC_ITEM_SPECIFIC_USAGE('firmament semantic target','target=Standoff:PcbB',#888,#872,#416);+#894=SHAPE_ASPECT('firmament-note:standoff:PcbC','semantic note target=Standoff:PcbC',#867,.F.);+#895=PROPERTY_DEFINITION('note:standoff:PcbC','Pcb support at (25,25,2.2); exact analytic annular feature with retained core hole.',#894);+#896=SHAPE_ASPECT('firmament-geometric-target:Standoff:PcbC','semantic geometry binding target=Standoff:PcbC',#867,.T.);+#897=GEOMETRIC_ITEM_SPECIFIC_USAGE('firmament semantic target','target=Standoff:PcbC',#896,#872,#449);+#898=GEOMETRIC_ITEM_SPECIFIC_USAGE('firmament semantic target','target=Standoff:PcbC',#896,#872,#482);+#899=GEOMETRIC_ITEM_SPECIFIC_USAGE('firmament semantic target','target=Standoff:PcbC',#896,#872,#515);+#900=GEOMETRIC_ITEM_SPECIFIC_USAGE('firmament semantic target','target=Standoff:PcbC',#896,#872,#561);+#901=GEOMETRIC_ITEM_SPECIFIC_USAGE('firmament semantic target','target=Standoff:PcbC',#896,#872,#589);+#902=GEOMETRIC_ITEM_SPECIFIC_USAGE('firmament semantic target','target=Standoff:PcbC',#896,#872,#601);+#903=GEOMETRIC_ITEM_SPECIFIC_USAGE('firmament semantic target','target=Standoff:PcbC',#896,#872,#610);+#904=SHAPE_ASPECT('firmament-note:standoff:PcbD','semantic note target=Standoff:PcbD',#867,.F.);+#905=PROPERTY_DEFINITION('note:standoff:PcbD','Pcb support at (-25,25,2.2); exact analytic annular feature with retained core hole.',#904);+#906=SHAPE_ASPECT('firmament-geometric-target:Standoff:PcbD','semantic geometry binding target=Standoff:PcbD',#867,.T.);+#907=GEOMETRIC_ITEM_SPECIFIC_USAGE('firmament semantic target','target=Standoff:PcbD',#906,#872,#643);+#908=GEOMETRIC_ITEM_SPECIFIC_USAGE('firmament semantic target','target=Standoff:PcbD',#906,#872,#671);+#909=GEOMETRIC_ITEM_SPECIFIC_USAGE('firmament semantic target','target=Standoff:PcbD',#906,#872,#699);+#910=GEOMETRIC_ITEM_SPECIFIC_USAGE('firmament semantic target','target=Standoff:PcbD',#906,#872,#711);+#911=GEOMETRIC_ITEM_SPECIFIC_USAGE('firmament semantic target','target=Standoff:PcbD',#906,#872,#720);+#912=SHAPE_ASPECT('firmament-note:ejector-pin:E1','semantic note target=InnerBottom',#867,.F.);+#913=PROPERTY_DEFINITION('note:ejector-pin:E1','Tooling contact diameter 4 mm; not a product hole.',#912);+#914=SHAPE_ASPECT('firmament-note:ejector-pin:E2','semantic note target=InnerBottom',#867,.F.);+#915=PROPERTY_DEFINITION('note:ejector-pin:E2','Tooling contact diameter 4 mm; not a product hole.',#914);+#916=SHAPE_ASPECT('firmament-note:ejector-pin:E3','semantic note target=InnerBottom',#867,.F.);+#917=PROPERTY_DEFINITION('note:ejector-pin:E3','Tooling contact diameter 4 mm; not a product hole.',#916);+#918=SHAPE_ASPECT('firmament-note:ejector-pin:E4','semantic note target=InnerBottom',#867,.F.);+#919=PROPERTY_DEFINITION('note:ejector-pin:E4','Tooling contact diameter 4 mm; not a product hole.',#918);+#920=SHAPE_ASPECT('firmament-note:autorib:PcbSupportNetwork','semantic note target=AutoRib:PcbSupportNetwork',#867,.F.);+#921=PROPERTY_DEFINITION('note:autorib:PcbSupportNetwork','Selected network gate-oriented-fan; physically grafted as constant-shell-thickness B-rep walls with flat tops and explicitly reported zero release draft; see judgment evidence sidecar.',#920);+#922=SHAPE_ASPECT('firmament-geometric-target:AutoRib:PcbSupportNetwork','semantic geometry binding target=AutoRib:PcbSupportNetwork',#867,.T.);+#923=GEOMETRIC_ITEM_SPECIFIC_USAGE('firmament semantic target','target=AutoRib:PcbSupportNetwork',#922,#872,#737);+#924=GEOMETRIC_ITEM_SPECIFIC_USAGE('firmament semantic target','target=AutoRib:PcbSupportNetwork',#922,#872,#754);+#925=GEOMETRIC_ITEM_SPECIFIC_USAGE('firmament semantic target','target=AutoRib:PcbSupportNetwork',#922,#872,#766);+#926=GEOMETRIC_ITEM_SPECIFIC_USAGE('firmament semantic target','target=AutoRib:PcbSupportNetwork',#922,#872,#783);+#927=GEOMETRIC_ITEM_SPECIFIC_USAGE('firmament semantic target','target=AutoRib:PcbSupportNetwork',#922,#872,#800);+#928=GEOMETRIC_ITEM_SPECIFIC_USAGE('firmament semantic target','target=AutoRib:PcbSupportNetwork',#922,#872,#812);+#929=GEOMETRIC_ITEM_SPECIFIC_USAGE('firmament semantic target','target=AutoRib:PcbSupportNetwork',#922,#872,#829);+#930=GEOMETRIC_ITEM_SPECIFIC_USAGE('firmament semantic target','target=AutoRib:PcbSupportNetwork',#922,#872,#846);+#931=GEOMETRIC_ITEM_SPECIFIC_USAGE('firmament semantic target','target=AutoRib:PcbSupportNetwork',#922,#872,#858);+ENDSEC;+END-ISO-10303-21;diff --git a/fixtures/Canonical/PlasticShell/plastic-shell-materialized-enclosure.firmament b/fixtures/Canonical/PlasticShell/plastic-shell-materialized-enclosure.firmamentnew file mode 100644index 00000000..79dcadf6--- /dev/null+++ b/fixtures/Canonical/PlasticShell/plastic-shell-materialized-enclosure.firmament@@ -0,0 +1,20 @@+// X0a flagship alias: the physical result is generated from the same manufacturing intent as MOLD-X0.+Model MoldX0aMaterializedEnclosure {+ Units: mm+ PlasticShell EnclosureHalf {+ Exterior: Frustum BottomRadius: 55 mm TopRadius: 57 mm Height: 20 mm Material: ABS+ ToolingDirection: [0, 0, 1] MinimumDraftAngle: 3 deg Preserve: [ExteriorDesignSurface, MountingInterface]+ WallPolicy { NominalThickness: 2.2 mm MinimumThickness: 2.1 mm MaximumThickness: 2.3 mm ThicknessTolerance: 0.05 mm }+ PartingPlane MainParting { Origin: [0, 0, 20] Normal: [0, 0, 1] }+ Gate MainGate { Kind: Edge Position: [0, 57, 20] Target: TopAnnularRim Size: 1.2 mm }+ Standoff PcbA { Position: [-25, -25, 2.2] Height: 8 mm OuterDiameter: 7 mm HoleDiameter: 3 mm SupportIntent: Pcb }+ Standoff PcbB { Position: [25, -25, 2.2] Height: 8 mm OuterDiameter: 7 mm HoleDiameter: 3 mm SupportIntent: Pcb }+ Standoff PcbC { Position: [25, 25, 2.2] Height: 8 mm OuterDiameter: 7 mm HoleDiameter: 3 mm SupportIntent: Pcb }+ Standoff PcbD { Position: [-25, 25, 2.2] Height: 8 mm OuterDiameter: 7 mm HoleDiameter: 3 mm SupportIntent: Pcb }+ EjectorPin E1 { Position: [-12, 0, 2.2] Diameter: 4 mm Target: InnerBottom }+ EjectorPin E2 { Position: [12, 0, 2.2] Diameter: 4 mm Target: InnerBottom }+ EjectorPin E3 { Position: [0, -12, 2.2] Diameter: 4 mm Target: InnerBottom }+ EjectorPin E4 { Position: [0, 12, 2.2] Diameter: 4 mm Target: InnerBottom }+ AutoRib PcbSupportNetwork { Support: [PcbA, PcbB, PcbC, PcbD] Gate: MainGate KeepOut: [] RibPolicy { ThicknessRatio: 1.0 MinimumHeight: 3 mm MaximumHeight: 7 mm MinimumSpacing: 4 mm DraftAngle: 3 deg BaseBlendRadius: 0.8 mm } }+ }+}diff --git a/fixtures/Canonical/PlasticShell/plastic-shell-materialized-rib.firmament b/fixtures/Canonical/PlasticShell/plastic-shell-materialized-rib.firmamentnew file mode 100644index 00000000..a325ad46--- /dev/null+++ b/fixtures/Canonical/PlasticShell/plastic-shell-materialized-rib.firmament@@ -0,0 +1,14 @@+Model PlasticShellMaterializedRib {+ Units: mm+ PlasticShell Housing {+ Exterior: Frustum BottomRadius: 42 mm TopRadius: 44 mm Height: 18 mm Material: ABS+ ToolingDirection: [0, 0, 1] MinimumDraftAngle: 3 deg Preserve: [ExteriorDesignSurface]+ WallPolicy { NominalThickness: 2 mm MinimumThickness: 1.9 mm MaximumThickness: 2.1 mm ThicknessTolerance: 0.05 mm }+ PartingPlane MainParting { Origin: [0, 0, 18] Normal: [0, 0, 1] }+ Gate RearGate { Kind: Edge Position: [0, 44, 18] Target: TopAnnularRim Size: 1 mm }+ Standoff A { Position: [-18, 0, 2] Height: 7 mm OuterDiameter: 7 mm HoleDiameter: 3 mm SupportIntent: Pcb }+ Standoff B { Position: [18, 0, 2] Height: 7 mm OuterDiameter: 7 mm HoleDiameter: 3 mm SupportIntent: Pcb }+ EjectorPin E1 { Position: [0, 12, 2] Diameter: 3 mm Target: InnerBottom }+ AutoRib Support { Support: [A, B] Gate: RearGate KeepOut: [] RibPolicy { ThicknessRatio: 1.0 MinimumHeight: 3 mm MaximumHeight: 5 mm MinimumSpacing: 4 mm DraftAngle: 3 deg BaseBlendRadius: 0.7 mm } }+ }+}diff --git a/fixtures/Canonical/PlasticShell/plastic-shell-materialized-standoff.firmament b/fixtures/Canonical/PlasticShell/plastic-shell-materialized-standoff.firmamentnew file mode 100644index 00000000..76f285c1--- /dev/null+++ b/fixtures/Canonical/PlasticShell/plastic-shell-materialized-standoff.firmament@@ -0,0 +1,12 @@+Model PlasticShellMaterializedStandoff {+ Units: mm+ PlasticShell Housing {+ Exterior: Frustum BottomRadius: 40 mm TopRadius: 42 mm Height: 18 mm Material: ABS+ ToolingDirection: [0, 0, 1] MinimumDraftAngle: 3 deg Preserve: [ExteriorDesignSurface]+ WallPolicy { NominalThickness: 2 mm MinimumThickness: 1.9 mm MaximumThickness: 2.1 mm ThicknessTolerance: 0.05 mm }+ PartingPlane MainParting { Origin: [0, 0, 18] Normal: [0, 0, 1] }+ Gate RearGate { Kind: Edge Position: [0, 42, 18] Target: TopAnnularRim Size: 1 mm }+ Standoff Mount { Position: [0, 0, 2] Height: 7 mm OuterDiameter: 7 mm HoleDiameter: 3 mm SupportIntent: Fastener }+ EjectorPin E1 { Position: [12, 0, 2] Diameter: 3 mm Target: InnerBottom }+ }+}diff --git a/fixtures/Canonical/PlasticShell/plastic-shell-rib-standoff-junction.firmament b/fixtures/Canonical/PlasticShell/plastic-shell-rib-standoff-junction.firmamentnew file mode 100644index 00000000..5953ee66--- /dev/null+++ b/fixtures/Canonical/PlasticShell/plastic-shell-rib-standoff-junction.firmament@@ -0,0 +1,15 @@+Model PlasticShellRibStandoffJunction {+ Units: mm+ PlasticShell Housing {+ Exterior: Frustum BottomRadius: 45 mm TopRadius: 47 mm Height: 18 mm Material: ABS+ ToolingDirection: [0, 0, 1] MinimumDraftAngle: 3 deg Preserve: [ExteriorDesignSurface]+ WallPolicy { NominalThickness: 2 mm MinimumThickness: 1.9 mm MaximumThickness: 2.1 mm ThicknessTolerance: 0.05 mm }+ PartingPlane MainParting { Origin: [0, 0, 18] Normal: [0, 0, 1] }+ Gate RearGate { Kind: Edge Position: [0, 47, 18] Target: TopAnnularRim Size: 1 mm }+ Standoff A { Position: [-18, -12, 2] Height: 7 mm OuterDiameter: 7 mm HoleDiameter: 3 mm SupportIntent: Pcb }+ Standoff B { Position: [18, -12, 2] Height: 7 mm OuterDiameter: 7 mm HoleDiameter: 3 mm SupportIntent: Pcb }+ Standoff C { Position: [0, 18, 2] Height: 7 mm OuterDiameter: 7 mm HoleDiameter: 3 mm SupportIntent: Pcb }+ EjectorPin E1 { Position: [0, -25, 2] Diameter: 3 mm Target: InnerBottom }+ AutoRib Support { Support: [A, B, C] Gate: RearGate KeepOut: [] RibPolicy { ThicknessRatio: 1.0 MinimumHeight: 3 mm MaximumHeight: 5 mm MinimumSpacing: 4 mm DraftAngle: 3 deg BaseBlendRadius: 0.7 mm } }+ }+}diff --git a/fixtures/Canonical/README.md b/fixtures/Canonical/README.mdindex 7bf6c9a2..f37a4215 100644--- a/fixtures/Canonical/README.md+++ b/fixtures/Canonical/README.md@@ -24,6 +24,7 @@ Everything in this directory is current authoring guidance. Examples progress fr| build a Paperclip Template | `Templates/paperclip.firmament` | `Record`, `Static`, `with`, `Template<PaperclipPolicy>`, circular `Sweep` || use a CNC policy | `Templates/cnc-dfm-policy.firmament` | Record defaults, `with`, `Template<Policy>`, enforcement || make Sheet Metal | `SheetMetal/l-bracket-with-hole.firmament` | material, bend, planar hole, formed/flat output |+| define a molded plastic shell | `PlasticShell/plastic-shell-enclosure.firmament` | inherent wall policy, tooling direction, parting plane, gate, standoffs, ejectors, AutoRib judgment || apply a bounded mathematical sculpt | `Sculpting/sculpted-housing.firmament` | immutable `BodyState`, `OffsetRegion`, locality, preservation contracts || replace a housing region with a freeform patch | `Sculpting/surf-x1-freeform-housing.firmament` | direct non-rational 6x6 B-spline patch, `ReplaceRegion`, explicit boundary correspondence, mixed G0/G1, downstream current-state hole || trim a freeform replacement around preserved openings | `Sculpting/surf-x1a-trimmed-freeform-housing.firmament` | derived Plane/B-spline outer trims, four circular inner loops, face-local pcurves, PMI/interface associations, rational-free AP242 |diff --git a/fixtures/Canonical/coverage.json b/fixtures/Canonical/coverage.jsonindex 223c6419..289cb843 100644--- a/fixtures/Canonical/coverage.json+++ b/fixtures/Canonical/coverage.json@@ -39,6 +39,16 @@"SurfaceIntersection": "Sculpting/surf-x1a-trimmed-freeform-housing.firmament","Pcurve": "Sculpting/surf-x1a-trimmed-freeform-housing.firmament","InnerTrimLoops": "Sculpting/surf-x1a-trimmed-freeform-housing.firmament",- "PersistentGeometryAssociation": "Sculpting/surf-x1a-trimmed-freeform-housing.firmament"+ "PersistentGeometryAssociation": "Sculpting/surf-x1a-trimmed-freeform-housing.firmament",+ "PlasticShell": "PlasticShell/plastic-shell-enclosure.firmament",+ "PlasticWallPolicy": "PlasticShell/plastic-shell-enclosure.firmament",+ "MoldPartingPlane": "PlasticShell/plastic-shell-enclosure.firmament",+ "MoldGate": "PlasticShell/plastic-shell-enclosure.firmament",+ "MoldStandoff": "PlasticShell/plastic-shell-enclosure.firmament",+ "MoldEjectorPin": "PlasticShell/plastic-shell-enclosure.firmament",+ "AutoRib": "PlasticShell/plastic-shell-enclosure.firmament",+ "MaterializedStandoff": "PlasticShell/plastic-shell-materialized-standoff.firmament",+ "MaterializedRib": "PlasticShell/plastic-shell-materialized-rib.firmament",+ "MoldedRibStandoffJunction": "PlasticShell/plastic-shell-rib-standoff-junction.firmament"}}diff --git a/fixtures/Canonical/qualification.json b/fixtures/Canonical/qualification.jsonindex 856dffed..2acfe63d 100644--- a/fixtures/Canonical/qualification.json+++ b/fixtures/Canonical/qualification.json@@ -9,6 +9,7 @@{ "path": "Sculpting", "operation": "build-step" },{ "path": "Structural", "operation": "build-step" },{ "path": "Piping", "operation": "build-step" },+ { "path": "PlasticShell", "operation": "build-step" },{ "path": "Basics", "operation": "build-step" },{ "path": "Primitives", "operation": "build-step" },{ "path": "Profiles", "operation": "build-step" },diff --git a/fixtures/Invalid/PlasticShell/autorib-winner-not-materializable.firmament b/fixtures/Invalid/PlasticShell/autorib-winner-not-materializable.firmamentnew file mode 100644index 00000000..fba03445--- /dev/null+++ b/fixtures/Invalid/PlasticShell/autorib-winner-not-materializable.firmament@@ -0,0 +1,9 @@+Model InvalidWinnerMaterialization { Units: mm PlasticShell Housing {+ Exterior: Frustum BottomRadius: 50 mm TopRadius: 52 mm Height: 20 mm Material: ABS ToolingDirection: [0,0,1] MinimumDraftAngle: 3 deg Preserve: [ExteriorDesignSurface]+ WallPolicy { NominalThickness: 2.2 mm MinimumThickness: 2.1 mm MaximumThickness: 2.3 mm ThicknessTolerance: 0.05 mm }+ PartingPlane P { Origin: [0,0,20] Normal: [0,0,1] } Gate G { Kind: Edge Position: [0,52,20] Target: TopAnnularRim Size: 1 mm }+ Standoff A { Position: [-20,-20,2.2] Height: 8 mm OuterDiameter: 12 mm HoleDiameter: 2 mm SupportIntent: Pcb } Standoff B { Position: [20,-20,2.2] Height: 8 mm OuterDiameter: 12 mm HoleDiameter: 2 mm SupportIntent: Pcb }+ Standoff C { Position: [20,20,2.2] Height: 8 mm OuterDiameter: 12 mm HoleDiameter: 2 mm SupportIntent: Pcb } Standoff D { Position: [-20,20,2.2] Height: 8 mm OuterDiameter: 12 mm HoleDiameter: 2 mm SupportIntent: Pcb }+ EjectorPin E { Position: [0,-30,2.2] Diameter: 3 mm Target: InnerBottom }+ AutoRib R { Support: [A,B,C,D] Gate: G KeepOut: [] RibPolicy { ThicknessRatio: 1.0 MinimumHeight: 3 mm MaximumHeight: 7 mm MinimumSpacing: 4 mm DraftAngle: 3 deg BaseBlendRadius: 0.8 mm } }+} }diff --git a/fixtures/Invalid/PlasticShell/draft-conflict.firmament b/fixtures/Invalid/PlasticShell/draft-conflict.firmamentnew file mode 100644index 00000000..5b7020cd--- /dev/null+++ b/fixtures/Invalid/PlasticShell/draft-conflict.firmament@@ -0,0 +1,17 @@+Model PlasticShellBasic {+ Units: mm+ PlasticShell Cup {+ Exterior: Frustum+ BottomRadius: 30 mm+ TopRadius: 31.5 mm+ Height: 15 mm+ Material: ABS+ ToolingDirection: [0, 0, 1]+ MinimumDraftAngle: 8 deg+ Preserve: [ExteriorDesignSurface]+ WallPolicy { NominalThickness: 2 mm MinimumThickness: 1.9 mm MaximumThickness: 2.1 mm ThicknessTolerance: 0.05 mm }+ PartingPlane MainParting { Origin: [0, 0, 15] Normal: [0, 0, 1] }+ Gate RearGate { Kind: Point Position: [0, 31.5, 15] Target: TopAnnularRim Size: 1 mm }+ EjectorPin CenterPin { Position: [0, 0, 2] Diameter: 3 mm Target: InnerBottom }+ }+}diff --git a/fixtures/Invalid/PlasticShell/invalid-ejector.firmament b/fixtures/Invalid/PlasticShell/invalid-ejector.firmamentnew file mode 100644index 00000000..dba621e0--- /dev/null+++ b/fixtures/Invalid/PlasticShell/invalid-ejector.firmament@@ -0,0 +1,17 @@+Model PlasticShellBasic {+ Units: mm+ PlasticShell Cup {+ Exterior: Frustum+ BottomRadius: 30 mm+ TopRadius: 31.5 mm+ Height: 15 mm+ Material: ABS+ ToolingDirection: [0, 0, 1]+ MinimumDraftAngle: 3 deg+ Preserve: [ExteriorDesignSurface]+ WallPolicy { NominalThickness: 2 mm MinimumThickness: 1.9 mm MaximumThickness: 2.1 mm ThicknessTolerance: 0.05 mm }+ PartingPlane MainParting { Origin: [0, 0, 15] Normal: [0, 0, 1] }+ Gate RearGate { Kind: Point Position: [0, 31.5, 15] Target: TopAnnularRim Size: 1 mm }+ EjectorPin CenterPin { Position: [40, 0, 2] Diameter: 3 mm Target: InnerBottom }+ }+}diff --git a/fixtures/Invalid/PlasticShell/invalid-gate.firmament b/fixtures/Invalid/PlasticShell/invalid-gate.firmamentnew file mode 100644index 00000000..3bd2ce07--- /dev/null+++ b/fixtures/Invalid/PlasticShell/invalid-gate.firmament@@ -0,0 +1,17 @@+Model PlasticShellBasic {+ Units: mm+ PlasticShell Cup {+ Exterior: Frustum+ BottomRadius: 30 mm+ TopRadius: 31.5 mm+ Height: 15 mm+ Material: ABS+ ToolingDirection: [0, 0, 1]+ MinimumDraftAngle: 3 deg+ Preserve: [ExteriorDesignSurface]+ WallPolicy { NominalThickness: 2 mm MinimumThickness: 1.9 mm MaximumThickness: 2.1 mm ThicknessTolerance: 0.05 mm }+ PartingPlane MainParting { Origin: [0, 0, 15] Normal: [0, 0, 1] }+ Gate RearGate { Kind: Point Position: [0, 0, 5] Target: TopAnnularRim Size: 1 mm }+ EjectorPin CenterPin { Position: [0, 0, 2] Diameter: 3 mm Target: InnerBottom }+ }+}diff --git a/fixtures/Invalid/PlasticShell/invalid-parting.firmament b/fixtures/Invalid/PlasticShell/invalid-parting.firmamentnew file mode 100644index 00000000..a8e98ba5--- /dev/null+++ b/fixtures/Invalid/PlasticShell/invalid-parting.firmament@@ -0,0 +1,17 @@+Model PlasticShellBasic {+ Units: mm+ PlasticShell Cup {+ Exterior: Frustum+ BottomRadius: 30 mm+ TopRadius: 31.5 mm+ Height: 15 mm+ Material: ABS+ ToolingDirection: [0, 0, 1]+ MinimumDraftAngle: 3 deg+ Preserve: [ExteriorDesignSurface]+ WallPolicy { NominalThickness: 2 mm MinimumThickness: 1.9 mm MaximumThickness: 2.1 mm ThicknessTolerance: 0.05 mm }+ PartingPlane MainParting { Origin: [0, 0, 15] Normal: [1, 0, 0] }+ Gate RearGate { Kind: Point Position: [0, 31.5, 15] Target: TopAnnularRim Size: 1 mm }+ EjectorPin CenterPin { Position: [0, 0, 2] Diameter: 3 mm Target: InnerBottom }+ }+}diff --git a/fixtures/Invalid/PlasticShell/no-valid-rib-network.firmament b/fixtures/Invalid/PlasticShell/no-valid-rib-network.firmamentnew file mode 100644index 00000000..88adf3e7--- /dev/null+++ b/fixtures/Invalid/PlasticShell/no-valid-rib-network.firmament@@ -0,0 +1,30 @@+Model MoldX0ElectronicsEnclosureHalf {+ Units: mm+ PlasticShell EnclosureHalf {+ Exterior: Frustum+ BottomRadius: 55 mm+ TopRadius: 57 mm+ Height: 20 mm+ Material: ABS+ ToolingDirection: [0, 0, 1]+ MinimumDraftAngle: 3 deg+ Preserve: [ExteriorDesignSurface, MountingInterface]+ WallPolicy { NominalThickness: 2.2 mm MinimumThickness: 2.1 mm MaximumThickness: 2.3 mm ThicknessTolerance: 0.05 mm }+ PartingPlane MainParting { Origin: [0, 0, 20] Normal: [0, 0, 1] }+ Gate MainGate { Kind: Edge Position: [0, 57, 20] Target: TopAnnularRim Size: 1.2 mm }+ Standoff PcbA { Position: [-25, -25, 2.2] Height: 8 mm OuterDiameter: 7 mm HoleDiameter: 3 mm SupportIntent: Pcb }+ Standoff PcbB { Position: [25, -25, 2.2] Height: 8 mm OuterDiameter: 7 mm HoleDiameter: 3 mm SupportIntent: Pcb }+ Standoff PcbC { Position: [25, 25, 2.2] Height: 8 mm OuterDiameter: 7 mm HoleDiameter: 3 mm SupportIntent: Pcb }+ Standoff PcbD { Position: [-25, 25, 2.2] Height: 8 mm OuterDiameter: 7 mm HoleDiameter: 3 mm SupportIntent: Pcb }+ EjectorPin E1 { Position: [-12, 0, 2.2] Diameter: 4 mm Target: InnerBottom }+ EjectorPin E2 { Position: [12, 0, 2.2] Diameter: 4 mm Target: InnerBottom }+ EjectorPin E3 { Position: [0, -12, 2.2] Diameter: 4 mm Target: InnerBottom }+ EjectorPin E4 { Position: [0, 12, 2.2] Diameter: 4 mm Target: InnerBottom }+ AutoRib PcbSupportNetwork {+ Support: [PcbA, PcbB, PcbC, PcbD]+ Gate: MainGate+ KeepOut: [perimeter-network, gate-oriented-fan]+ RibPolicy { ThicknessRatio: 1.0 MinimumHeight: 3 mm MaximumHeight: 7 mm MinimumSpacing: 4 mm DraftAngle: 3 deg BaseBlendRadius: 0.8 mm }+ }+ }+}diff --git a/fixtures/Invalid/PlasticShell/rib-disconnected.firmament b/fixtures/Invalid/PlasticShell/rib-disconnected.firmamentnew file mode 100644index 00000000..c2cb21c7--- /dev/null+++ b/fixtures/Invalid/PlasticShell/rib-disconnected.firmament@@ -0,0 +1,8 @@+Model InvalidRibDisconnected { Units: mm PlasticShell Housing {+ Exterior: Frustum BottomRadius: 42 mm TopRadius: 44 mm Height: 18 mm Material: ABS ToolingDirection: [0,0,1] MinimumDraftAngle: 3 deg Preserve: [ExteriorDesignSurface]+ WallPolicy { NominalThickness: 2 mm MinimumThickness: 1.9 mm MaximumThickness: 2.1 mm ThicknessTolerance: 0.05 mm }+ PartingPlane P { Origin: [0,0,18] Normal: [0,0,1] } Gate G { Kind: Edge Position: [0,44,18] Target: TopAnnularRim Size: 1 mm }+ Standoff A { Position: [-15,0,2] Height: 7 mm OuterDiameter: 7 mm HoleDiameter: 3 mm SupportIntent: Pcb } Standoff B { Position: [15,0,2] Height: 7 mm OuterDiameter: 7 mm HoleDiameter: 3 mm SupportIntent: Pcb }+ EjectorPin E { Position: [0,12,2] Diameter: 3 mm Target: InnerBottom }+ AutoRib R { Support: [A,B] Gate: G KeepOut: [perimeter-network, gate-oriented-fan] RibPolicy { ThicknessRatio: 1.0 MinimumHeight: 3 mm MaximumHeight: 5 mm MinimumSpacing: 4 mm DraftAngle: 3 deg BaseBlendRadius: 0.7 mm } }+} }diff --git a/fixtures/Invalid/PlasticShell/rib-ejector-collision.firmament b/fixtures/Invalid/PlasticShell/rib-ejector-collision.firmamentnew file mode 100644index 00000000..7288ccba--- /dev/null+++ b/fixtures/Invalid/PlasticShell/rib-ejector-collision.firmament@@ -0,0 +1,8 @@+Model InvalidRibEjectorCollision { Units: mm PlasticShell Housing {+ Exterior: Frustum BottomRadius: 42 mm TopRadius: 44 mm Height: 18 mm Material: ABS ToolingDirection: [0,0,1] MinimumDraftAngle: 3 deg Preserve: [ExteriorDesignSurface]+ WallPolicy { NominalThickness: 2 mm MinimumThickness: 1.9 mm MaximumThickness: 2.1 mm ThicknessTolerance: 0.05 mm }+ PartingPlane P { Origin: [0,0,18] Normal: [0,0,1] } Gate G { Kind: Edge Position: [0,44,18] Target: TopAnnularRim Size: 1 mm }+ Standoff A { Position: [-15,0,2] Height: 7 mm OuterDiameter: 7 mm HoleDiameter: 3 mm SupportIntent: Pcb } Standoff B { Position: [15,0,2] Height: 7 mm OuterDiameter: 7 mm HoleDiameter: 3 mm SupportIntent: Pcb }+ EjectorPin E { Position: [0,0,2] Diameter: 3 mm Target: InnerBottom }+ AutoRib R { Support: [A,B] Gate: G KeepOut: [] RibPolicy { ThicknessRatio: 1.0 MinimumHeight: 3 mm MaximumHeight: 5 mm MinimumSpacing: 4 mm DraftAngle: 3 deg BaseBlendRadius: 0.7 mm } }+} }diff --git a/fixtures/Invalid/PlasticShell/rib-thick-junction.firmament b/fixtures/Invalid/PlasticShell/rib-thick-junction.firmamentnew file mode 100644index 00000000..d8972260--- /dev/null+++ b/fixtures/Invalid/PlasticShell/rib-thick-junction.firmament@@ -0,0 +1,9 @@+Model InvalidRibThickJunction { Units: mm PlasticShell Housing {+ Exterior: Frustum BottomRadius: 50 mm TopRadius: 52 mm Height: 20 mm Material: ABS ToolingDirection: [0,0,1] MinimumDraftAngle: 3 deg Preserve: [ExteriorDesignSurface]+ WallPolicy { NominalThickness: 2.2 mm MinimumThickness: 2.1 mm MaximumThickness: 2.3 mm ThicknessTolerance: 0.05 mm }+ PartingPlane P { Origin: [0,0,20] Normal: [0,0,1] } Gate G { Kind: Edge Position: [0,52,20] Target: TopAnnularRim Size: 1 mm }+ Standoff A { Position: [-20,-20,2.2] Height: 8 mm OuterDiameter: 12 mm HoleDiameter: 2 mm SupportIntent: Pcb } Standoff B { Position: [20,-20,2.2] Height: 8 mm OuterDiameter: 12 mm HoleDiameter: 2 mm SupportIntent: Pcb }+ Standoff C { Position: [20,20,2.2] Height: 8 mm OuterDiameter: 12 mm HoleDiameter: 2 mm SupportIntent: Pcb } Standoff D { Position: [-20,20,2.2] Height: 8 mm OuterDiameter: 12 mm HoleDiameter: 2 mm SupportIntent: Pcb }+ EjectorPin E { Position: [0,-30,2.2] Diameter: 3 mm Target: InnerBottom }+ AutoRib R { Support: [A,B,C,D] Gate: G KeepOut: [] RibPolicy { ThicknessRatio: 1.0 MinimumHeight: 3 mm MaximumHeight: 7 mm MinimumSpacing: 4 mm DraftAngle: 3 deg BaseBlendRadius: 0.8 mm } }+} }diff --git a/fixtures/Invalid/PlasticShell/rib-undercut.firmament b/fixtures/Invalid/PlasticShell/rib-undercut.firmamentnew file mode 100644index 00000000..7e9fa963--- /dev/null+++ b/fixtures/Invalid/PlasticShell/rib-undercut.firmament@@ -0,0 +1,8 @@+Model InvalidRibUndercut { Units: mm PlasticShell Housing {+ Exterior: Frustum BottomRadius: 42 mm TopRadius: 44 mm Height: 18 mm Material: ABS ToolingDirection: [0,0,1] MinimumDraftAngle: 3 deg Preserve: [ExteriorDesignSurface]+ WallPolicy { NominalThickness: 2 mm MinimumThickness: 1.9 mm MaximumThickness: 2.1 mm ThicknessTolerance: 0.05 mm }+ PartingPlane P { Origin: [0,0,18] Normal: [0,0,1] } Gate G { Kind: Edge Position: [0,44,18] Target: TopAnnularRim Size: 1 mm }+ Standoff A { Position: [-15,0,2] Height: 7 mm OuterDiameter: 7 mm HoleDiameter: 3 mm SupportIntent: Pcb } Standoff B { Position: [15,0,2] Height: 7 mm OuterDiameter: 7 mm HoleDiameter: 3 mm SupportIntent: Pcb }+ EjectorPin E { Position: [0,12,2] Diameter: 3 mm Target: InnerBottom }+ AutoRib R { Support: [A,B] Gate: G KeepOut: [] RibPolicy { ThicknessRatio: 1.0 MinimumHeight: 3 mm MaximumHeight: 5 mm MinimumSpacing: 4 mm DraftAngle: 1 deg BaseBlendRadius: 0.7 mm } }+} }diff --git a/fixtures/Invalid/PlasticShell/standoff-breaks-exterior.firmament b/fixtures/Invalid/PlasticShell/standoff-breaks-exterior.firmamentnew file mode 100644index 00000000..79bdbf4a--- /dev/null+++ b/fixtures/Invalid/PlasticShell/standoff-breaks-exterior.firmament@@ -0,0 +1,7 @@+Model InvalidStandoffBreaksExterior { Units: mm PlasticShell Housing {+ Exterior: Frustum BottomRadius: 40 mm TopRadius: 42 mm Height: 18 mm Material: ABS ToolingDirection: [0,0,1] MinimumDraftAngle: 3 deg Preserve: [ExteriorDesignSurface]+ WallPolicy { NominalThickness: 2 mm MinimumThickness: 1.9 mm MaximumThickness: 2.1 mm ThicknessTolerance: 0.05 mm }+ PartingPlane P { Origin: [0,0,18] Normal: [0,0,1] } Gate G { Kind: Edge Position: [0,42,18] Target: TopAnnularRim Size: 1 mm }+ Standoff Outside { Position: [38,0,2] Height: 7 mm OuterDiameter: 7 mm HoleDiameter: 3 mm SupportIntent: Pcb }+ EjectorPin E { Position: [0,10,2] Diameter: 3 mm Target: InnerBottom }+} }diff --git a/fixtures/Invalid/PlasticShell/undercut.firmament b/fixtures/Invalid/PlasticShell/undercut.firmamentnew file mode 100644index 00000000..6818522d--- /dev/null+++ b/fixtures/Invalid/PlasticShell/undercut.firmament@@ -0,0 +1,17 @@+Model PlasticShellBasic {+ Units: mm+ PlasticShell Cup {+ Exterior: Frustum+ BottomRadius: 30 mm+ TopRadius: 29 mm+ Height: 15 mm+ Material: ABS+ ToolingDirection: [0, 0, 1]+ MinimumDraftAngle: 3 deg+ Preserve: [ExteriorDesignSurface]+ WallPolicy { NominalThickness: 2 mm MinimumThickness: 1.9 mm MaximumThickness: 2.1 mm ThicknessTolerance: 0.05 mm }+ PartingPlane MainParting { Origin: [0, 0, 15] Normal: [0, 0, 1] }+ Gate RearGate { Kind: Point Position: [0, 29, 15] Target: TopAnnularRim Size: 1 mm }+ EjectorPin CenterPin { Position: [0, 0, 2] Diameter: 3 mm Target: InnerBottom }+ }+}diff --git a/fixtures/Invalid/PlasticShell/wall-collapse.firmament b/fixtures/Invalid/PlasticShell/wall-collapse.firmamentnew file mode 100644index 00000000..f6ad581b--- /dev/null+++ b/fixtures/Invalid/PlasticShell/wall-collapse.firmament@@ -0,0 +1,17 @@+Model PlasticShellBasic {+ Units: mm+ PlasticShell Cup {+ Exterior: Frustum+ BottomRadius: 1 mm+ TopRadius: 1.5 mm+ Height: 15 mm+ Material: ABS+ ToolingDirection: [0, 0, 1]+ MinimumDraftAngle: 3 deg+ Preserve: [ExteriorDesignSurface]+ WallPolicy { NominalThickness: 2 mm MinimumThickness: 1.9 mm MaximumThickness: 2.1 mm ThicknessTolerance: 0.05 mm }+ PartingPlane MainParting { Origin: [0, 0, 15] Normal: [0, 0, 1] }+ Gate RearGate { Kind: Point Position: [0, 1.5, 15] Target: TopAnnularRim Size: 1 mm }+ EjectorPin CenterPin { Position: [0, 0, 2] Diameter: 3 mm Target: InnerBottom }+ }+}