Skip to content

Next Gen STEP AP242 Native-ish BREP Geometric Modeling Kernel

Simplify project structure and remove obsolete code

Yuechen Li3c5e1146d75e
diff --git a/Aetheris.CLI/AirTrace.cs b/Aetheris.CLI/AirTrace.cs
index f8e7c0ca..6f0168ed 100644
--- a/Aetheris.CLI/AirTrace.cs
+++ b/Aetheris.CLI/AirTrace.cs
@@ -2,6 +2,7 @@ using System.Text;
using System.Text.Json.Serialization;
using System.Text.RegularExpressions;
using Aetheris.Kernel.Core.Air;
+using Aetheris.Continuum.Bridges.Air;
using Aetheris.Kernel.Core.Air.BRepPlan;
using Aetheris.Kernel.Core.Air.Regions;
using Aetheris.Kernel.Core.Brep.Prismatic;
diff --git a/Aetheris.Continuum.Tests/Aetheris.Continuum.Tests.csproj b/Aetheris.Continuum.Tests/Aetheris.Continuum.Tests.csproj
new file mode 100644
index 00000000..f75be7a2
--- /dev/null
+++ b/Aetheris.Continuum.Tests/Aetheris.Continuum.Tests.csproj
@@ -0,0 +1,24 @@
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <TargetFramework>net10.0</TargetFramework>
+ <ImplicitUsings>enable</ImplicitUsings>
+ <Nullable>enable</Nullable>
+ <IsPackable>false</IsPackable>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <PackageReference Include="coverlet.collector" Version="6.0.0" />
+ <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
+ <PackageReference Include="xunit" Version="2.9.2" />
+ <PackageReference Include="xunit.runner.visualstudio" Version="2.8.2" />
+ </ItemGroup>
+
+ <ItemGroup>
+ <Using Include="Xunit" />
+ </ItemGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\Aetheris.Continuum\Aetheris.Continuum.csproj" />
+ <ProjectReference Include="..\Aetheris.Kernel.Core\Aetheris.Kernel.Core.csproj" />
+ </ItemGroup>
+</Project>
diff --git a/Aetheris.Kernel.Core.Tests/Cir/CirAdaptiveCalibrationTests.cs b/Aetheris.Continuum.Tests/Backends/Sdf/CirAdaptiveCalibrationTests.cs
similarity index 99%
rename from Aetheris.Kernel.Core.Tests/Cir/CirAdaptiveCalibrationTests.cs
rename to Aetheris.Continuum.Tests/Backends/Sdf/CirAdaptiveCalibrationTests.cs
index 92780fa2..7521c63c 100644
--- a/Aetheris.Kernel.Core.Tests/Cir/CirAdaptiveCalibrationTests.cs
+++ b/Aetheris.Continuum.Tests/Backends/Sdf/CirAdaptiveCalibrationTests.cs
@@ -1,7 +1,7 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Math;
-namespace Aetheris.Kernel.Core.Tests.Cir;
+namespace Aetheris.Continuum.Tests.Backends.Sdf;
public sealed record CirAdaptiveCalibrationPolicy(string Name, CirAdaptiveVolumeOptions AdaptiveOptions, int DenseResolution);
diff --git a/Aetheris.Kernel.Core.Tests/Cir/CirAdaptiveVolumeEstimatorTests.cs b/Aetheris.Continuum.Tests/Backends/Sdf/CirAdaptiveVolumeEstimatorTests.cs
similarity index 97%
rename from Aetheris.Kernel.Core.Tests/Cir/CirAdaptiveVolumeEstimatorTests.cs
rename to Aetheris.Continuum.Tests/Backends/Sdf/CirAdaptiveVolumeEstimatorTests.cs
index c710b5db..23f84682 100644
--- a/Aetheris.Kernel.Core.Tests/Cir/CirAdaptiveVolumeEstimatorTests.cs
+++ b/Aetheris.Continuum.Tests/Backends/Sdf/CirAdaptiveVolumeEstimatorTests.cs
@@ -1,7 +1,7 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Math;
-namespace Aetheris.Kernel.Core.Tests.Cir;
+namespace Aetheris.Continuum.Tests.Backends.Sdf;
public sealed class CirAdaptiveVolumeEstimatorTests
{
diff --git a/Aetheris.Kernel.Core.Tests/Cir/CirConeTests.cs b/Aetheris.Continuum.Tests/Backends/Sdf/CirConeTests.cs
similarity index 96%
rename from Aetheris.Kernel.Core.Tests/Cir/CirConeTests.cs
rename to Aetheris.Continuum.Tests/Backends/Sdf/CirConeTests.cs
index 47988cff..628b2376 100644
--- a/Aetheris.Kernel.Core.Tests/Cir/CirConeTests.cs
+++ b/Aetheris.Continuum.Tests/Backends/Sdf/CirConeTests.cs
@@ -1,7 +1,7 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Math;
-namespace Aetheris.Kernel.Core.Tests.Cir;
+namespace Aetheris.Continuum.Tests.Backends.Sdf;
public sealed class CirConeTests
{
diff --git a/Aetheris.Kernel.Core.Tests/Cir/CirEvaluationTests.cs b/Aetheris.Continuum.Tests/Backends/Sdf/CirEvaluationTests.cs
similarity index 96%
rename from Aetheris.Kernel.Core.Tests/Cir/CirEvaluationTests.cs
rename to Aetheris.Continuum.Tests/Backends/Sdf/CirEvaluationTests.cs
index ab166641..9703fa52 100644
--- a/Aetheris.Kernel.Core.Tests/Cir/CirEvaluationTests.cs
+++ b/Aetheris.Continuum.Tests/Backends/Sdf/CirEvaluationTests.cs
@@ -1,7 +1,7 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Math;
-namespace Aetheris.Kernel.Core.Tests.Cir;
+namespace Aetheris.Continuum.Tests.Backends.Sdf;
public sealed class CirEvaluationTests
{
diff --git a/Aetheris.Kernel.Core.Tests/Cir/CirMapDispatchPrototypeTests.cs b/Aetheris.Continuum.Tests/Backends/Sdf/CirMapDispatchPrototypeTests.cs
similarity index 99%
rename from Aetheris.Kernel.Core.Tests/Cir/CirMapDispatchPrototypeTests.cs
rename to Aetheris.Continuum.Tests/Backends/Sdf/CirMapDispatchPrototypeTests.cs
index 11303557..5b0487d3 100644
--- a/Aetheris.Kernel.Core.Tests/Cir/CirMapDispatchPrototypeTests.cs
+++ b/Aetheris.Continuum.Tests/Backends/Sdf/CirMapDispatchPrototypeTests.cs
@@ -1,9 +1,9 @@
using Aetheris.Kernel.Core.Brep;
-using Aetheris.Kernel.Core.Cir;
-using Aetheris.Kernel.Core.Cir.Mirrors;
+using Aetheris.Continuum.Backends.Sdf;
+using Aetheris.Continuum.Mirrors;
using Aetheris.Kernel.Core.Math;
-namespace Aetheris.Kernel.Core.Tests.Cir;
+namespace Aetheris.Continuum.Tests.Backends.Sdf;
public sealed class CirMapDispatchPrototypeTests
{
diff --git a/Aetheris.Kernel.Core.Tests/Cir/CirMapPrototypeTests.cs b/Aetheris.Continuum.Tests/Backends/Sdf/CirMapPrototypeTests.cs
similarity index 99%
rename from Aetheris.Kernel.Core.Tests/Cir/CirMapPrototypeTests.cs
rename to Aetheris.Continuum.Tests/Backends/Sdf/CirMapPrototypeTests.cs
index 2459f34b..192ddde0 100644
--- a/Aetheris.Kernel.Core.Tests/Cir/CirMapPrototypeTests.cs
+++ b/Aetheris.Continuum.Tests/Backends/Sdf/CirMapPrototypeTests.cs
@@ -1,9 +1,9 @@
using Aetheris.Kernel.Core.Brep;
using Aetheris.Kernel.Core.Brep.Queries;
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Math;
-namespace Aetheris.Kernel.Core.Tests.Cir;
+namespace Aetheris.Continuum.Tests.Backends.Sdf;
public sealed class CirMapPrototypeTests
{
diff --git a/Aetheris.Kernel.Core.Tests/Cir/CirMirrorAdmissionTests.cs b/Aetheris.Continuum.Tests/Backends/Sdf/CirMirrorAdmissionTests.cs
similarity index 98%
rename from Aetheris.Kernel.Core.Tests/Cir/CirMirrorAdmissionTests.cs
rename to Aetheris.Continuum.Tests/Backends/Sdf/CirMirrorAdmissionTests.cs
index 4e37a329..2426a6f0 100644
--- a/Aetheris.Kernel.Core.Tests/Cir/CirMirrorAdmissionTests.cs
+++ b/Aetheris.Continuum.Tests/Backends/Sdf/CirMirrorAdmissionTests.cs
@@ -1,6 +1,6 @@
-using Aetheris.Kernel.Core.Cir.Mirrors;
+using Aetheris.Continuum.Mirrors;
-namespace Aetheris.Kernel.Core.Tests.Cir;
+namespace Aetheris.Continuum.Tests.Backends.Sdf;
public sealed class CirMirrorAdmissionTests
{
diff --git a/Aetheris.Kernel.Core.Tests/Cir/CirPrismaticConvexPolyhedronMirrorTests.cs b/Aetheris.Continuum.Tests/Backends/Sdf/CirPrismaticConvexPolyhedronMirrorTests.cs
similarity index 98%
rename from Aetheris.Kernel.Core.Tests/Cir/CirPrismaticConvexPolyhedronMirrorTests.cs
rename to Aetheris.Continuum.Tests/Backends/Sdf/CirPrismaticConvexPolyhedronMirrorTests.cs
index b98c6bf5..7c2127cd 100644
--- a/Aetheris.Kernel.Core.Tests/Cir/CirPrismaticConvexPolyhedronMirrorTests.cs
+++ b/Aetheris.Continuum.Tests/Backends/Sdf/CirPrismaticConvexPolyhedronMirrorTests.cs
@@ -1,8 +1,8 @@
using Aetheris.Kernel.Core.Brep.Prismatic;
-using Aetheris.Kernel.Core.Cir.Mirrors;
+using Aetheris.Continuum.Mirrors;
using Aetheris.Kernel.Core.Math;
-namespace Aetheris.Kernel.Core.Tests.Cir;
+namespace Aetheris.Continuum.Tests.Backends.Sdf;
public sealed class CirPrismaticConvexPolyhedronMirrorTests
{
diff --git a/Aetheris.Kernel.Core.Tests/Cir/CirRegionPlannerTests.cs b/Aetheris.Continuum.Tests/Backends/Sdf/CirRegionPlannerTests.cs
similarity index 97%
rename from Aetheris.Kernel.Core.Tests/Cir/CirRegionPlannerTests.cs
rename to Aetheris.Continuum.Tests/Backends/Sdf/CirRegionPlannerTests.cs
index e8703fb6..7fd92309 100644
--- a/Aetheris.Kernel.Core.Tests/Cir/CirRegionPlannerTests.cs
+++ b/Aetheris.Continuum.Tests/Backends/Sdf/CirRegionPlannerTests.cs
@@ -1,8 +1,8 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Math;
using Aetheris.Kernel.Core.Numerics;
-namespace Aetheris.Kernel.Core.Tests.Cir;
+namespace Aetheris.Continuum.Tests.Backends.Sdf;
public sealed class CirRegionPlannerTests
{
diff --git a/Aetheris.Kernel.Core.Tests/Cir/CirTapeEvaluationTests.cs b/Aetheris.Continuum.Tests/Backends/Sdf/CirTapeEvaluationTests.cs
similarity index 98%
rename from Aetheris.Kernel.Core.Tests/Cir/CirTapeEvaluationTests.cs
rename to Aetheris.Continuum.Tests/Backends/Sdf/CirTapeEvaluationTests.cs
index a519629a..97f71055 100644
--- a/Aetheris.Kernel.Core.Tests/Cir/CirTapeEvaluationTests.cs
+++ b/Aetheris.Continuum.Tests/Backends/Sdf/CirTapeEvaluationTests.cs
@@ -1,8 +1,8 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Math;
using Aetheris.Kernel.Core.Numerics;
-namespace Aetheris.Kernel.Core.Tests.Cir;
+namespace Aetheris.Continuum.Tests.Backends.Sdf;
public sealed class CirTapeEvaluationTests
{
diff --git a/Aetheris.Kernel.Core.Tests/Cir/CirTapeIntervalEvaluationTests.cs b/Aetheris.Continuum.Tests/Backends/Sdf/CirTapeIntervalEvaluationTests.cs
similarity index 97%
rename from Aetheris.Kernel.Core.Tests/Cir/CirTapeIntervalEvaluationTests.cs
rename to Aetheris.Continuum.Tests/Backends/Sdf/CirTapeIntervalEvaluationTests.cs
index 8273d1b0..b6ef93fd 100644
--- a/Aetheris.Kernel.Core.Tests/Cir/CirTapeIntervalEvaluationTests.cs
+++ b/Aetheris.Continuum.Tests/Backends/Sdf/CirTapeIntervalEvaluationTests.cs
@@ -1,8 +1,8 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Math;
using Aetheris.Kernel.Core.Numerics;
-namespace Aetheris.Kernel.Core.Tests.Cir;
+namespace Aetheris.Continuum.Tests.Backends.Sdf;
public sealed class CirTapeIntervalEvaluationTests
{
diff --git a/Aetheris.Kernel.Core.Tests/Cir/PrismaticHybridMapDispatchPrototypeTests.cs b/Aetheris.Continuum.Tests/Backends/Sdf/PrismaticHybridMapDispatchPrototypeTests.cs
similarity index 99%
rename from Aetheris.Kernel.Core.Tests/Cir/PrismaticHybridMapDispatchPrototypeTests.cs
rename to Aetheris.Continuum.Tests/Backends/Sdf/PrismaticHybridMapDispatchPrototypeTests.cs
index a25eb630..3f83013c 100644
--- a/Aetheris.Kernel.Core.Tests/Cir/PrismaticHybridMapDispatchPrototypeTests.cs
+++ b/Aetheris.Continuum.Tests/Backends/Sdf/PrismaticHybridMapDispatchPrototypeTests.cs
@@ -1,9 +1,9 @@
using Aetheris.Kernel.Core.Brep;
using Aetheris.Kernel.Core.Brep.Prismatic;
-using Aetheris.Kernel.Core.Cir;
-using Aetheris.Kernel.Core.Cir.Mirrors;
+using Aetheris.Continuum.Backends.Sdf;
+using Aetheris.Continuum.Mirrors;
-namespace Aetheris.Kernel.Core.Tests.Cir;
+namespace Aetheris.Continuum.Tests.Backends.Sdf;
public sealed class PrismaticHybridMapDispatchPrototypeTests
{
diff --git a/Aetheris.Kernel.Core.Tests/Air/AirCirMirrorAdapterTests.cs b/Aetheris.Continuum.Tests/Bridges/Air/AirCirMirrorAdapterTests.cs
similarity index 98%
rename from Aetheris.Kernel.Core.Tests/Air/AirCirMirrorAdapterTests.cs
rename to Aetheris.Continuum.Tests/Bridges/Air/AirCirMirrorAdapterTests.cs
index 70bf961a..5bbeb581 100644
--- a/Aetheris.Kernel.Core.Tests/Air/AirCirMirrorAdapterTests.cs
+++ b/Aetheris.Continuum.Tests/Bridges/Air/AirCirMirrorAdapterTests.cs
@@ -1,9 +1,10 @@
using Aetheris.Kernel.Core.Air;
+using Aetheris.Continuum.Bridges.Air;
using Aetheris.Kernel.Core.Air.BRepPlan;
using Aetheris.Kernel.Core.Brep.Prismatic;
-using Aetheris.Kernel.Core.Cir.Mirrors;
+using Aetheris.Continuum.Mirrors;
-namespace Aetheris.Kernel.Core.Tests.Air;
+namespace Aetheris.Continuum.Tests.Bridges.Air;
public sealed class AirCirMirrorAdapterTests
{
diff --git a/Aetheris.Continuum.Tests/Lattice/LatticeAndFixtureTests.cs b/Aetheris.Continuum.Tests/Lattice/LatticeAndFixtureTests.cs
new file mode 100644
index 00000000..4e4295ac
--- /dev/null
+++ b/Aetheris.Continuum.Tests/Lattice/LatticeAndFixtureTests.cs
@@ -0,0 +1,98 @@
+using Aetheris.Continuum.Backends.Sdf;
+using Aetheris.Continuum.Cir;
+using Aetheris.Continuum.Diagnostics;
+using Aetheris.Continuum.Experiments;
+using Aetheris.Continuum.Lattice;
+using Aetheris.Continuum.Regions.Analytic;
+using Aetheris.Kernel.Core.Math;
+
+namespace Aetheris.Continuum.Tests.Lattice;
+
+public sealed class LatticeAndFixtureTests
+{
+ [Fact]
+ public void CirContract_DoesNotRequireSignedDistance()
+ {
+ IContinuumRegion region = new AxisAlignedBoxRegion(
+ new RegionId("box"),
+ new BoundingBox3D(new Point3D(-1d, -1d, -1d), new Point3D(1d, 1d, 1d)));
+
+ Assert.True(region.Contains(Point3D.Origin));
+ Assert.False(region is ISignedDistanceCapability);
+ }
+
+ [Fact]
+ public void SdfBackend_AdaptsPreservedNodeAndTapeToCirCapabilities()
+ {
+ IContinuumRegion region = new SdfContinuumRegion(new RegionId("sphere"), new CirSphereNode(1d));
+
+ Assert.Equal(ContinuumPointClassification.Inside, region.Classify(Point3D.Origin));
+ Assert.IsAssignableFrom<ISignedDistanceCapability>(region);
+ Assert.IsAssignableFrom<IGradientCapability>(region);
+ Assert.IsAssignableFrom<IBoundsClassificationCapability>(region);
+ }
+
+ [Fact]
+ public void Lattice_UsesDeterministicRowMajorCellIndexingAndBounds()
+ {
+ var spec = new LatticeSpec(
+ new BoundingBox3D(Point3D.Origin, new Point3D(4d, 2d, 1d)),
+ 4,
+ 2,
+ 1);
+
+ var index = new CellIndex(3, 1, 0);
+ Assert.Equal(7, index.Flatten(spec));
+ Assert.Equal(new Vector3D(1d, 1d, 1d), spec.CellSize);
+ Assert.Equal(new Point3D(3.5d, 1.5d, 0.5d), spec.CellCenter(index));
+ }
+
+ [Fact]
+ public void AlignedBox_ProducesOnlyInsideAndOutsideCells()
+ {
+ var result = ContinuumM0Experiments.Box();
+
+ Assert.Equal(64, result.TotalCells);
+ Assert.Equal(8, result.Grid.InsideCellCount);
+ Assert.Equal(56, result.Grid.OutsideCellCount);
+ Assert.Equal(0, result.CutCells);
+ Assert.Equal(8d, result.EstimatedVolume, 12);
+ }
+
+ [Fact]
+ public void AngledPlane_ProducesExplicitCutCellsAndExactSymmetricCoverage()
+ {
+ var result = ContinuumM0Experiments.AngledPlane();
+
+ Assert.True(result.Grid.InsideCellCount > 0);
+ Assert.True(result.Grid.OutsideCellCount > 0);
+ Assert.True(result.CutCells > 0);
+ Assert.Equal(result.ExactVolume, result.EstimatedVolume, 12);
+ Assert.All(result.Grid.CutCells, cut => Assert.Contains(cut.BoundaryReferences, boundary => boundary.SourceId.EndsWith("oblique-plane", StringComparison.Ordinal)));
+ }
+
+ [Fact]
+ public void CylindricalHole_RefinementReducesVolumeErrorWithoutChangingRegularTopology()
+ {
+ var results = ContinuumM0Experiments.CylindricalHoleConvergence();
+
+ Assert.Equal([8, 16, 32], results.Select(result => result.Resolution));
+ Assert.All(results, result => Assert.True(result.CutCells > 0));
+ Assert.All(results, result => Assert.True(result.Grid.InsideCellCount > result.CutCells));
+ Assert.True(results[^1].RelativeVolumeError < results[0].RelativeVolumeError);
+ Assert.Equal(results.Select(result => result.Grid.Lattice.CellSize.X), results.Select(result => result.Grid.Lattice.CellSize.Y));
+ }
+
+ [Fact]
+ public void GridDiagnostics_ExposeDimensionsStatesCutIndicesAndCoverageDeterministically()
+ {
+ var result = ContinuumM0Experiments.CylindricalHole(8);
+ var first = ContinuumGridDiagnostics.ToJson(result.Grid);
+ var second = ContinuumGridDiagnostics.ToJson(result.Grid);
+
+ Assert.Equal(first, second);
+ Assert.Contains("\"cutCells\"", first, StringComparison.Ordinal);
+ Assert.Contains("\"geometrySamples\"", first, StringComparison.Ordinal);
+ Assert.Contains("\"OccupancyEstimate\"", first, StringComparison.Ordinal);
+ }
+}
diff --git a/Aetheris.Continuum/Aetheris.Continuum.csproj b/Aetheris.Continuum/Aetheris.Continuum.csproj
new file mode 100644
index 00000000..c4134034
--- /dev/null
+++ b/Aetheris.Continuum/Aetheris.Continuum.csproj
@@ -0,0 +1,11 @@
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <TargetFramework>net10.0</TargetFramework>
+ <ImplicitUsings>enable</ImplicitUsings>
+ <Nullable>enable</Nullable>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\Aetheris.Kernel.Core\Aetheris.Kernel.Core.csproj" />
+ </ItemGroup>
+</Project>
diff --git a/Aetheris.Kernel.Core/Cir/CirAdaptiveVolumeEstimator.cs b/Aetheris.Continuum/Backends/Sdf/CirAdaptiveVolumeEstimator.cs
similarity index 99%
rename from Aetheris.Kernel.Core/Cir/CirAdaptiveVolumeEstimator.cs
rename to Aetheris.Continuum/Backends/Sdf/CirAdaptiveVolumeEstimator.cs
index 1142e9b4..a592fafe 100644
--- a/Aetheris.Kernel.Core/Cir/CirAdaptiveVolumeEstimator.cs
+++ b/Aetheris.Continuum/Backends/Sdf/CirAdaptiveVolumeEstimator.cs
@@ -1,7 +1,7 @@
using Aetheris.Kernel.Core.Math;
using Aetheris.Kernel.Core.Numerics;
-namespace Aetheris.Kernel.Core.Cir;
+namespace Aetheris.Continuum.Backends.Sdf;
public sealed record CirAdaptiveVolumeOptions(
int MaxDepth = 6,
diff --git a/Aetheris.Kernel.Core/Cir/CirAnalysis.cs b/Aetheris.Continuum/Backends/Sdf/CirAnalysis.cs
similarity index 95%
rename from Aetheris.Kernel.Core/Cir/CirAnalysis.cs
rename to Aetheris.Continuum/Backends/Sdf/CirAnalysis.cs
index 7fb0fdcf..c152e7cf 100644
--- a/Aetheris.Kernel.Core/Cir/CirAnalysis.cs
+++ b/Aetheris.Continuum/Backends/Sdf/CirAnalysis.cs
@@ -1,6 +1,6 @@
using Aetheris.Kernel.Core.Math;
-namespace Aetheris.Kernel.Core.Cir;
+namespace Aetheris.Continuum.Backends.Sdf;
public enum CirPointClassification
{
diff --git a/Aetheris.Kernel.Core/Cir/CirNode.cs b/Aetheris.Continuum/Backends/Sdf/CirNode.cs
similarity index 95%
rename from Aetheris.Kernel.Core/Cir/CirNode.cs
rename to Aetheris.Continuum/Backends/Sdf/CirNode.cs
index e5c4cf8c..b23acfdc 100644
--- a/Aetheris.Kernel.Core/Cir/CirNode.cs
+++ b/Aetheris.Continuum/Backends/Sdf/CirNode.cs
@@ -1,6 +1,6 @@
using Aetheris.Kernel.Core.Math;
-namespace Aetheris.Kernel.Core.Cir;
+namespace Aetheris.Continuum.Backends.Sdf;
public enum CirNodeKind
{
diff --git a/Aetheris.Kernel.Core/Cir/CirNodes.cs b/Aetheris.Continuum/Backends/Sdf/CirNodes.cs
similarity index 99%
rename from Aetheris.Kernel.Core/Cir/CirNodes.cs
rename to Aetheris.Continuum/Backends/Sdf/CirNodes.cs
index 18406cb7..e93ecca9 100644
--- a/Aetheris.Kernel.Core/Cir/CirNodes.cs
+++ b/Aetheris.Continuum/Backends/Sdf/CirNodes.cs
@@ -1,7 +1,7 @@
using System.Linq;
using Aetheris.Kernel.Core.Math;
-namespace Aetheris.Kernel.Core.Cir;
+namespace Aetheris.Continuum.Backends.Sdf;
public sealed record CirBoxNode(double Width, double Height, double Depth) : CirNode(CirNodeKind.Box)
{
diff --git a/Aetheris.Kernel.Core/Cir/CirRegionPlanner.cs b/Aetheris.Continuum/Backends/Sdf/CirRegionPlanner.cs
similarity index 99%
rename from Aetheris.Kernel.Core/Cir/CirRegionPlanner.cs
rename to Aetheris.Continuum/Backends/Sdf/CirRegionPlanner.cs
index cec3c912..27fec66d 100644
--- a/Aetheris.Kernel.Core/Cir/CirRegionPlanner.cs
+++ b/Aetheris.Continuum/Backends/Sdf/CirRegionPlanner.cs
@@ -1,7 +1,7 @@
using Aetheris.Kernel.Core.Judgment;
using Aetheris.Kernel.Core.Numerics;
-namespace Aetheris.Kernel.Core.Cir;
+namespace Aetheris.Continuum.Backends.Sdf;
public enum CirRegionPlanAction
{
diff --git a/Aetheris.Kernel.Core/Cir/CirTape.cs b/Aetheris.Continuum/Backends/Sdf/CirTape.cs
similarity index 99%
rename from Aetheris.Kernel.Core/Cir/CirTape.cs
rename to Aetheris.Continuum/Backends/Sdf/CirTape.cs
index 457e369a..64deec0d 100644
--- a/Aetheris.Kernel.Core/Cir/CirTape.cs
+++ b/Aetheris.Continuum/Backends/Sdf/CirTape.cs
@@ -1,7 +1,7 @@
using Aetheris.Kernel.Core.Math;
using Aetheris.Kernel.Core.Numerics;
-namespace Aetheris.Kernel.Core.Cir;
+namespace Aetheris.Continuum.Backends.Sdf;
public enum CirTapeOpCode
{
diff --git a/Aetheris.Continuum/Backends/Sdf/SdfContinuumRegion.cs b/Aetheris.Continuum/Backends/Sdf/SdfContinuumRegion.cs
new file mode 100644
index 00000000..68cb8cb9
--- /dev/null
+++ b/Aetheris.Continuum/Backends/Sdf/SdfContinuumRegion.cs
@@ -0,0 +1,65 @@
+using Aetheris.Continuum.Cir;
+using Aetheris.Kernel.Core.Math;
+using Aetheris.Kernel.Core.Numerics;
+
+namespace Aetheris.Continuum.Backends.Sdf;
+
+/// <summary>Adapts the preserved SDF node/tape runtime to the broader CIR occupancy contract.</summary>
+public sealed class SdfContinuumRegion : IContinuumRegion, ISignedDistanceCapability, IGradientCapability, IBoundsClassificationCapability
+{
+ private readonly CirTape tape;
+
+ public SdfContinuumRegion(RegionId id, CirNode root)
+ {
+ Id = id;
+ Root = root ?? throw new ArgumentNullException(nameof(root));
+ tape = CirTapeLowerer.Lower(root);
+ Bounds = new BoundingBox3D(root.Bounds.Min, root.Bounds.Max);
+ }
+
+ public RegionId Id { get; }
+ public CirNode Root { get; }
+ public BoundingBox3D Bounds { get; }
+
+ public double SignedDistance(Point3D point) => tape.Evaluate(point);
+
+ public ContinuumPointClassification Classify(Point3D point, double tolerance = 1e-9d)
+ {
+ var value = SignedDistance(point);
+ return double.Abs(value) <= tolerance
+ ? ContinuumPointClassification.Boundary
+ : value < 0d
+ ? ContinuumPointClassification.Inside
+ : ContinuumPointClassification.Outside;
+ }
+
+ public ContinuumBoundsClassification ClassifyBounds(BoundingBox3D bounds, double tolerance = 1e-9d)
+ {
+ var interval = tape.EvaluateInterval(new CirBounds(bounds.Min, bounds.Max));
+ var center = new Point3D(
+ (bounds.Min.X + bounds.Max.X) * 0.5d,
+ (bounds.Min.Y + bounds.Max.Y) * 0.5d,
+ (bounds.Min.Z + bounds.Max.Z) * 0.5d);
+ if (interval.MaxValue <= tolerance && SignedDistance(center) <= 0d)
+ {
+ return ContinuumBoundsClassification.Inside;
+ }
+
+ if (interval.MinValue >= -tolerance && SignedDistance(center) > 0d)
+ {
+ return ContinuumBoundsClassification.Outside;
+ }
+
+ return ContinuumBoundsClassification.Cut;
+ }
+
+ public bool TryGradient(Point3D point, out Vector3D gradient)
+ {
+ const double h = 1e-6d;
+ gradient = new Vector3D(
+ (SignedDistance(new Point3D(point.X + h, point.Y, point.Z)) - SignedDistance(new Point3D(point.X - h, point.Y, point.Z))) / (2d * h),
+ (SignedDistance(new Point3D(point.X, point.Y + h, point.Z)) - SignedDistance(new Point3D(point.X, point.Y - h, point.Z))) / (2d * h),
+ (SignedDistance(new Point3D(point.X, point.Y, point.Z + h)) - SignedDistance(new Point3D(point.X, point.Y, point.Z - h))) / (2d * h));
+ return gradient.TryNormalize(out gradient, ToleranceContext.Default);
+ }
+}
diff --git a/Aetheris.Continuum/Boundaries/BoundaryReference.cs b/Aetheris.Continuum/Boundaries/BoundaryReference.cs
new file mode 100644
index 00000000..2e2db722
--- /dev/null
+++ b/Aetheris.Continuum/Boundaries/BoundaryReference.cs
@@ -0,0 +1,34 @@
+using Aetheris.Kernel.Core.Math;
+
+namespace Aetheris.Continuum.Boundaries;
+
+public sealed record BoundaryReference(
+ string SourceRepresentation,
+ string SourceId,
+ string? ExactBrepFaceId = null,
+ string? SemanticRegion = null);
+
+public interface IBoundaryReferenceCapability
+{
+ IReadOnlyList<BoundaryReference> BoundaryCandidates(BoundingBox3D cellBounds);
+}
+
+/// <summary>
+/// M1 seam for a derived local boundary cache. Implementations are never exact geometry authority.
+/// </summary>
+public interface IBoundaryOffsetMap
+{
+ BoundaryReference SourceBoundary { get; }
+
+ BoundaryLocalFrame LocalFrame { get; }
+
+ IReadOnlyList<BoundaryOffsetSample> Samples { get; }
+
+ BoundaryApproximationMetadata Approximation { get; }
+}
+
+public readonly record struct BoundaryLocalFrame(Point3D Origin, Vector3D Normal, Vector3D TangentU, Vector3D TangentV);
+
+public readonly record struct BoundaryOffsetSample(double U, double V, double Offset, Vector3D? Normal = null);
+
+public sealed record BoundaryApproximationMetadata(double? MaximumError, string Method, int Version = 1);
diff --git a/Aetheris.Kernel.Core/Air/AirCirMirrorAdapter.cs b/Aetheris.Continuum/Bridges/Air/AirCirMirrorAdapter.cs
similarity index 99%
rename from Aetheris.Kernel.Core/Air/AirCirMirrorAdapter.cs
rename to Aetheris.Continuum/Bridges/Air/AirCirMirrorAdapter.cs
index 8ba098a2..0eb27e60 100644
--- a/Aetheris.Kernel.Core/Air/AirCirMirrorAdapter.cs
+++ b/Aetheris.Continuum/Bridges/Air/AirCirMirrorAdapter.cs
@@ -1,8 +1,9 @@
using Aetheris.Kernel.Core.Brep.Prismatic;
+using Aetheris.Kernel.Core.Air;
using Aetheris.Kernel.Core.Air.BRepPlan;
-using Aetheris.Kernel.Core.Cir.Mirrors;
+using Aetheris.Continuum.Mirrors;
-namespace Aetheris.Kernel.Core.Air;
+namespace Aetheris.Continuum.Bridges.Air;
[Flags]
internal enum AirCirMirrorCapability
diff --git a/Aetheris.Continuum/Cir/ContinuumRegion.cs b/Aetheris.Continuum/Cir/ContinuumRegion.cs
new file mode 100644
index 00000000..d32c24cd
--- /dev/null
+++ b/Aetheris.Continuum/Cir/ContinuumRegion.cs
@@ -0,0 +1,69 @@
+using Aetheris.Kernel.Core.Math;
+
+namespace Aetheris.Continuum.Cir;
+
+public readonly record struct RegionId(string Value)
+{
+ public override string ToString() => Value;
+}
+
+public sealed record MaterialRegion(RegionId Id, string Name, string? SemanticRegion = null);
+
+public enum ContinuumPointClassification
+{
+ Outside,
+ Boundary,
+ Inside,
+}
+
+public enum ContinuumBoundsClassification
+{
+ Outside,
+ Inside,
+ Cut,
+}
+
+/// <summary>An occupied material continuum. Occupancy is the only fundamental CIR query.</summary>
+public interface IContinuumRegion
+{
+ RegionId Id { get; }
+
+ BoundingBox3D Bounds { get; }
+
+ ContinuumPointClassification Classify(Point3D point, double tolerance = 1e-9d);
+
+ bool Contains(Point3D point, double tolerance = 1e-9d) =>
+ Classify(point, tolerance) != ContinuumPointClassification.Outside;
+}
+
+public interface ISignedDistanceCapability
+{
+ double SignedDistance(Point3D point);
+}
+
+public interface IGradientCapability
+{
+ bool TryGradient(Point3D point, out Vector3D gradient);
+}
+
+public readonly record struct BoundaryProjection(
+ Point3D Point,
+ Vector3D? Normal,
+ double Distance,
+ string? BoundaryId = null);
+
+public interface IBoundaryProjectionCapability
+{
+ bool TryProjectToBoundary(Point3D point, out BoundaryProjection projection);
+}
+
+public interface IMaterialRegionCapability
+{
+ MaterialRegion? MaterialRegionAt(Point3D point);
+}
+
+/// <summary>Optional conservative or exact classification of an axis-aligned spatial cell.</summary>
+public interface IBoundsClassificationCapability
+{
+ ContinuumBoundsClassification ClassifyBounds(BoundingBox3D bounds, double tolerance = 1e-9d);
+}
diff --git a/Aetheris.Continuum/Diagnostics/ContinuumGridDiagnostics.cs b/Aetheris.Continuum/Diagnostics/ContinuumGridDiagnostics.cs
new file mode 100644
index 00000000..47610889
--- /dev/null
+++ b/Aetheris.Continuum/Diagnostics/ContinuumGridDiagnostics.cs
@@ -0,0 +1,42 @@
+using System.Text.Json;
+using System.Text.Json.Serialization;
+using Aetheris.Continuum.Lattice;
+
+namespace Aetheris.Continuum.Diagnostics;
+
+public static class ContinuumGridDiagnostics
+{
+ private static readonly JsonSerializerOptions Options = new()
+ {
+ WriteIndented = true,
+ Converters = { new JsonStringEnumConverter() },
+ };
+
+ public static string ToJson(ContinuumGridResult result) => JsonSerializer.Serialize(new
+ {
+ regionId = result.RegionId.Value,
+ lattice = new
+ {
+ result.Lattice.CountX,
+ result.Lattice.CountY,
+ result.Lattice.CountZ,
+ result.Lattice.TotalCellCount,
+ result.Lattice.CellSize,
+ },
+ counts = new
+ {
+ inside = result.InsideCellCount,
+ outside = result.OutsideCellCount,
+ cut = result.CutCellCount,
+ geometrySamples = result.GeometrySampleCount,
+ },
+ result.EstimatedOccupiedVolume,
+ cells = result.Cells.Select(cell => new { cell.Index, cell.Classification, cell.OccupancyEstimate }),
+ cutCells = result.CutCells.Select(cell => new
+ {
+ cell.Index,
+ cell.OccupancyEstimate,
+ boundaryReferences = cell.BoundaryReferences,
+ }),
+ }, Options);
+}
diff --git a/Aetheris.Continuum/Experiments/ContinuumM0Experiments.cs b/Aetheris.Continuum/Experiments/ContinuumM0Experiments.cs
new file mode 100644
index 00000000..3a5dd38d
--- /dev/null
+++ b/Aetheris.Continuum/Experiments/ContinuumM0Experiments.cs
@@ -0,0 +1,73 @@
+using Aetheris.Continuum.Cir;
+using Aetheris.Continuum.Lattice;
+using Aetheris.Continuum.Regions.Analytic;
+using Aetheris.Kernel.Core.Math;
+
+namespace Aetheris.Continuum.Experiments;
+
+public sealed record ContinuumExperimentResult(
+ string Name,
+ int Resolution,
+ ContinuumGridResult Grid,
+ double ExactVolume,
+ double RelativeVolumeError,
+ double? ExactBoundaryArea = null,
+ double? EstimatedBoundaryArea = null)
+{
+ public int TotalCells => Grid.Lattice.TotalCellCount;
+ public int CutCells => Grid.CutCellCount;
+ public int GeometrySamples => Grid.GeometrySampleCount;
+ public double EstimatedVolume => Grid.EstimatedOccupiedVolume;
+}
+
+public static class ContinuumM0Experiments
+{
+ public static ContinuumExperimentResult Box(int cellsPerAxis = 4)
+ {
+ var region = new AxisAlignedBoxRegion(
+ new RegionId("m0-box"),
+ new BoundingBox3D(new Point3D(-1d, -1d, -1d), new Point3D(1d, 1d, 1d)));
+ var lattice = new LatticeSpec(
+ new BoundingBox3D(new Point3D(-2d, -2d, -2d), new Point3D(2d, 2d, 2d)),
+ cellsPerAxis,
+ cellsPerAxis,
+ cellsPerAxis);
+ return Result("axis-aligned-box", cellsPerAxis, ContinuumGridClassifier.Classify(region, lattice, 2), region.ExactVolume, region.ExactBoundaryArea);
+ }
+
+ public static ContinuumExperimentResult AngledPlane(int cellsPerAxis = 8, int samplesPerAxis = 2)
+ {
+ var bounds = new BoundingBox3D(new Point3D(-1d, -1d, -1d), new Point3D(1d, 1d, 1d));
+ var region = new ObliqueHalfSpaceRegion(new RegionId("m0-angled-plane"), bounds, new Vector3D(1d, 1d, 0d), 0d);
+ var lattice = new LatticeSpec(bounds, cellsPerAxis, cellsPerAxis, cellsPerAxis);
+ var exactVolume = 4d;
+ return Result("angled-plane", cellsPerAxis, ContinuumGridClassifier.Classify(region, lattice, samplesPerAxis), exactVolume);
+ }
+
+ public static ContinuumExperimentResult CylindricalHole(int planarResolution, int samplesPerAxis = 4)
+ {
+ if (planarResolution < 4 || planarResolution % 4 != 0)
+ {
+ throw new ArgumentOutOfRangeException(nameof(planarResolution), "Resolution must be >= 4 and divisible by four so cells remain cubic.");
+ }
+
+ var bounds = new BoundingBox3D(new Point3D(-2d, -2d, -0.5d), new Point3D(2d, 2d, 0.5d));
+ var region = new BlockWithCylindricalHoleRegion(new RegionId("m0-cylindrical-hole"), bounds, 1d);
+ var lattice = new LatticeSpec(bounds, planarResolution, planarResolution, planarResolution / 4);
+ return Result("cylindrical-hole", planarResolution, ContinuumGridClassifier.Classify(region, lattice, samplesPerAxis), region.ExactVolume, region.ExactBoundaryArea);
+ }
+
+ public static IReadOnlyList<ContinuumExperimentResult> CylindricalHoleConvergence() =>
+ [CylindricalHole(8), CylindricalHole(16), CylindricalHole(32)];
+
+ private static ContinuumExperimentResult Result(
+ string name,
+ int resolution,
+ ContinuumGridResult grid,
+ double exactVolume,
+ double? exactBoundaryArea = null)
+ {
+ var relativeError = double.Abs(grid.EstimatedOccupiedVolume - exactVolume) / exactVolume;
+ return new ContinuumExperimentResult(name, resolution, grid, exactVolume, relativeError, exactBoundaryArea);
+ }
+}
diff --git a/Aetheris.Continuum/Lattice/ContinuumGrid.cs b/Aetheris.Continuum/Lattice/ContinuumGrid.cs
new file mode 100644
index 00000000..2bac715b
--- /dev/null
+++ b/Aetheris.Continuum/Lattice/ContinuumGrid.cs
@@ -0,0 +1,126 @@
+using Aetheris.Continuum.Boundaries;
+using Aetheris.Continuum.Cir;
+using Aetheris.Continuum.Sampling;
+using Aetheris.Kernel.Core.Judgment;
+using Aetheris.Kernel.Core.Math;
+
+namespace Aetheris.Continuum.Lattice;
+
+public enum CellClassification
+{
+ Outside,
+ Inside,
+ Cut,
+}
+
+public sealed record CutCell(
+ CellIndex Index,
+ BoundingBox3D Bounds,
+ RegionId ContinuumRegionId,
+ IReadOnlyList<BoundaryReference> BoundaryReferences,
+ GeometrySamplePlan GeometrySamplePlan,
+ double OccupancyEstimate);
+
+public readonly record struct ContinuumCell(CellIndex Index, BoundingBox3D Bounds, CellClassification Classification, double OccupancyEstimate);
+
+public sealed record ContinuumGridResult(
+ LatticeSpec Lattice,
+ RegionId RegionId,
+ IReadOnlyList<ContinuumCell> Cells,
+ IReadOnlyList<CutCell> CutCells,
+ int GeometrySampleCount,
+ double EstimatedOccupiedVolume)
+{
+ public int InsideCellCount => Cells.Count(cell => cell.Classification == CellClassification.Inside);
+ public int OutsideCellCount => Cells.Count(cell => cell.Classification == CellClassification.Outside);
+ public int CutCellCount => CutCells.Count;
+}
+
+public static class ContinuumGridClassifier
+{
+ private readonly record struct StrategyContext(IContinuumRegion Region, BoundingBox3D Bounds);
+
+ private static readonly JudgmentEngine<StrategyContext> StrategyEngine = new();
+ private static readonly IReadOnlyList<JudgmentCandidate<StrategyContext>> Strategies =
+ [
+ new JudgmentCandidate<StrategyContext>(
+ "backend-bounds-capability",
+ context => context.Region is IBoundsClassificationCapability,
+ _ => 100d,
+ _ => "Region does not expose bounded cell classification.",
+ 0),
+ new JudgmentCandidate<StrategyContext>(
+ "conservative-bounds-fallback",
+ _ => true,
+ _ => 10d,
+ _ => "Fallback is always admissible.",
+ 1),
+ ];
+
+ public static ContinuumGridResult Classify(IContinuumRegion region, LatticeSpec lattice, int cutCellSamplesPerAxis = 2)
+ {
+ ArgumentNullException.ThrowIfNull(region);
+ ArgumentNullException.ThrowIfNull(lattice);
+ var cells = new List<ContinuumCell>(lattice.TotalCellCount);
+ var cutCells = new List<CutCell>();
+ var sampleCount = 0;
+ var volume = 0d;
+ var size = lattice.CellSize;
+ var cellVolume = size.X * size.Y * size.Z;
+
+ foreach (var index in lattice.Indices())
+ {
+ var bounds = lattice.CellBounds(index);
+ var classification = ClassifyCell(region, bounds);
+ if (classification == CellClassification.Inside)
+ {
+ cells.Add(new ContinuumCell(index, bounds, classification, 1d));
+ volume += cellVolume;
+ continue;
+ }
+
+ if (classification == CellClassification.Outside)
+ {
+ cells.Add(new ContinuumCell(index, bounds, classification, 0d));
+ continue;
+ }
+
+ var plan = GeometrySampler.Sample(region, bounds, cutCellSamplesPerAxis);
+ sampleCount += plan.GeometrySampleCount;
+ volume += cellVolume * plan.CoverageEstimate;
+ cells.Add(new ContinuumCell(index, bounds, classification, plan.CoverageEstimate));
+ cutCells.Add(new CutCell(index, bounds, region.Id, plan.BoundaryCandidates, plan, plan.CoverageEstimate));
+ }
+
+ return new ContinuumGridResult(lattice, region.Id, cells, cutCells, sampleCount, volume);
+ }
+
+ private static CellClassification ClassifyCell(IContinuumRegion region, BoundingBox3D bounds)
+ {
+ var context = new StrategyContext(region, bounds);
+ var selection = StrategyEngine.Evaluate(context, Strategies);
+ if (!selection.IsSuccess)
+ {
+ return CellClassification.Cut;
+ }
+
+ if (selection.Selection!.Value.Candidate.Name == "backend-bounds-capability")
+ {
+ return ((IBoundsClassificationCapability)region).ClassifyBounds(bounds) switch
+ {
+ ContinuumBoundsClassification.Inside => CellClassification.Inside,
+ ContinuumBoundsClassification.Outside => CellClassification.Outside,
+ _ => CellClassification.Cut,
+ };
+ }
+
+ return HasPositiveVolumeIntersection(region.Bounds, bounds)
+ ? CellClassification.Cut
+ : CellClassification.Outside;
+ }
+
+ private static bool HasPositiveVolumeIntersection(BoundingBox3D left, BoundingBox3D right) =>
+ double.Min(left.Max.X, right.Max.X) > double.Max(left.Min.X, right.Min.X)
+ && double.Min(left.Max.Y, right.Max.Y) > double.Max(left.Min.Y, right.Min.Y)
+ && double.Min(left.Max.Z, right.Max.Z) > double.Max(left.Min.Z, right.Min.Z);
+}
diff --git a/Aetheris.Continuum/Lattice/LatticeSpec.cs b/Aetheris.Continuum/Lattice/LatticeSpec.cs
new file mode 100644
index 00000000..f0fbb7d5
--- /dev/null
+++ b/Aetheris.Continuum/Lattice/LatticeSpec.cs
@@ -0,0 +1,72 @@
+using Aetheris.Kernel.Core.Math;
+
+namespace Aetheris.Continuum.Lattice;
+
+public readonly record struct CellIndex(int I, int J, int K)
+{
+ public int Flatten(LatticeSpec spec) => ((K * spec.CountY) + J) * spec.CountX + I;
+}
+
+public sealed record LatticeSpec
+{
+ public LatticeSpec(BoundingBox3D bounds, int countX, int countY, int countZ)
+ {
+ if (countX < 1 || countY < 1 || countZ < 1)
+ {
+ throw new ArgumentOutOfRangeException(nameof(countX), "All lattice dimensions must be positive.");
+ }
+
+ Bounds = bounds;
+ CountX = countX;
+ CountY = countY;
+ CountZ = countZ;
+ }
+
+ public BoundingBox3D Bounds { get; }
+ public int CountX { get; }
+ public int CountY { get; }
+ public int CountZ { get; }
+ public int TotalCellCount => checked(CountX * CountY * CountZ);
+ public Vector3D CellSize => new(
+ (Bounds.Max.X - Bounds.Min.X) / CountX,
+ (Bounds.Max.Y - Bounds.Min.Y) / CountY,
+ (Bounds.Max.Z - Bounds.Min.Z) / CountZ);
+
+ public BoundingBox3D CellBounds(CellIndex index)
+ {
+ Validate(index);
+ var size = CellSize;
+ var min = new Point3D(
+ Bounds.Min.X + (index.I * size.X),
+ Bounds.Min.Y + (index.J * size.Y),
+ Bounds.Min.Z + (index.K * size.Z));
+ return new BoundingBox3D(min, min + size);
+ }
+
+ public Point3D CellCenter(CellIndex index)
+ {
+ var bounds = CellBounds(index);
+ return new Point3D(
+ (bounds.Min.X + bounds.Max.X) * 0.5d,
+ (bounds.Min.Y + bounds.Max.Y) * 0.5d,
+ (bounds.Min.Z + bounds.Max.Z) * 0.5d);
+ }
+
+ public IEnumerable<CellIndex> Indices()
+ {
+ for (var k = 0; k < CountZ; k++)
+ for (var j = 0; j < CountY; j++)
+ for (var i = 0; i < CountX; i++)
+ {
+ yield return new CellIndex(i, j, k);
+ }
+ }
+
+ private void Validate(CellIndex index)
+ {
+ if (index.I < 0 || index.I >= CountX || index.J < 0 || index.J >= CountY || index.K < 0 || index.K >= CountZ)
+ {
+ throw new ArgumentOutOfRangeException(nameof(index));
+ }
+ }
+}
diff --git a/Aetheris.Kernel.Core/Cir/Mirrors/CirConvexPolyhedronMirror.cs b/Aetheris.Continuum/Mirrors/CirConvexPolyhedronMirror.cs
similarity index 99%
rename from Aetheris.Kernel.Core/Cir/Mirrors/CirConvexPolyhedronMirror.cs
rename to Aetheris.Continuum/Mirrors/CirConvexPolyhedronMirror.cs
index c904a840..4504fe6b 100644
--- a/Aetheris.Kernel.Core/Cir/Mirrors/CirConvexPolyhedronMirror.cs
+++ b/Aetheris.Continuum/Mirrors/CirConvexPolyhedronMirror.cs
@@ -1,7 +1,8 @@
using Aetheris.Kernel.Core.Brep.Prismatic;
using Aetheris.Kernel.Core.Math;
+using Aetheris.Continuum.Backends.Sdf;
-namespace Aetheris.Kernel.Core.Cir.Mirrors;
+namespace Aetheris.Continuum.Mirrors;
internal enum CirConvexPointClassification
{
diff --git a/Aetheris.Kernel.Core/Cir/CirMirrorMetadata.cs b/Aetheris.Continuum/Mirrors/CirMirrorMetadata.cs
similarity index 99%
rename from Aetheris.Kernel.Core/Cir/CirMirrorMetadata.cs
rename to Aetheris.Continuum/Mirrors/CirMirrorMetadata.cs
index 73978d53..bbd1f518 100644
--- a/Aetheris.Kernel.Core/Cir/CirMirrorMetadata.cs
+++ b/Aetheris.Continuum/Mirrors/CirMirrorMetadata.cs
@@ -1,4 +1,4 @@
-namespace Aetheris.Kernel.Core.Cir.Mirrors;
+namespace Aetheris.Continuum.Mirrors;
internal enum CirMirrorStatus
{
diff --git a/Aetheris.Continuum/Properties/InternalsVisibleTo.cs b/Aetheris.Continuum/Properties/InternalsVisibleTo.cs
new file mode 100644
index 00000000..9de61050
--- /dev/null
+++ b/Aetheris.Continuum/Properties/InternalsVisibleTo.cs
@@ -0,0 +1,8 @@
+using System.Runtime.CompilerServices;
+
+[assembly: InternalsVisibleTo("Aetheris.Continuum.Tests")]
+[assembly: InternalsVisibleTo("Aetheris.Kernel.Firmament")]
+[assembly: InternalsVisibleTo("Aetheris.Kernel.Firmament.Tests")]
+[assembly: InternalsVisibleTo("Aetheris.Firmament.FrictionLab")]
+[assembly: InternalsVisibleTo("Aetheris.FrictionLab.Tests")]
+[assembly: InternalsVisibleTo("aetheris")]
diff --git a/Aetheris.Continuum/Regions/Analytic/AnalyticRegionMath.cs b/Aetheris.Continuum/Regions/Analytic/AnalyticRegionMath.cs
new file mode 100644
index 00000000..2c4f9ea1
--- /dev/null
+++ b/Aetheris.Continuum/Regions/Analytic/AnalyticRegionMath.cs
@@ -0,0 +1,38 @@
+using Aetheris.Continuum.Boundaries;
+using Aetheris.Continuum.Cir;
+using Aetheris.Kernel.Core.Math;
+
+namespace Aetheris.Continuum.Regions.Analytic;
+
+internal static class AnalyticRegionMath
+{
+ public static bool HasPositiveIntersection(BoundingBox3D left, BoundingBox3D right, double tolerance) =>
+ double.Min(left.Max.X, right.Max.X) - double.Max(left.Min.X, right.Min.X) > tolerance
+ && double.Min(left.Max.Y, right.Max.Y) - double.Max(left.Min.Y, right.Min.Y) > tolerance
+ && double.Min(left.Max.Z, right.Max.Z) - double.Max(left.Min.Z, right.Min.Z) > tolerance;
+
+ public static bool Contains(BoundingBox3D outer, BoundingBox3D inner, double tolerance) =>
+ inner.Min.X >= outer.Min.X - tolerance && inner.Max.X <= outer.Max.X + tolerance
+ && inner.Min.Y >= outer.Min.Y - tolerance && inner.Max.Y <= outer.Max.Y + tolerance
+ && inner.Min.Z >= outer.Min.Z - tolerance && inner.Max.Z <= outer.Max.Z + tolerance;
+
+ public static IReadOnlyList<BoundaryReference> BoxBoundaryCandidates(RegionId id, BoundingBox3D box, BoundingBox3D cell)
+ {
+ var candidates = new List<BoundaryReference>();
+ AddIfSpans(candidates, cell.Min.X, cell.Max.X, box.Min.X, new BoundaryReference("analytic", $"{id}:x-min"));
+ AddIfSpans(candidates, cell.Min.X, cell.Max.X, box.Max.X, new BoundaryReference("analytic", $"{id}:x-max"));
+ AddIfSpans(candidates, cell.Min.Y, cell.Max.Y, box.Min.Y, new BoundaryReference("analytic", $"{id}:y-min"));
+ AddIfSpans(candidates, cell.Min.Y, cell.Max.Y, box.Max.Y, new BoundaryReference("analytic", $"{id}:y-max"));
+ AddIfSpans(candidates, cell.Min.Z, cell.Max.Z, box.Min.Z, new BoundaryReference("analytic", $"{id}:z-min"));
+ AddIfSpans(candidates, cell.Min.Z, cell.Max.Z, box.Max.Z, new BoundaryReference("analytic", $"{id}:z-max"));
+ return candidates;
+ }
+
+ private static void AddIfSpans(List<BoundaryReference> candidates, double minimum, double maximum, double value, BoundaryReference reference)
+ {
+ if (minimum <= value && maximum >= value)
+ {
+ candidates.Add(reference);
+ }
+ }
+}
diff --git a/Aetheris.Continuum/Regions/Analytic/AxisAlignedBoxRegion.cs b/Aetheris.Continuum/Regions/Analytic/AxisAlignedBoxRegion.cs
new file mode 100644
index 00000000..8afac1ff
--- /dev/null
+++ b/Aetheris.Continuum/Regions/Analytic/AxisAlignedBoxRegion.cs
@@ -0,0 +1,58 @@
+using Aetheris.Continuum.Boundaries;
+using Aetheris.Continuum.Cir;
+using Aetheris.Kernel.Core.Math;
+
+namespace Aetheris.Continuum.Regions.Analytic;
+
+public sealed class AxisAlignedBoxRegion : IContinuumRegion, IBoundsClassificationCapability, IBoundaryReferenceCapability
+{
+ public AxisAlignedBoxRegion(RegionId id, BoundingBox3D bounds)
+ {
+ Id = id;
+ Bounds = bounds;
+ }
+
+ public RegionId Id { get; }
+ public BoundingBox3D Bounds { get; }
+ public double ExactVolume => (Bounds.Max.X - Bounds.Min.X) * (Bounds.Max.Y - Bounds.Min.Y) * (Bounds.Max.Z - Bounds.Min.Z);
+ public double ExactBoundaryArea
+ {
+ get
+ {
+ var x = Bounds.Max.X - Bounds.Min.X;
+ var y = Bounds.Max.Y - Bounds.Min.Y;
+ var z = Bounds.Max.Z - Bounds.Min.Z;
+ return 2d * ((x * y) + (x * z) + (y * z));
+ }
+ }
+
+ public ContinuumPointClassification Classify(Point3D point, double tolerance = 1e-9d)
+ {
+ if (point.X < Bounds.Min.X - tolerance || point.X > Bounds.Max.X + tolerance
+ || point.Y < Bounds.Min.Y - tolerance || point.Y > Bounds.Max.Y + tolerance
+ || point.Z < Bounds.Min.Z - tolerance || point.Z > Bounds.Max.Z + tolerance)
+ {
+ return ContinuumPointClassification.Outside;
+ }
+
+ var boundary = double.Abs(point.X - Bounds.Min.X) <= tolerance || double.Abs(point.X - Bounds.Max.X) <= tolerance
+ || double.Abs(point.Y - Bounds.Min.Y) <= tolerance || double.Abs(point.Y - Bounds.Max.Y) <= tolerance
+ || double.Abs(point.Z - Bounds.Min.Z) <= tolerance || double.Abs(point.Z - Bounds.Max.Z) <= tolerance;
+ return boundary ? ContinuumPointClassification.Boundary : ContinuumPointClassification.Inside;
+ }
+
+ public ContinuumBoundsClassification ClassifyBounds(BoundingBox3D bounds, double tolerance = 1e-9d)
+ {
+ if (!AnalyticRegionMath.HasPositiveIntersection(Bounds, bounds, tolerance))
+ {
+ return ContinuumBoundsClassification.Outside;
+ }
+
+ return AnalyticRegionMath.Contains(Bounds, bounds, tolerance)
+ ? ContinuumBoundsClassification.Inside
+ : ContinuumBoundsClassification.Cut;
+ }
+
+ public IReadOnlyList<BoundaryReference> BoundaryCandidates(BoundingBox3D cellBounds) =>
+ AnalyticRegionMath.BoxBoundaryCandidates(Id, Bounds, cellBounds);
+}
diff --git a/Aetheris.Continuum/Regions/Analytic/BlockWithCylindricalHoleRegion.cs b/Aetheris.Continuum/Regions/Analytic/BlockWithCylindricalHoleRegion.cs
new file mode 100644
index 00000000..29a029eb
--- /dev/null
+++ b/Aetheris.Continuum/Regions/Analytic/BlockWithCylindricalHoleRegion.cs
@@ -0,0 +1,118 @@
+using Aetheris.Continuum.Boundaries;
+using Aetheris.Continuum.Cir;
+using Aetheris.Kernel.Core.Math;
+
+namespace Aetheris.Continuum.Regions.Analytic;
+
+/// <summary>Axis-aligned block minus a Z-axis cylindrical through-hole.</summary>
+public sealed class BlockWithCylindricalHoleRegion : IContinuumRegion, IBoundsClassificationCapability, IBoundaryReferenceCapability
+{
+ public BlockWithCylindricalHoleRegion(RegionId id, BoundingBox3D blockBounds, double holeRadius, Point3D? holeCenter = null)
+ {
+ if (holeRadius <= 0d)
+ {
+ throw new ArgumentOutOfRangeException(nameof(holeRadius));
+ }
+
+ Id = id;
+ Bounds = blockBounds;
+ HoleRadius = holeRadius;
+ HoleCenter = holeCenter ?? new Point3D(
+ (blockBounds.Min.X + blockBounds.Max.X) * 0.5d,
+ (blockBounds.Min.Y + blockBounds.Max.Y) * 0.5d,
+ (blockBounds.Min.Z + blockBounds.Max.Z) * 0.5d);
+ }
+
+ public RegionId Id { get; }
+ public BoundingBox3D Bounds { get; }
+ public double HoleRadius { get; }
+ public Point3D HoleCenter { get; }
+ public double Height => Bounds.Max.Z - Bounds.Min.Z;
+ public double ExactVolume => ((Bounds.Max.X - Bounds.Min.X) * (Bounds.Max.Y - Bounds.Min.Y) * Height) - (double.Pi * HoleRadius * HoleRadius * Height);
+ public double ExactBoundaryArea
+ {
+ get
+ {
+ var x = Bounds.Max.X - Bounds.Min.X;
+ var y = Bounds.Max.Y - Bounds.Min.Y;
+ return (2d * ((x * y) + (x * Height) + (y * Height)))
+ - (2d * double.Pi * HoleRadius * HoleRadius)
+ + (2d * double.Pi * HoleRadius * Height);
+ }
+ }
+
+ public ContinuumPointClassification Classify(Point3D point, double tolerance = 1e-9d)
+ {
+ var block = new AxisAlignedBoxRegion(Id, Bounds).Classify(point, tolerance);
+ if (block == ContinuumPointClassification.Outside)
+ {
+ return block;
+ }
+
+ var dx = point.X - HoleCenter.X;
+ var dy = point.Y - HoleCenter.Y;
+ var radial = double.Sqrt((dx * dx) + (dy * dy));
+ if (radial < HoleRadius - tolerance)
+ {
+ return ContinuumPointClassification.Outside;
+ }
+
+ return block == ContinuumPointClassification.Boundary || double.Abs(radial - HoleRadius) <= tolerance
+ ? ContinuumPointClassification.Boundary
+ : ContinuumPointClassification.Inside;
+ }
+
+ public ContinuumBoundsClassification ClassifyBounds(BoundingBox3D bounds, double tolerance = 1e-9d)
+ {
+ if (!AnalyticRegionMath.HasPositiveIntersection(Bounds, bounds, tolerance))
+ {
+ return ContinuumBoundsClassification.Outside;
+ }
+
+ if (!AnalyticRegionMath.Contains(Bounds, bounds, tolerance))
+ {
+ return ContinuumBoundsClassification.Cut;
+ }
+
+ var minX = bounds.Min.X <= HoleCenter.X && bounds.Max.X >= HoleCenter.X
+ ? 0d
+ : double.Min(double.Abs(bounds.Min.X - HoleCenter.X), double.Abs(bounds.Max.X - HoleCenter.X));
+ var minY = bounds.Min.Y <= HoleCenter.Y && bounds.Max.Y >= HoleCenter.Y
+ ? 0d
+ : double.Min(double.Abs(bounds.Min.Y - HoleCenter.Y), double.Abs(bounds.Max.Y - HoleCenter.Y));
+ var minRadiusSquared = (minX * minX) + (minY * minY);
+ var maxRadiusSquared = new[]
+ {
+ RadiusSquared(bounds.Min.X, bounds.Min.Y),
+ RadiusSquared(bounds.Min.X, bounds.Max.Y),
+ RadiusSquared(bounds.Max.X, bounds.Min.Y),
+ RadiusSquared(bounds.Max.X, bounds.Max.Y),
+ }.Max();
+ var radiusSquared = HoleRadius * HoleRadius;
+ if (minRadiusSquared >= radiusSquared - tolerance)
+ {
+ return ContinuumBoundsClassification.Inside;
+ }
+
+ if (maxRadiusSquared <= radiusSquared + tolerance)
+ {
+ return ContinuumBoundsClassification.Outside;
+ }
+
+ return ContinuumBoundsClassification.Cut;
+ }
+
+ public IReadOnlyList<BoundaryReference> BoundaryCandidates(BoundingBox3D cellBounds)
+ {
+ var candidates = AnalyticRegionMath.BoxBoundaryCandidates(Id, Bounds, cellBounds).ToList();
+ candidates.Add(new BoundaryReference("analytic", $"{Id}:cylindrical-hole"));
+ return candidates;
+ }
+
+ private double RadiusSquared(double x, double y)
+ {
+ var dx = x - HoleCenter.X;
+ var dy = y - HoleCenter.Y;
+ return (dx * dx) + (dy * dy);
+ }
+}
diff --git a/Aetheris.Continuum/Regions/Analytic/ObliqueHalfSpaceRegion.cs b/Aetheris.Continuum/Regions/Analytic/ObliqueHalfSpaceRegion.cs
new file mode 100644
index 00000000..c1ade7eb
--- /dev/null
+++ b/Aetheris.Continuum/Regions/Analytic/ObliqueHalfSpaceRegion.cs
@@ -0,0 +1,100 @@
+using Aetheris.Continuum.Boundaries;
+using Aetheris.Continuum.Cir;
+using Aetheris.Kernel.Core.Math;
+
+namespace Aetheris.Continuum.Regions.Analytic;
+
+/// <summary>A bounded analytic half-space: points inside the support box with n·p &lt;= offset.</summary>
+public sealed class ObliqueHalfSpaceRegion : IContinuumRegion, IBoundsClassificationCapability, IBoundaryReferenceCapability, IGradientCapability
+{
+ public ObliqueHalfSpaceRegion(RegionId id, BoundingBox3D bounds, Vector3D normal, double offset)
+ {
+ if (!normal.TryNormalize(out var normalized))
+ {
+ throw new ArgumentOutOfRangeException(nameof(normal));
+ }
+
+ Id = id;
+ Bounds = bounds;
+ Normal = normalized;
+ Offset = offset;
+ }
+
+ public RegionId Id { get; }
+ public BoundingBox3D Bounds { get; }
+ public Vector3D Normal { get; }
+ public double Offset { get; }
+
+ public ContinuumPointClassification Classify(Point3D point, double tolerance = 1e-9d)
+ {
+ var support = new AxisAlignedBoxRegion(Id, Bounds).Classify(point, tolerance);
+ if (support == ContinuumPointClassification.Outside)
+ {
+ return support;
+ }
+
+ var value = EvaluatePlane(point);
+ return double.Abs(value) <= tolerance
+ ? ContinuumPointClassification.Boundary
+ : value < 0d
+ ? ContinuumPointClassification.Inside
+ : ContinuumPointClassification.Outside;
+ }
+
+ public ContinuumBoundsClassification ClassifyBounds(BoundingBox3D bounds, double tolerance = 1e-9d)
+ {
+ if (!AnalyticRegionMath.HasPositiveIntersection(Bounds, bounds, tolerance))
+ {
+ return ContinuumBoundsClassification.Outside;
+ }
+
+ if (!AnalyticRegionMath.Contains(Bounds, bounds, tolerance))
+ {
+ return ContinuumBoundsClassification.Cut;
+ }
+
+ var (minimum, maximum) = PlaneRange(bounds);
+ if (maximum <= tolerance)
+ {
+ return ContinuumBoundsClassification.Inside;
+ }
+
+ if (minimum >= -tolerance)
+ {
+ return ContinuumBoundsClassification.Outside;
+ }
+
+ return ContinuumBoundsClassification.Cut;
+ }
+
+ public bool TryGradient(Point3D point, out Vector3D gradient)
+ {
+ gradient = Normal;
+ return true;
+ }
+
+ public IReadOnlyList<BoundaryReference> BoundaryCandidates(BoundingBox3D cellBounds)
+ {
+ var candidates = AnalyticRegionMath.BoxBoundaryCandidates(Id, Bounds, cellBounds).ToList();
+ var range = PlaneRange(cellBounds);
+ if (range.Minimum <= 0d && range.Maximum >= 0d)
+ {
+ candidates.Add(new BoundaryReference("analytic", $"{Id}:oblique-plane"));
+ }
+
+ return candidates;
+ }
+
+ private double EvaluatePlane(Point3D point) => (Normal.X * point.X) + (Normal.Y * point.Y) + (Normal.Z * point.Z) - Offset;
+
+ private (double Minimum, double Maximum) PlaneRange(BoundingBox3D bounds)
+ {
+ var min = (Normal.X >= 0d ? Normal.X * bounds.Min.X : Normal.X * bounds.Max.X)
+ + (Normal.Y >= 0d ? Normal.Y * bounds.Min.Y : Normal.Y * bounds.Max.Y)
+ + (Normal.Z >= 0d ? Normal.Z * bounds.Min.Z : Normal.Z * bounds.Max.Z) - Offset;
+ var max = (Normal.X >= 0d ? Normal.X * bounds.Max.X : Normal.X * bounds.Min.X)
+ + (Normal.Y >= 0d ? Normal.Y * bounds.Max.Y : Normal.Y * bounds.Min.Y)
+ + (Normal.Z >= 0d ? Normal.Z * bounds.Max.Z : Normal.Z * bounds.Min.Z) - Offset;
+ return (min, max);
+ }
+}
diff --git a/Aetheris.Continuum/Sampling/GeometrySamplePlan.cs b/Aetheris.Continuum/Sampling/GeometrySamplePlan.cs
new file mode 100644
index 00000000..0fc2cb00
--- /dev/null
+++ b/Aetheris.Continuum/Sampling/GeometrySamplePlan.cs
@@ -0,0 +1,76 @@
+using Aetheris.Continuum.Boundaries;
+using Aetheris.Continuum.Cir;
+using Aetheris.Kernel.Core.Math;
+
+namespace Aetheris.Continuum.Sampling;
+
+public enum GeometrySamplePattern
+{
+ SubcellCenters,
+}
+
+public readonly record struct GeometrySample(Point3D Position, ContinuumPointClassification Classification)
+{
+ public bool IsMaterial => Classification != ContinuumPointClassification.Outside;
+}
+
+/// <summary>Geometry-only occupancy evidence. This is not solver quadrature.</summary>
+public sealed record GeometrySamplePlan(
+ GeometrySamplePattern Pattern,
+ int SamplesPerAxis,
+ IReadOnlyList<GeometrySample> Samples,
+ IReadOnlyList<BoundaryReference> BoundaryCandidates,
+ double CoverageEstimate)
+{
+ public int GeometrySampleCount => Samples.Count;
+}
+
+public static class GeometrySampler
+{
+ public static GeometrySamplePlan Sample(
+ IContinuumRegion region,
+ BoundingBox3D bounds,
+ int samplesPerAxis = 2)
+ {
+ ArgumentNullException.ThrowIfNull(region);
+ if (samplesPerAxis < 1)
+ {
+ throw new ArgumentOutOfRangeException(nameof(samplesPerAxis));
+ }
+
+ var samples = new List<GeometrySample>(samplesPerAxis * samplesPerAxis * samplesPerAxis);
+ var dx = (bounds.Max.X - bounds.Min.X) / samplesPerAxis;
+ var dy = (bounds.Max.Y - bounds.Min.Y) / samplesPerAxis;
+ var dz = (bounds.Max.Z - bounds.Min.Z) / samplesPerAxis;
+ var occupiedMeasure = 0d;
+
+ for (var k = 0; k < samplesPerAxis; k++)
+ for (var j = 0; j < samplesPerAxis; j++)
+ for (var i = 0; i < samplesPerAxis; i++)
+ {
+ var point = new Point3D(
+ bounds.Min.X + ((i + 0.5d) * dx),
+ bounds.Min.Y + ((j + 0.5d) * dy),
+ bounds.Min.Z + ((k + 0.5d) * dz));
+ var classification = region.Classify(point);
+ occupiedMeasure += classification switch
+ {
+ ContinuumPointClassification.Inside => 1d,
+ ContinuumPointClassification.Boundary => 0.5d,
+ _ => 0d,
+ };
+
+ samples.Add(new GeometrySample(point, classification));
+ }
+
+ var boundaries = region is IBoundaryReferenceCapability capability
+ ? capability.BoundaryCandidates(bounds)
+ : [];
+ return new GeometrySamplePlan(
+ GeometrySamplePattern.SubcellCenters,
+ samplesPerAxis,
+ samples,
+ boundaries,
+ occupiedMeasure / samples.Count);
+ }
+}
diff --git a/Aetheris.Firmament.FrictionLab/Aetheris.Firmament.FrictionLab.csproj b/Aetheris.Firmament.FrictionLab/Aetheris.Firmament.FrictionLab.csproj
index 994586fc..416d92d0 100644
--- a/Aetheris.Firmament.FrictionLab/Aetheris.Firmament.FrictionLab.csproj
+++ b/Aetheris.Firmament.FrictionLab/Aetheris.Firmament.FrictionLab.csproj
@@ -7,6 +7,7 @@
</PropertyGroup>
<ItemGroup>
+ <ProjectReference Include="..\Aetheris.Continuum\Aetheris.Continuum.csproj" />
<ProjectReference Include="..\Aetheris.Kernel.Firmament\Aetheris.Kernel.Firmament.csproj" />
</ItemGroup>
</Project>
diff --git a/Aetheris.Firmament.FrictionLab/CIRLab/CIRBoxCylinderRecognitionLab.cs b/Aetheris.Firmament.FrictionLab/CIRLab/CIRBoxCylinderRecognitionLab.cs
index b2009a29..ddab4946 100644
--- a/Aetheris.Firmament.FrictionLab/CIRLab/CIRBoxCylinderRecognitionLab.cs
+++ b/Aetheris.Firmament.FrictionLab/CIRLab/CIRBoxCylinderRecognitionLab.cs
@@ -1,120 +1,120 @@
-using Aetheris.Kernel.Core.Cir;
-using Aetheris.Kernel.Core.Math;
-using Aetheris.Kernel.Core.Numerics;
-
-namespace Aetheris.FrictionLab;
-
-public static class CirBoxCylinderRecognitionLab
-{
- public static CirBoxCylinderRecognitionLabResult Recognize(CirNode root, bool allowTranslationWrappers = true, double? linearTolerance = null)
- {
- var tol = linearTolerance ?? ToleranceContext.Default.Linear;
- if (!TryUnwrap(root, allowTranslationWrappers, out var subtractNode, out _, out var reason))
- {
- return Fail(reason, "Expected root subtract of box and cylinder.");
- }
- if (subtractNode is not CirSubtractNode subtract)
- {
- return Fail(CirLabRecognitionReason.RootNotSubtract, "Expected root subtract of box and cylinder.");
- }
-
- if (!TryUnwrap(subtract.Left, allowTranslationWrappers, out var leftNode, out var leftTranslation, out reason))
- {
- return Fail(reason, "Subtract lhs transform normalization failed.");
- }
-
- if (leftNode is not CirBoxNode box)
- {
- return Fail(CirLabRecognitionReason.BaseNotBox, "Subtract lhs must normalize to CirBoxNode.");
- }
-
- if (!TryUnwrap(subtract.Right, allowTranslationWrappers, out var rightNode, out var rightTranslation, out reason))
- {
- return Fail(reason, "Subtract rhs transform normalization failed.");
- }
-
- if (rightNode is not CirCylinderNode cylinder)
- {
- return Fail(CirLabRecognitionReason.ToolNotCylinder, "Subtract rhs must normalize to CirCylinderNode.");
- }
-
- if (box.Width <= 0d || box.Height <= 0d || box.Depth <= 0d || cylinder.Radius <= 0d || cylinder.Height <= 0d)
- {
- return Fail(CirLabRecognitionReason.InvalidDimensions, "All box/cylinder dimensions must be positive.");
- }
-
- var axis = "Z"; // native CirCylinderNode axis convention
- var dz = rightTranslation.Z - leftTranslation.Z;
- var through = cylinder.Height + (2d * tol) >= box.Depth &&
- (rightTranslation.Z - (cylinder.Height * 0.5d)) <= (-box.Depth * 0.5d + leftTranslation.Z + tol) &&
- (rightTranslation.Z + (cylinder.Height * 0.5d)) >= (box.Depth * 0.5d + leftTranslation.Z - tol);
- if (!through)
- {
- return Fail(CirLabRecognitionReason.NotThrough, "Cylinder does not span full box depth.");
- }
-
- var dx = Math.Abs(rightTranslation.X - leftTranslation.X);
- var dy = Math.Abs(rightTranslation.Y - leftTranslation.Y);
- var maxX = (box.Width * 0.5d) - cylinder.Radius;
- var maxY = (box.Height * 0.5d) - cylinder.Radius;
- if (dx >= maxX - tol || dy >= maxY - tol)
- {
- return Fail(CirLabRecognitionReason.TangentOrOutside, "Cylinder is tangent/grazing/outside XY clearance envelope.");
- }
-
- return new(true, CirLabRecognitionReason.None, "Recognized canonical box-cylinder through-hole subtract.", box, leftTranslation, cylinder, rightTranslation, axis, dz + cylinder.Height, new CirSubtractNode(new CirTransformNode(box, Transform3D.CreateTranslation(leftTranslation)), new CirTransformNode(cylinder, Transform3D.CreateTranslation(rightTranslation))));
- }
-
- private static bool TryUnwrap(CirNode node, bool allowTranslationWrappers, out CirNode unwrapped, out Vector3D translation, out CirLabRecognitionReason reason)
- {
- unwrapped = node;
- translation = Vector3D.Zero;
- reason = CirLabRecognitionReason.None;
-
- while (unwrapped is CirTransformNode t)
- {
- if (!allowTranslationWrappers || !TryExtractPureTranslation(t.Transform, out var step))
- {
- reason = CirLabRecognitionReason.UnsupportedTransform;
- return false;
- }
-
- translation += step;
- unwrapped = t.Child;
- }
-
- if (unwrapped is CirSubtractNode s)
- {
- reason = CirLabRecognitionReason.None;
- unwrapped = s;
- return true;
- }
-
- return true;
- }
-
- public static bool TryExtractPureTranslation(Transform3D transform, out Vector3D translation)
- {
- var o = transform.Apply(Point3D.Origin);
- var x = transform.Apply(new Point3D(1d, 0d, 0d));
- var y = transform.Apply(new Point3D(0d, 1d, 0d));
- var z = transform.Apply(new Point3D(0d, 0d, 1d));
- var eps = 1e-9d;
- if (!NearlyEqual(x - o, new Vector3D(1d, 0d, 0d), eps)
- || !NearlyEqual(y - o, new Vector3D(0d, 1d, 0d), eps)
- || !NearlyEqual(z - o, new Vector3D(0d, 0d, 1d), eps))
- {
- translation = Vector3D.Zero;
- return false;
- }
-
- translation = o - Point3D.Origin;
- return true;
- }
-
- private static bool NearlyEqual(Vector3D a, Vector3D b, double eps)
- => Math.Abs(a.X - b.X) <= eps && Math.Abs(a.Y - b.Y) <= eps && Math.Abs(a.Z - b.Z) <= eps;
-
- private static CirBoxCylinderRecognitionLabResult Fail(CirLabRecognitionReason reason, string diagnostic)
- => new(false, reason, diagnostic, null, Vector3D.Zero, null, Vector3D.Zero, null, 0d, null);
-}
+using Aetheris.Continuum.Backends.Sdf;
+using Aetheris.Kernel.Core.Math;
+using Aetheris.Kernel.Core.Numerics;
+
+namespace Aetheris.FrictionLab;
+
+public static class CirBoxCylinderRecognitionLab
+{
+ public static CirBoxCylinderRecognitionLabResult Recognize(CirNode root, bool allowTranslationWrappers = true, double? linearTolerance = null)
+ {
+ var tol = linearTolerance ?? ToleranceContext.Default.Linear;
+ if (!TryUnwrap(root, allowTranslationWrappers, out var subtractNode, out _, out var reason))
+ {
+ return Fail(reason, "Expected root subtract of box and cylinder.");
+ }
+ if (subtractNode is not CirSubtractNode subtract)
+ {
+ return Fail(CirLabRecognitionReason.RootNotSubtract, "Expected root subtract of box and cylinder.");
+ }
+
+ if (!TryUnwrap(subtract.Left, allowTranslationWrappers, out var leftNode, out var leftTranslation, out reason))
+ {
+ return Fail(reason, "Subtract lhs transform normalization failed.");
+ }
+
+ if (leftNode is not CirBoxNode box)
+ {
+ return Fail(CirLabRecognitionReason.BaseNotBox, "Subtract lhs must normalize to CirBoxNode.");
+ }
+
+ if (!TryUnwrap(subtract.Right, allowTranslationWrappers, out var rightNode, out var rightTranslation, out reason))
+ {
+ return Fail(reason, "Subtract rhs transform normalization failed.");
+ }
+
+ if (rightNode is not CirCylinderNode cylinder)
+ {
+ return Fail(CirLabRecognitionReason.ToolNotCylinder, "Subtract rhs must normalize to CirCylinderNode.");
+ }
+
+ if (box.Width <= 0d || box.Height <= 0d || box.Depth <= 0d || cylinder.Radius <= 0d || cylinder.Height <= 0d)
+ {
+ return Fail(CirLabRecognitionReason.InvalidDimensions, "All box/cylinder dimensions must be positive.");
+ }
+
+ var axis = "Z"; // native CirCylinderNode axis convention
+ var dz = rightTranslation.Z - leftTranslation.Z;
+ var through = cylinder.Height + (2d * tol) >= box.Depth &&
+ (rightTranslation.Z - (cylinder.Height * 0.5d)) <= (-box.Depth * 0.5d + leftTranslation.Z + tol) &&
+ (rightTranslation.Z + (cylinder.Height * 0.5d)) >= (box.Depth * 0.5d + leftTranslation.Z - tol);
+ if (!through)
+ {
+ return Fail(CirLabRecognitionReason.NotThrough, "Cylinder does not span full box depth.");
+ }
+
+ var dx = Math.Abs(rightTranslation.X - leftTranslation.X);
+ var dy = Math.Abs(rightTranslation.Y - leftTranslation.Y);
+ var maxX = (box.Width * 0.5d) - cylinder.Radius;
+ var maxY = (box.Height * 0.5d) - cylinder.Radius;
+ if (dx >= maxX - tol || dy >= maxY - tol)
+ {
+ return Fail(CirLabRecognitionReason.TangentOrOutside, "Cylinder is tangent/grazing/outside XY clearance envelope.");
+ }
+
+ return new(true, CirLabRecognitionReason.None, "Recognized canonical box-cylinder through-hole subtract.", box, leftTranslation, cylinder, rightTranslation, axis, dz + cylinder.Height, new CirSubtractNode(new CirTransformNode(box, Transform3D.CreateTranslation(leftTranslation)), new CirTransformNode(cylinder, Transform3D.CreateTranslation(rightTranslation))));
+ }
+
+ private static bool TryUnwrap(CirNode node, bool allowTranslationWrappers, out CirNode unwrapped, out Vector3D translation, out CirLabRecognitionReason reason)
+ {
+ unwrapped = node;
+ translation = Vector3D.Zero;
+ reason = CirLabRecognitionReason.None;
+
+ while (unwrapped is CirTransformNode t)
+ {
+ if (!allowTranslationWrappers || !TryExtractPureTranslation(t.Transform, out var step))
+ {
+ reason = CirLabRecognitionReason.UnsupportedTransform;
+ return false;
+ }
+
+ translation += step;
+ unwrapped = t.Child;
+ }
+
+ if (unwrapped is CirSubtractNode s)
+ {
+ reason = CirLabRecognitionReason.None;
+ unwrapped = s;
+ return true;
+ }
+
+ return true;
+ }
+
+ public static bool TryExtractPureTranslation(Transform3D transform, out Vector3D translation)
+ {
+ var o = transform.Apply(Point3D.Origin);
+ var x = transform.Apply(new Point3D(1d, 0d, 0d));
+ var y = transform.Apply(new Point3D(0d, 1d, 0d));
+ var z = transform.Apply(new Point3D(0d, 0d, 1d));
+ var eps = 1e-9d;
+ if (!NearlyEqual(x - o, new Vector3D(1d, 0d, 0d), eps)
+ || !NearlyEqual(y - o, new Vector3D(0d, 1d, 0d), eps)
+ || !NearlyEqual(z - o, new Vector3D(0d, 0d, 1d), eps))
+ {
+ translation = Vector3D.Zero;
+ return false;
+ }
+
+ translation = o - Point3D.Origin;
+ return true;
+ }
+
+ private static bool NearlyEqual(Vector3D a, Vector3D b, double eps)
+ => Math.Abs(a.X - b.X) <= eps && Math.Abs(a.Y - b.Y) <= eps && Math.Abs(a.Z - b.Z) <= eps;
+
+ private static CirBoxCylinderRecognitionLabResult Fail(CirLabRecognitionReason reason, string diagnostic)
+ => new(false, reason, diagnostic, null, Vector3D.Zero, null, Vector3D.Zero, null, 0d, null);
+}
diff --git a/Aetheris.Firmament.FrictionLab/CIRLab/CIRBoxCylinderRecognitionLabResult.cs b/Aetheris.Firmament.FrictionLab/CIRLab/CIRBoxCylinderRecognitionLabResult.cs
index 3c4e1553..c6739fb4 100644
--- a/Aetheris.Firmament.FrictionLab/CIRLab/CIRBoxCylinderRecognitionLabResult.cs
+++ b/Aetheris.Firmament.FrictionLab/CIRLab/CIRBoxCylinderRecognitionLabResult.cs
@@ -1,16 +1,16 @@
-using Aetheris.Kernel.Core.Cir;
-using Aetheris.Kernel.Core.Math;
-
-namespace Aetheris.FrictionLab;
-
-public sealed record CirBoxCylinderRecognitionLabResult(
- bool Success,
- CirLabRecognitionReason Reason,
- string Diagnostic,
- CirBoxNode? Box,
- Vector3D BoxTranslation,
- CirCylinderNode? Cylinder,
- Vector3D CylinderTranslation,
- string? Axis,
- double ThroughLength,
- CirNode? NormalizedRoot);
+using Aetheris.Continuum.Backends.Sdf;
+using Aetheris.Kernel.Core.Math;
+
+namespace Aetheris.FrictionLab;
+
+public sealed record CirBoxCylinderRecognitionLabResult(
+ bool Success,
+ CirLabRecognitionReason Reason,
+ string Diagnostic,
+ CirBoxNode? Box,
+ Vector3D BoxTranslation,
+ CirCylinderNode? Cylinder,
+ Vector3D CylinderTranslation,
+ string? Axis,
+ double ThroughLength,
+ CirNode? NormalizedRoot);
diff --git a/Aetheris.Firmament.FrictionLab/CIRLab/CirBrepX4RecognizerSourceContractLab.cs b/Aetheris.Firmament.FrictionLab/CIRLab/CirBrepX4RecognizerSourceContractLab.cs
index 0644bb73..f9e78cb0 100644
--- a/Aetheris.Firmament.FrictionLab/CIRLab/CirBrepX4RecognizerSourceContractLab.cs
+++ b/Aetheris.Firmament.FrictionLab/CIRLab/CirBrepX4RecognizerSourceContractLab.cs
@@ -1,5 +1,5 @@
using System.Reflection;
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Math;
using Aetheris.Kernel.Firmament;
using Aetheris.Kernel.Firmament.Execution;
diff --git a/Aetheris.Firmament.FrictionLab/CIRLab/CirPrismaticMirrorLab.cs b/Aetheris.Firmament.FrictionLab/CIRLab/CirPrismaticMirrorLab.cs
index 6644bef4..c88396f0 100644
--- a/Aetheris.Firmament.FrictionLab/CIRLab/CirPrismaticMirrorLab.cs
+++ b/Aetheris.Firmament.FrictionLab/CIRLab/CirPrismaticMirrorLab.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Math;
namespace Aetheris.Firmament.FrictionLab.CIRLab;
diff --git a/Aetheris.Firmament.FrictionLab/CIRLab/ExperimentalPrismaticMapLab.cs b/Aetheris.Firmament.FrictionLab/CIRLab/ExperimentalPrismaticMapLab.cs
index 6dc09bcc..48ea76b6 100644
--- a/Aetheris.Firmament.FrictionLab/CIRLab/ExperimentalPrismaticMapLab.cs
+++ b/Aetheris.Firmament.FrictionLab/CIRLab/ExperimentalPrismaticMapLab.cs
@@ -1,5 +1,5 @@
-using Aetheris.Kernel.Core.Cir;
-using Aetheris.Kernel.Core.Cir.Mirrors;
+using Aetheris.Continuum.Backends.Sdf;
+using Aetheris.Continuum.Mirrors;
using Aetheris.Kernel.Core.Math;
using CorePrismatic = Aetheris.Kernel.Core.Brep.Prismatic;
diff --git a/Aetheris.Firmament.FrictionLab/CIRLab/FrepBrepRecoveryPolicyLab.cs b/Aetheris.Firmament.FrictionLab/CIRLab/FrepBrepRecoveryPolicyLab.cs
index 3344a87b..fc1b21f1 100644
--- a/Aetheris.Firmament.FrictionLab/CIRLab/FrepBrepRecoveryPolicyLab.cs
+++ b/Aetheris.Firmament.FrictionLab/CIRLab/FrepBrepRecoveryPolicyLab.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Judgment;
using Aetheris.Kernel.Firmament.Execution;
using Aetheris.Kernel.Firmament.Materializer;
diff --git a/Aetheris.Firmament.FrictionLab/CIRLab/FrepPolicyShapeDoeLab.cs b/Aetheris.Firmament.FrictionLab/CIRLab/FrepPolicyShapeDoeLab.cs
index 589cb55f..f9ed5737 100644
--- a/Aetheris.Firmament.FrictionLab/CIRLab/FrepPolicyShapeDoeLab.cs
+++ b/Aetheris.Firmament.FrictionLab/CIRLab/FrepPolicyShapeDoeLab.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Judgment;
using Aetheris.Kernel.Core.Math;
diff --git a/Aetheris.Firmament.FrictionLab/CIRLab/GenericCirBrepExecutorLab.cs b/Aetheris.Firmament.FrictionLab/CIRLab/GenericCirBrepExecutorLab.cs
index 5560c069..3bbc9e5d 100644
--- a/Aetheris.Firmament.FrictionLab/CIRLab/GenericCirBrepExecutorLab.cs
+++ b/Aetheris.Firmament.FrictionLab/CIRLab/GenericCirBrepExecutorLab.cs
@@ -1,6 +1,6 @@
using Aetheris.Kernel.Core.Brep;
using Aetheris.Kernel.Core.Brep.Boolean;
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Math;
using Aetheris.Kernel.Core.Step242;
using Aetheris.Kernel.Firmament.Materializer;
diff --git a/Aetheris.Firmament.FrictionLab/CIRLab/HoleFamilyPolicyShapeLab.cs b/Aetheris.Firmament.FrictionLab/CIRLab/HoleFamilyPolicyShapeLab.cs
index 347a0660..5d82b68c 100644
--- a/Aetheris.Firmament.FrictionLab/CIRLab/HoleFamilyPolicyShapeLab.cs
+++ b/Aetheris.Firmament.FrictionLab/CIRLab/HoleFamilyPolicyShapeLab.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Judgment;
using Aetheris.Kernel.Core.Math;
diff --git a/Aetheris.Firmament.FrictionLab/CIRLab/SteppedHoleExecutionArchitectureLab.cs b/Aetheris.Firmament.FrictionLab/CIRLab/SteppedHoleExecutionArchitectureLab.cs
index 11b34c13..c9cfc9fc 100644
--- a/Aetheris.Firmament.FrictionLab/CIRLab/SteppedHoleExecutionArchitectureLab.cs
+++ b/Aetheris.Firmament.FrictionLab/CIRLab/SteppedHoleExecutionArchitectureLab.cs
@@ -1,6 +1,6 @@
using Aetheris.Kernel.Core.Brep;
using Aetheris.Kernel.Core.Brep.Boolean;
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Judgment;
using Aetheris.Kernel.Core.Math;
using Aetheris.Kernel.Core.Step242;
diff --git a/Aetheris.FrictionLab.Tests/Aetheris.FrictionLab.Tests.csproj b/Aetheris.FrictionLab.Tests/Aetheris.FrictionLab.Tests.csproj
index 9942cad4..19555fb0 100644
--- a/Aetheris.FrictionLab.Tests/Aetheris.FrictionLab.Tests.csproj
+++ b/Aetheris.FrictionLab.Tests/Aetheris.FrictionLab.Tests.csproj
@@ -11,6 +11,7 @@
</ItemGroup>
<ItemGroup>
+ <ProjectReference Include="..\Aetheris.Continuum\Aetheris.Continuum.csproj" />
<PackageReference Include="coverlet.collector" Version="6.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="xunit" Version="2.9.2" />
diff --git a/Aetheris.FrictionLab.Tests/CIRLab/CirBoxCylinderConventionLabTests.cs b/Aetheris.FrictionLab.Tests/CIRLab/CirBoxCylinderConventionLabTests.cs
index 052aca29..51045289 100644
--- a/Aetheris.FrictionLab.Tests/CIRLab/CirBoxCylinderConventionLabTests.cs
+++ b/Aetheris.FrictionLab.Tests/CIRLab/CirBoxCylinderConventionLabTests.cs
@@ -1,26 +1,26 @@
-using Aetheris.Kernel.Core.Cir;
-using Aetheris.Kernel.Core.Math;
-
-namespace Aetheris.FrictionLab.Tests.CIRLab;
-
-public sealed class CirBoxCylinderConventionLabTests
-{
- [Fact]
- public void Box_IsCenteredOnOrigin_WithHalfExtents()
- {
- var box = new CirBoxNode(10d, 6d, 4d);
- Assert.Equal(new Point3D(-5d, -3d, -2d), box.Bounds.Min);
- Assert.Equal(new Point3D(5d, 3d, 2d), box.Bounds.Max);
- Assert.True(box.Evaluate(Point3D.Origin) < 0d);
- }
-
- [Fact]
- public void Cylinder_IsZAxisCenteredOnOrigin_WithHalfHeightExtents()
- {
- var cylinder = new CirCylinderNode(3d, 8d);
- Assert.Equal(new Point3D(-3d, -3d, -4d), cylinder.Bounds.Min);
- Assert.Equal(new Point3D(3d, 3d, 4d), cylinder.Bounds.Max);
- Assert.True(cylinder.Evaluate(new Point3D(0d, 0d, 3d)) < 0d);
- Assert.True(cylinder.Evaluate(new Point3D(3.1d, 0d, 0d)) > 0d);
- }
-}
+using Aetheris.Continuum.Backends.Sdf;
+using Aetheris.Kernel.Core.Math;
+
+namespace Aetheris.FrictionLab.Tests.CIRLab;
+
+public sealed class CirBoxCylinderConventionLabTests
+{
+ [Fact]
+ public void Box_IsCenteredOnOrigin_WithHalfExtents()
+ {
+ var box = new CirBoxNode(10d, 6d, 4d);
+ Assert.Equal(new Point3D(-5d, -3d, -2d), box.Bounds.Min);
+ Assert.Equal(new Point3D(5d, 3d, 2d), box.Bounds.Max);
+ Assert.True(box.Evaluate(Point3D.Origin) < 0d);
+ }
+
+ [Fact]
+ public void Cylinder_IsZAxisCenteredOnOrigin_WithHalfHeightExtents()
+ {
+ var cylinder = new CirCylinderNode(3d, 8d);
+ Assert.Equal(new Point3D(-3d, -3d, -4d), cylinder.Bounds.Min);
+ Assert.Equal(new Point3D(3d, 3d, 4d), cylinder.Bounds.Max);
+ Assert.True(cylinder.Evaluate(new Point3D(0d, 0d, 3d)) < 0d);
+ Assert.True(cylinder.Evaluate(new Point3D(3.1d, 0d, 0d)) > 0d);
+ }
+}
diff --git a/Aetheris.FrictionLab.Tests/CIRLab/CirBoxCylinderRecognitionLabTests.cs b/Aetheris.FrictionLab.Tests/CIRLab/CirBoxCylinderRecognitionLabTests.cs
index efbed0d8..137d2ab5 100644
--- a/Aetheris.FrictionLab.Tests/CIRLab/CirBoxCylinderRecognitionLabTests.cs
+++ b/Aetheris.FrictionLab.Tests/CIRLab/CirBoxCylinderRecognitionLabTests.cs
@@ -1,37 +1,37 @@
-using Aetheris.FrictionLab;
-using Aetheris.Kernel.Core.Cir;
-using Aetheris.Kernel.Core.Math;
-
-namespace Aetheris.FrictionLab.Tests.CIRLab;
-
-public sealed class CirBoxCylinderRecognitionLabTests
-{
- [Fact]
- public void Recognizes_DirectCanonicalSubtract()
- {
- var root = new CirSubtractNode(new CirBoxNode(10d, 8d, 6d), new CirCylinderNode(2d, 8d));
- var result = CirBoxCylinderRecognitionLab.Recognize(root);
- Assert.True(result.Success);
- Assert.Equal("Z", result.Axis);
- }
-
- [Fact]
- public void Recognizes_TranslatedOperands()
- {
- var box = new CirTransformNode(new CirBoxNode(10d, 8d, 6d), Transform3D.CreateTranslation(new Vector3D(2d, 1d, 5d)));
- var cyl = new CirTransformNode(new CirCylinderNode(2d, 8d), Transform3D.CreateTranslation(new Vector3D(2.5d, 1.5d, 5d)));
- var root = new CirSubtractNode(box, cyl);
- var result = CirBoxCylinderRecognitionLab.Recognize(root);
- Assert.True(result.Success);
- }
-
- [Fact]
- public void Rejects_NonTranslationTransform()
- {
- var box = new CirTransformNode(new CirBoxNode(10d, 8d, 6d), Transform3D.CreateRotationX(Math.PI / 4d));
- var root = new CirSubtractNode(box, new CirCylinderNode(2d, 8d));
- var result = CirBoxCylinderRecognitionLab.Recognize(root);
- Assert.False(result.Success);
- Assert.Equal(CirLabRecognitionReason.UnsupportedTransform, result.Reason);
- }
-}
+using Aetheris.FrictionLab;
+using Aetheris.Continuum.Backends.Sdf;
+using Aetheris.Kernel.Core.Math;
+
+namespace Aetheris.FrictionLab.Tests.CIRLab;
+
+public sealed class CirBoxCylinderRecognitionLabTests
+{
+ [Fact]
+ public void Recognizes_DirectCanonicalSubtract()
+ {
+ var root = new CirSubtractNode(new CirBoxNode(10d, 8d, 6d), new CirCylinderNode(2d, 8d));
+ var result = CirBoxCylinderRecognitionLab.Recognize(root);
+ Assert.True(result.Success);
+ Assert.Equal("Z", result.Axis);
+ }
+
+ [Fact]
+ public void Recognizes_TranslatedOperands()
+ {
+ var box = new CirTransformNode(new CirBoxNode(10d, 8d, 6d), Transform3D.CreateTranslation(new Vector3D(2d, 1d, 5d)));
+ var cyl = new CirTransformNode(new CirCylinderNode(2d, 8d), Transform3D.CreateTranslation(new Vector3D(2.5d, 1.5d, 5d)));
+ var root = new CirSubtractNode(box, cyl);
+ var result = CirBoxCylinderRecognitionLab.Recognize(root);
+ Assert.True(result.Success);
+ }
+
+ [Fact]
+ public void Rejects_NonTranslationTransform()
+ {
+ var box = new CirTransformNode(new CirBoxNode(10d, 8d, 6d), Transform3D.CreateRotationX(Math.PI / 4d));
+ var root = new CirSubtractNode(box, new CirCylinderNode(2d, 8d));
+ var result = CirBoxCylinderRecognitionLab.Recognize(root);
+ Assert.False(result.Success);
+ Assert.Equal(CirLabRecognitionReason.UnsupportedTransform, result.Reason);
+ }
+}
diff --git a/Aetheris.FrictionLab.Tests/CIRLab/CirBoxCylinderUnsupportedCasesLabTests.cs b/Aetheris.FrictionLab.Tests/CIRLab/CirBoxCylinderUnsupportedCasesLabTests.cs
index 6a008401..09e0de49 100644
--- a/Aetheris.FrictionLab.Tests/CIRLab/CirBoxCylinderUnsupportedCasesLabTests.cs
+++ b/Aetheris.FrictionLab.Tests/CIRLab/CirBoxCylinderUnsupportedCasesLabTests.cs
@@ -1,27 +1,27 @@
-using Aetheris.FrictionLab;
-using Aetheris.Kernel.Core.Cir;
-using Aetheris.Kernel.Core.Math;
-
-namespace Aetheris.FrictionLab.Tests.CIRLab;
-
-public sealed class CirBoxCylinderUnsupportedCasesLabTests
-{
- [Theory]
- [MemberData(nameof(Cases))]
- public void Rejects_Unsupported(CirNode root, CirLabRecognitionReason expected)
- {
- var result = CirBoxCylinderRecognitionLab.Recognize(root);
- Assert.False(result.Success);
- Assert.Equal(expected, result.Reason);
- }
-
- public static IEnumerable<object[]> Cases()
- {
- yield return [new CirUnionNode(new CirBoxNode(10d, 8d, 6d), new CirCylinderNode(2d, 8d)), CirLabRecognitionReason.RootNotSubtract];
- yield return [new CirSubtractNode(new CirSphereNode(3d), new CirCylinderNode(2d, 8d)), CirLabRecognitionReason.BaseNotBox];
- yield return [new CirSubtractNode(new CirBoxNode(10d, 8d, 6d), new CirSphereNode(2d)), CirLabRecognitionReason.ToolNotCylinder];
- yield return [new CirSubtractNode(new CirBoxNode(10d, 8d, 6d), new CirCylinderNode(2d, 4d)), CirLabRecognitionReason.NotThrough];
- yield return [new CirSubtractNode(new CirBoxNode(10d, 8d, 6d), new CirTransformNode(new CirCylinderNode(2d, 8d), Transform3D.CreateTranslation(new Vector3D(3d, 0d, 0d)))), CirLabRecognitionReason.TangentOrOutside];
- yield return [new CirSubtractNode(new CirBoxNode(10d, 8d, 6d), new CirTransformNode(new CirCylinderNode(2d, 8d), Transform3D.CreateTranslation(new Vector3D(7d, 0d, 0d)))), CirLabRecognitionReason.TangentOrOutside];
- }
-}
+using Aetheris.FrictionLab;
+using Aetheris.Continuum.Backends.Sdf;
+using Aetheris.Kernel.Core.Math;
+
+namespace Aetheris.FrictionLab.Tests.CIRLab;
+
+public sealed class CirBoxCylinderUnsupportedCasesLabTests
+{
+ [Theory]
+ [MemberData(nameof(Cases))]
+ public void Rejects_Unsupported(CirNode root, CirLabRecognitionReason expected)
+ {
+ var result = CirBoxCylinderRecognitionLab.Recognize(root);
+ Assert.False(result.Success);
+ Assert.Equal(expected, result.Reason);
+ }
+
+ public static IEnumerable<object[]> Cases()
+ {
+ yield return [new CirUnionNode(new CirBoxNode(10d, 8d, 6d), new CirCylinderNode(2d, 8d)), CirLabRecognitionReason.RootNotSubtract];
+ yield return [new CirSubtractNode(new CirSphereNode(3d), new CirCylinderNode(2d, 8d)), CirLabRecognitionReason.BaseNotBox];
+ yield return [new CirSubtractNode(new CirBoxNode(10d, 8d, 6d), new CirSphereNode(2d)), CirLabRecognitionReason.ToolNotCylinder];
+ yield return [new CirSubtractNode(new CirBoxNode(10d, 8d, 6d), new CirCylinderNode(2d, 4d)), CirLabRecognitionReason.NotThrough];
+ yield return [new CirSubtractNode(new CirBoxNode(10d, 8d, 6d), new CirTransformNode(new CirCylinderNode(2d, 8d), Transform3D.CreateTranslation(new Vector3D(3d, 0d, 0d)))), CirLabRecognitionReason.TangentOrOutside];
+ yield return [new CirSubtractNode(new CirBoxNode(10d, 8d, 6d), new CirTransformNode(new CirCylinderNode(2d, 8d), Transform3D.CreateTranslation(new Vector3D(7d, 0d, 0d)))), CirLabRecognitionReason.TangentOrOutside];
+ }
+}
diff --git a/Aetheris.FrictionLab.Tests/CIRLab/CirBrepX31FirmamentLoweringEntrypointLabTests.cs b/Aetheris.FrictionLab.Tests/CIRLab/CirBrepX31FirmamentLoweringEntrypointLabTests.cs
index 88d4adb2..60e3e76f 100644
--- a/Aetheris.FrictionLab.Tests/CIRLab/CirBrepX31FirmamentLoweringEntrypointLabTests.cs
+++ b/Aetheris.FrictionLab.Tests/CIRLab/CirBrepX31FirmamentLoweringEntrypointLabTests.cs
@@ -1,6 +1,6 @@
using System.Reflection;
using Aetheris.FrictionLab;
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Firmament;
using Aetheris.Kernel.Firmament.Execution;
using Aetheris.Kernel.Firmament.Materializer;
diff --git a/Aetheris.FrictionLab.Tests/CIRLab/CirBrepX4RecognizerSourceContractLabTests.cs b/Aetheris.FrictionLab.Tests/CIRLab/CirBrepX4RecognizerSourceContractLabTests.cs
index fef63ad0..096366cc 100644
--- a/Aetheris.FrictionLab.Tests/CIRLab/CirBrepX4RecognizerSourceContractLabTests.cs
+++ b/Aetheris.FrictionLab.Tests/CIRLab/CirBrepX4RecognizerSourceContractLabTests.cs
@@ -1,5 +1,5 @@
using Aetheris.FrictionLab;
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Math;
using Aetheris.Kernel.Firmament;
using Aetheris.Kernel.Firmament.Execution;
diff --git a/Aetheris.FrictionLab.Tests/CIRLab/FrepBrepRecoveryPolicyLabTests.cs b/Aetheris.FrictionLab.Tests/CIRLab/FrepBrepRecoveryPolicyLabTests.cs
index 537deee1..fdbf749b 100644
--- a/Aetheris.FrictionLab.Tests/CIRLab/FrepBrepRecoveryPolicyLabTests.cs
+++ b/Aetheris.FrictionLab.Tests/CIRLab/FrepBrepRecoveryPolicyLabTests.cs
@@ -1,5 +1,5 @@
using Aetheris.FrictionLab;
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Math;
namespace Aetheris.FrictionLab.Tests.CIRLab;
diff --git a/Aetheris.Kernel.Core/Properties/InternalsVisibleTo.cs b/Aetheris.Kernel.Core/Properties/InternalsVisibleTo.cs
index 131e6511..8195d602 100644
--- a/Aetheris.Kernel.Core/Properties/InternalsVisibleTo.cs
+++ b/Aetheris.Kernel.Core/Properties/InternalsVisibleTo.cs
@@ -6,3 +6,5 @@ using System.Runtime.CompilerServices;
[assembly: InternalsVisibleTo("Aetheris.Kernel.Firmament")]
[assembly: InternalsVisibleTo("Aetheris.Kernel.Firmament.Tests")]
[assembly: InternalsVisibleTo("aetheris")]
+[assembly: InternalsVisibleTo("Aetheris.Continuum")]
+[assembly: InternalsVisibleTo("Aetheris.Continuum.Tests")]
diff --git a/Aetheris.Kernel.Firmament.Tests/Aetheris.Kernel.Firmament.Tests.csproj b/Aetheris.Kernel.Firmament.Tests/Aetheris.Kernel.Firmament.Tests.csproj
index e6606506..e65d1d30 100644
--- a/Aetheris.Kernel.Firmament.Tests/Aetheris.Kernel.Firmament.Tests.csproj
+++ b/Aetheris.Kernel.Firmament.Tests/Aetheris.Kernel.Firmament.Tests.csproj
@@ -32,6 +32,7 @@
</ItemGroup>
<ItemGroup>
+ <ProjectReference Include="..\Aetheris.Continuum\Aetheris.Continuum.csproj" />
<PackageReference Include="coverlet.collector" Version="6.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="xunit" Version="2.9.2" />
diff --git a/Aetheris.Kernel.Firmament.Tests/AirProfileStackExtrudeTests.cs b/Aetheris.Kernel.Firmament.Tests/AirProfileStackExtrudeTests.cs
index eb9ec7dc..01205e6e 100644
--- a/Aetheris.Kernel.Firmament.Tests/AirProfileStackExtrudeTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/AirProfileStackExtrudeTests.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Math;
using Aetheris.Kernel.Core.Numerics;
using Aetheris.Kernel.Core.Step242;
diff --git a/Aetheris.Kernel.Firmament.Tests/BlindHoleVariantAndExecutorTests.cs b/Aetheris.Kernel.Firmament.Tests/BlindHoleVariantAndExecutorTests.cs
index 2b546594..1ed312d2 100644
--- a/Aetheris.Kernel.Firmament.Tests/BlindHoleVariantAndExecutorTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/BlindHoleVariantAndExecutorTests.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Math;
using Aetheris.Kernel.Core.Step242;
using Aetheris.Kernel.Firmament.Materializer;
diff --git a/Aetheris.Kernel.Firmament.Tests/BlindHoleVariantHardeningTests.cs b/Aetheris.Kernel.Firmament.Tests/BlindHoleVariantHardeningTests.cs
index 8d0e9be9..8fa3968e 100644
--- a/Aetheris.Kernel.Firmament.Tests/BlindHoleVariantHardeningTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/BlindHoleVariantHardeningTests.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Math;
using Aetheris.Kernel.Core.Step242;
using Aetheris.Kernel.Firmament.Materializer;
diff --git a/Aetheris.Kernel.Firmament.Tests/ChamferedEntryHoleVariantAndExecutorTests.cs b/Aetheris.Kernel.Firmament.Tests/ChamferedEntryHoleVariantAndExecutorTests.cs
index 887360a8..8fd8a50b 100644
--- a/Aetheris.Kernel.Firmament.Tests/ChamferedEntryHoleVariantAndExecutorTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/ChamferedEntryHoleVariantAndExecutorTests.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Math;
using Aetheris.Kernel.Core.Step242;
using Aetheris.Kernel.Firmament.Materializer;
diff --git a/Aetheris.Kernel.Firmament.Tests/CirAnalysisServiceTests.cs b/Aetheris.Kernel.Firmament.Tests/CirAnalysisServiceTests.cs
index 88339edd..8d0d1e43 100644
--- a/Aetheris.Kernel.Firmament.Tests/CirAnalysisServiceTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/CirAnalysisServiceTests.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Math;
using Aetheris.Kernel.Firmament.Analysis;
diff --git a/Aetheris.Kernel.Firmament.Tests/CirBoxCylinderRecognizerTests.cs b/Aetheris.Kernel.Firmament.Tests/CirBoxCylinderRecognizerTests.cs
index 5c292ef7..cc92494c 100644
--- a/Aetheris.Kernel.Firmament.Tests/CirBoxCylinderRecognizerTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/CirBoxCylinderRecognizerTests.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Math;
using Aetheris.Kernel.Core.Numerics;
using Aetheris.Kernel.Firmament.Execution;
diff --git a/Aetheris.Kernel.Firmament.Tests/CirBrepMaterializerTests.cs b/Aetheris.Kernel.Firmament.Tests/CirBrepMaterializerTests.cs
index 74a15bea..04910b8a 100644
--- a/Aetheris.Kernel.Firmament.Tests/CirBrepMaterializerTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/CirBrepMaterializerTests.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Math;
using Aetheris.Kernel.Firmament.Execution;
using Aetheris.Kernel.Firmament.Materializer;
diff --git a/Aetheris.Kernel.Firmament.Tests/CombinedPatchBodyRemapperTests.cs b/Aetheris.Kernel.Firmament.Tests/CombinedPatchBodyRemapperTests.cs
index 7a098a16..36428998 100644
--- a/Aetheris.Kernel.Firmament.Tests/CombinedPatchBodyRemapperTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/CombinedPatchBodyRemapperTests.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Firmament.Execution;
using Aetheris.Kernel.Firmament.Materializer;
using Aetheris.Kernel.Firmament.Diagnostics;
diff --git a/Aetheris.Kernel.Firmament.Tests/CounterboreRecoveryExecutorTests.cs b/Aetheris.Kernel.Firmament.Tests/CounterboreRecoveryExecutorTests.cs
index 356e9837..46f23dac 100644
--- a/Aetheris.Kernel.Firmament.Tests/CounterboreRecoveryExecutorTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/CounterboreRecoveryExecutorTests.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Geometry;
using Aetheris.Kernel.Core.Math;
using Aetheris.Kernel.Firmament.Materializer;
diff --git a/Aetheris.Kernel.Firmament.Tests/CounterboreRecoveryStepSmokeTests.cs b/Aetheris.Kernel.Firmament.Tests/CounterboreRecoveryStepSmokeTests.cs
index 03da65fa..912477ad 100644
--- a/Aetheris.Kernel.Firmament.Tests/CounterboreRecoveryStepSmokeTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/CounterboreRecoveryStepSmokeTests.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Math;
using Aetheris.Kernel.Core.Step242;
using Aetheris.Kernel.Firmament.Materializer;
diff --git a/Aetheris.Kernel.Firmament.Tests/CounterboreVariantTests.cs b/Aetheris.Kernel.Firmament.Tests/CounterboreVariantTests.cs
index c85b9811..735fc3d0 100644
--- a/Aetheris.Kernel.Firmament.Tests/CounterboreVariantTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/CounterboreVariantTests.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Math;
using Aetheris.Kernel.Firmament.Materializer;
diff --git a/Aetheris.Kernel.Firmament.Tests/CountersinkVariantAndExecutorTests.cs b/Aetheris.Kernel.Firmament.Tests/CountersinkVariantAndExecutorTests.cs
index ec0a29bc..e947bd41 100644
--- a/Aetheris.Kernel.Firmament.Tests/CountersinkVariantAndExecutorTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/CountersinkVariantAndExecutorTests.cs
@@ -1,5 +1,5 @@
using Aetheris.Kernel.Core.Brep;
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Math;
using Aetheris.Kernel.Core.Step242;
using Aetheris.Kernel.Firmament.Materializer;
diff --git a/Aetheris.Kernel.Firmament.Tests/DuplicateEdgeCleanupPlannerTests.cs b/Aetheris.Kernel.Firmament.Tests/DuplicateEdgeCleanupPlannerTests.cs
index 064b0951..2303d90f 100644
--- a/Aetheris.Kernel.Firmament.Tests/DuplicateEdgeCleanupPlannerTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/DuplicateEdgeCleanupPlannerTests.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Firmament.Execution;
using Aetheris.Kernel.Firmament.Materializer;
using Aetheris.Kernel.Firmament.Diagnostics;
diff --git a/Aetheris.Kernel.Firmament.Tests/EmittedTokenPairingAnalyzerTests.cs b/Aetheris.Kernel.Firmament.Tests/EmittedTokenPairingAnalyzerTests.cs
index a88f3c9d..bf9bf5b6 100644
--- a/Aetheris.Kernel.Firmament.Tests/EmittedTokenPairingAnalyzerTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/EmittedTokenPairingAnalyzerTests.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Firmament.Execution;
using Aetheris.Kernel.Firmament.Materializer;
using Aetheris.Kernel.Firmament.Diagnostics;
diff --git a/Aetheris.Kernel.Firmament.Tests/FacePatchCandidateDryRunTests.cs b/Aetheris.Kernel.Firmament.Tests/FacePatchCandidateDryRunTests.cs
index b162123e..2685ee5f 100644
--- a/Aetheris.Kernel.Firmament.Tests/FacePatchCandidateDryRunTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/FacePatchCandidateDryRunTests.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Math;
using Aetheris.Kernel.Firmament.Execution;
using Aetheris.Kernel.Firmament.Materializer;
diff --git a/Aetheris.Kernel.Firmament.Tests/FirmamentCirDifferentialAnalysisTests.cs b/Aetheris.Kernel.Firmament.Tests/FirmamentCirDifferentialAnalysisTests.cs
index c7c766b5..8b9835b8 100644
--- a/Aetheris.Kernel.Firmament.Tests/FirmamentCirDifferentialAnalysisTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/FirmamentCirDifferentialAnalysisTests.cs
@@ -1,6 +1,6 @@
using Aetheris.Kernel.Core.Brep;
using Aetheris.Kernel.Core.Brep.Queries;
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Math;
using Aetheris.Kernel.Firmament.Execution;
using Aetheris.Kernel.Firmament.Materializer;
diff --git a/Aetheris.Kernel.Firmament.Tests/FirmamentCirLoweringTests.cs b/Aetheris.Kernel.Firmament.Tests/FirmamentCirLoweringTests.cs
index a1beda65..7d91ba47 100644
--- a/Aetheris.Kernel.Firmament.Tests/FirmamentCirLoweringTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/FirmamentCirLoweringTests.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Math;
using Aetheris.Kernel.Firmament.Lowering;
diff --git a/Aetheris.Kernel.Firmament.Tests/FrepMaterializerPlannerTests.cs b/Aetheris.Kernel.Firmament.Tests/FrepMaterializerPlannerTests.cs
index e4ad27d6..589e75fa 100644
--- a/Aetheris.Kernel.Firmament.Tests/FrepMaterializerPlannerTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/FrepMaterializerPlannerTests.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Firmament.Execution;
using Aetheris.Kernel.Firmament.Materializer;
diff --git a/Aetheris.Kernel.Firmament.Tests/FrepMaterializerPolicyCatalogTests.cs b/Aetheris.Kernel.Firmament.Tests/FrepMaterializerPolicyCatalogTests.cs
index 9c292ca5..0214d59d 100644
--- a/Aetheris.Kernel.Firmament.Tests/FrepMaterializerPolicyCatalogTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/FrepMaterializerPolicyCatalogTests.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Firmament.Materializer;
namespace Aetheris.Kernel.Firmament.Tests;
diff --git a/Aetheris.Kernel.Firmament.Tests/FrepSemanticRecoveryRematerializerTests.cs b/Aetheris.Kernel.Firmament.Tests/FrepSemanticRecoveryRematerializerTests.cs
index 6d1a023a..11421836 100644
--- a/Aetheris.Kernel.Firmament.Tests/FrepSemanticRecoveryRematerializerTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/FrepSemanticRecoveryRematerializerTests.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Math;
using Aetheris.Kernel.Firmament.Execution;
using Aetheris.Kernel.Firmament.Lowering;
diff --git a/Aetheris.Kernel.Firmament.Tests/HoleRecoveryExecutorPlacementDrivenTests.cs b/Aetheris.Kernel.Firmament.Tests/HoleRecoveryExecutorPlacementDrivenTests.cs
index 30fd930a..7de75a13 100644
--- a/Aetheris.Kernel.Firmament.Tests/HoleRecoveryExecutorPlacementDrivenTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/HoleRecoveryExecutorPlacementDrivenTests.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Math;
using Aetheris.Kernel.Core.Step242;
using Aetheris.Kernel.Firmament.Materializer;
diff --git a/Aetheris.Kernel.Firmament.Tests/HoleRecoveryPlacementSemanticsTests.cs b/Aetheris.Kernel.Firmament.Tests/HoleRecoveryPlacementSemanticsTests.cs
index 0e5c8625..57b5c2a2 100644
--- a/Aetheris.Kernel.Firmament.Tests/HoleRecoveryPlacementSemanticsTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/HoleRecoveryPlacementSemanticsTests.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Math;
using Aetheris.Kernel.Firmament.Materializer;
diff --git a/Aetheris.Kernel.Firmament.Tests/HoleRecoveryPolicyCoverageMatrixTests.cs b/Aetheris.Kernel.Firmament.Tests/HoleRecoveryPolicyCoverageMatrixTests.cs
index 2d35ae77..0f280381 100644
--- a/Aetheris.Kernel.Firmament.Tests/HoleRecoveryPolicyCoverageMatrixTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/HoleRecoveryPolicyCoverageMatrixTests.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Math;
using Aetheris.Kernel.Core.Step242;
using Aetheris.Kernel.Firmament.Materializer;
diff --git a/Aetheris.Kernel.Firmament.Tests/HoleRecoveryPolicyTests.cs b/Aetheris.Kernel.Firmament.Tests/HoleRecoveryPolicyTests.cs
index 6e2fd77d..0bb63df7 100644
--- a/Aetheris.Kernel.Firmament.Tests/HoleRecoveryPolicyTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/HoleRecoveryPolicyTests.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Math;
using Aetheris.Kernel.Firmament.Materializer;
diff --git a/Aetheris.Kernel.Firmament.Tests/MaterializationReadinessAnalyzerTests.cs b/Aetheris.Kernel.Firmament.Tests/MaterializationReadinessAnalyzerTests.cs
index b62d3524..37df97cd 100644
--- a/Aetheris.Kernel.Firmament.Tests/MaterializationReadinessAnalyzerTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/MaterializationReadinessAnalyzerTests.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Firmament.Execution;
using Aetheris.Kernel.Firmament.Materializer;
using Aetheris.Kernel.Firmament.Diagnostics;
diff --git a/Aetheris.Kernel.Firmament.Tests/ProfileStackExtrudeExecutorTests.cs b/Aetheris.Kernel.Firmament.Tests/ProfileStackExtrudeExecutorTests.cs
index 22a12489..e3b6509d 100644
--- a/Aetheris.Kernel.Firmament.Tests/ProfileStackExtrudeExecutorTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/ProfileStackExtrudeExecutorTests.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Math;
using Aetheris.Kernel.Core.Step242;
using Aetheris.Kernel.Firmament.Materializer;
diff --git a/Aetheris.Kernel.Firmament.Tests/ProfileStackExtrudeHoleFamilyMigrationTests.cs b/Aetheris.Kernel.Firmament.Tests/ProfileStackExtrudeHoleFamilyMigrationTests.cs
index c1215a7b..3c19d061 100644
--- a/Aetheris.Kernel.Firmament.Tests/ProfileStackExtrudeHoleFamilyMigrationTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/ProfileStackExtrudeHoleFamilyMigrationTests.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Brep;
using Aetheris.Kernel.Core.Geometry;
using Aetheris.Kernel.Core.Math;
diff --git a/Aetheris.Kernel.Firmament.Tests/RestrictedContourSnapAnalyzerTests.cs b/Aetheris.Kernel.Firmament.Tests/RestrictedContourSnapAnalyzerTests.cs
index 577cfeee..0d565a3a 100644
--- a/Aetheris.Kernel.Firmament.Tests/RestrictedContourSnapAnalyzerTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/RestrictedContourSnapAnalyzerTests.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Firmament.Execution;
using Aetheris.Kernel.Firmament.Materializer;
using Aetheris.Kernel.Firmament.Diagnostics;
diff --git a/Aetheris.Kernel.Firmament.Tests/RestrictedContourSnapSelectionTests.cs b/Aetheris.Kernel.Firmament.Tests/RestrictedContourSnapSelectionTests.cs
index 5d9464c9..985b66b9 100644
--- a/Aetheris.Kernel.Firmament.Tests/RestrictedContourSnapSelectionTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/RestrictedContourSnapSelectionTests.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Firmament.Execution;
using Aetheris.Kernel.Firmament.Materializer;
using Aetheris.Kernel.Firmament.Diagnostics;
diff --git a/Aetheris.Kernel.Firmament.Tests/RetainedLoopTrimOracleIntegrationTests.cs b/Aetheris.Kernel.Firmament.Tests/RetainedLoopTrimOracleIntegrationTests.cs
index b782583e..6152a5c8 100644
--- a/Aetheris.Kernel.Firmament.Tests/RetainedLoopTrimOracleIntegrationTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/RetainedLoopTrimOracleIntegrationTests.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Firmament.Execution;
using Aetheris.Kernel.Firmament.Materializer;
using Aetheris.Kernel.Firmament.Diagnostics;
diff --git a/Aetheris.Kernel.Firmament.Tests/ShellStitchingDryRunTests.cs b/Aetheris.Kernel.Firmament.Tests/ShellStitchingDryRunTests.cs
index 49421847..c4340a57 100644
--- a/Aetheris.Kernel.Firmament.Tests/ShellStitchingDryRunTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/ShellStitchingDryRunTests.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Firmament.Execution;
using Aetheris.Kernel.Firmament.Materializer;
using Aetheris.Kernel.Firmament.Diagnostics;
diff --git a/Aetheris.Kernel.Firmament.Tests/SourceSurfaceAndTrimCapabilityTests.cs b/Aetheris.Kernel.Firmament.Tests/SourceSurfaceAndTrimCapabilityTests.cs
index f9546efa..12b750b5 100644
--- a/Aetheris.Kernel.Firmament.Tests/SourceSurfaceAndTrimCapabilityTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/SourceSurfaceAndTrimCapabilityTests.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Math;
using Aetheris.Kernel.Firmament.Execution;
using Aetheris.Kernel.Firmament.Materializer;
diff --git a/Aetheris.Kernel.Firmament.Tests/SteppedHoleCorpusHardeningTests.cs b/Aetheris.Kernel.Firmament.Tests/SteppedHoleCorpusHardeningTests.cs
index 61511086..d37dfbea 100644
--- a/Aetheris.Kernel.Firmament.Tests/SteppedHoleCorpusHardeningTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/SteppedHoleCorpusHardeningTests.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Math;
using Aetheris.Kernel.Core.Step242;
using Aetheris.Kernel.Firmament.Materializer;
diff --git a/Aetheris.Kernel.Firmament.Tests/SteppedHolePlacementSemanticsTests.cs b/Aetheris.Kernel.Firmament.Tests/SteppedHolePlacementSemanticsTests.cs
index fbdd4536..02509408 100644
--- a/Aetheris.Kernel.Firmament.Tests/SteppedHolePlacementSemanticsTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/SteppedHolePlacementSemanticsTests.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Math;
using Aetheris.Kernel.Firmament.Materializer;
diff --git a/Aetheris.Kernel.Firmament.Tests/SteppedHoleVariantAndExecutorTests.cs b/Aetheris.Kernel.Firmament.Tests/SteppedHoleVariantAndExecutorTests.cs
index 8c503edd..9dc76447 100644
--- a/Aetheris.Kernel.Firmament.Tests/SteppedHoleVariantAndExecutorTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/SteppedHoleVariantAndExecutorTests.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Math;
using Aetheris.Kernel.Core.Step242;
using Aetheris.Kernel.Firmament.Materializer;
diff --git a/Aetheris.Kernel.Firmament.Tests/SurfaceFamilyBoxCylinderPressureTestTests.cs b/Aetheris.Kernel.Firmament.Tests/SurfaceFamilyBoxCylinderPressureTestTests.cs
index 51436239..cb03c1eb 100644
--- a/Aetheris.Kernel.Firmament.Tests/SurfaceFamilyBoxCylinderPressureTestTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/SurfaceFamilyBoxCylinderPressureTestTests.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Firmament.Execution;
using Aetheris.Kernel.Firmament.Materializer;
using Aetheris.Kernel.Firmament.Diagnostics;
diff --git a/Aetheris.Kernel.Firmament.Tests/SurfaceFamilyShellAssemblerTests.cs b/Aetheris.Kernel.Firmament.Tests/SurfaceFamilyShellAssemblerTests.cs
index 80dcd820..1c3d5370 100644
--- a/Aetheris.Kernel.Firmament.Tests/SurfaceFamilyShellAssemblerTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/SurfaceFamilyShellAssemblerTests.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Firmament.Execution;
using Aetheris.Kernel.Firmament.Materializer;
using Aetheris.Kernel.Firmament.Diagnostics;
diff --git a/Aetheris.Kernel.Firmament.Tests/SurfaceFamilyStitchCandidatePlannerTests.cs b/Aetheris.Kernel.Firmament.Tests/SurfaceFamilyStitchCandidatePlannerTests.cs
index 8f1b7100..6b1d69c3 100644
--- a/Aetheris.Kernel.Firmament.Tests/SurfaceFamilyStitchCandidatePlannerTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/SurfaceFamilyStitchCandidatePlannerTests.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Firmament.Execution;
using Aetheris.Kernel.Firmament.Materializer;
using Aetheris.Kernel.Firmament.Diagnostics;
diff --git a/Aetheris.Kernel.Firmament.Tests/SurfaceFamilyStitchExecutorTests.cs b/Aetheris.Kernel.Firmament.Tests/SurfaceFamilyStitchExecutorTests.cs
index 92c09f3a..1ae97774 100644
--- a/Aetheris.Kernel.Firmament.Tests/SurfaceFamilyStitchExecutorTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/SurfaceFamilyStitchExecutorTests.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Firmament.Execution;
using Aetheris.Kernel.Firmament.Materializer;
using Aetheris.Kernel.Firmament.Diagnostics;
diff --git a/Aetheris.Kernel.Firmament.Tests/SurfacePatchDescriptorScaffoldTests.cs b/Aetheris.Kernel.Firmament.Tests/SurfacePatchDescriptorScaffoldTests.cs
index fe79d4ae..b925b286 100644
--- a/Aetheris.Kernel.Firmament.Tests/SurfacePatchDescriptorScaffoldTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/SurfacePatchDescriptorScaffoldTests.cs
@@ -1,7 +1,7 @@
using Aetheris.Kernel.Core.Brep;
using Aetheris.Kernel.Core.Geometry;
using Aetheris.Kernel.Core.Math;
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Firmament.Execution;
using Aetheris.Kernel.Firmament.Materializer;
using Aetheris.Kernel.Firmament.Diagnostics;
@@ -14,7 +14,7 @@ public sealed class SurfacePatchDescriptorScaffoldTests
public void SourceSurfaceDescriptor_Box_ProducesSixPlanarDescriptors()
{
var descriptors = Enumerable.Range(0, 6)
- .Select(i => new SourceSurfaceDescriptor(SurfacePatchFamily.Planar, $"box-face-{i}", null, null, Transform3D.Identity, "cir:box", nameof(Aetheris.Kernel.Core.Cir.CirBoxNode), 0, FacePatchOrientationRole.Forward))
+ .Select(i => new SourceSurfaceDescriptor(SurfacePatchFamily.Planar, $"box-face-{i}", null, null, Transform3D.Identity, "cir:box", nameof(Aetheris.Continuum.Backends.Sdf.CirBoxNode), 0, FacePatchOrientationRole.Forward))
.ToArray();
Assert.Equal(6, descriptors.Length);
@@ -25,9 +25,9 @@ public sealed class SurfacePatchDescriptorScaffoldTests
[Fact]
public void SourceSurfaceDescriptor_Cylinder_ProducesCylindricalAndPlanarDescriptors()
{
- var side = new SourceSurfaceDescriptor(SurfacePatchFamily.Cylindrical, "side", null, null, Transform3D.Identity, "cir:cylinder:side", nameof(Aetheris.Kernel.Core.Cir.CirCylinderNode), 1, FacePatchOrientationRole.Forward);
- var top = new SourceSurfaceDescriptor(SurfacePatchFamily.Planar, "cap-top", null, null, Transform3D.Identity, "cir:cylinder:cap-top", nameof(Aetheris.Kernel.Core.Cir.CirCylinderNode), 1, FacePatchOrientationRole.Forward);
- var bottom = new SourceSurfaceDescriptor(SurfacePatchFamily.Planar, "cap-bottom", null, null, Transform3D.Identity, "cir:cylinder:cap-bottom", nameof(Aetheris.Kernel.Core.Cir.CirCylinderNode), 1, FacePatchOrientationRole.Reversed);
+ var side = new SourceSurfaceDescriptor(SurfacePatchFamily.Cylindrical, "side", null, null, Transform3D.Identity, "cir:cylinder:side", nameof(Aetheris.Continuum.Backends.Sdf.CirCylinderNode), 1, FacePatchOrientationRole.Forward);
+ var top = new SourceSurfaceDescriptor(SurfacePatchFamily.Planar, "cap-top", null, null, Transform3D.Identity, "cir:cylinder:cap-top", nameof(Aetheris.Continuum.Backends.Sdf.CirCylinderNode), 1, FacePatchOrientationRole.Forward);
+ var bottom = new SourceSurfaceDescriptor(SurfacePatchFamily.Planar, "cap-bottom", null, null, Transform3D.Identity, "cir:cylinder:cap-bottom", nameof(Aetheris.Continuum.Backends.Sdf.CirCylinderNode), 1, FacePatchOrientationRole.Reversed);
Assert.Equal(SurfacePatchFamily.Cylindrical, side.Family);
Assert.Equal(SurfacePatchFamily.Planar, top.Family);
@@ -37,14 +37,14 @@ public sealed class SurfacePatchDescriptorScaffoldTests
[Fact]
public void SourceSurfaceDescriptor_Sphere_ProducesSphericalDescriptor()
{
- var sphere = new SourceSurfaceDescriptor(SurfacePatchFamily.Spherical, "sphere", null, null, Transform3D.Identity, "cir:sphere", nameof(Aetheris.Kernel.Core.Cir.CirSphereNode), 2, FacePatchOrientationRole.Forward);
+ var sphere = new SourceSurfaceDescriptor(SurfacePatchFamily.Spherical, "sphere", null, null, Transform3D.Identity, "cir:sphere", nameof(Aetheris.Continuum.Backends.Sdf.CirSphereNode), 2, FacePatchOrientationRole.Forward);
Assert.Equal(SurfacePatchFamily.Spherical, sphere.Family);
}
[Fact]
public void SourceSurfaceDescriptor_Torus_ProducesToroidalDescriptorUnsupportedMaterializer()
{
- var source = new SourceSurfaceDescriptor(SurfacePatchFamily.Toroidal, "torus", null, null, Transform3D.Identity, "cir:torus", nameof(Aetheris.Kernel.Core.Cir.CirTorusNode), 3, FacePatchOrientationRole.Forward);
+ var source = new SourceSurfaceDescriptor(SurfacePatchFamily.Toroidal, "torus", null, null, Transform3D.Identity, "cir:torus", nameof(Aetheris.Continuum.Backends.Sdf.CirTorusNode), 3, FacePatchOrientationRole.Forward);
var patch = new FacePatchDescriptor(source, [], [], FacePatchOrientationRole.Forward, "tool-surface", []);
var eval = SurfaceFamilyMaterializerRegistry.Evaluate(patch);
@@ -56,7 +56,7 @@ public sealed class SurfacePatchDescriptorScaffoldTests
[Fact]
public void SurfaceFamilyRegistry_SelectsPlanarForPlanarPatch()
{
- var source = new SourceSurfaceDescriptor(SurfacePatchFamily.Planar, "plane", null, null, Transform3D.Identity, "cir:box", nameof(Aetheris.Kernel.Core.Cir.CirBoxNode), 0, FacePatchOrientationRole.Forward);
+ var source = new SourceSurfaceDescriptor(SurfacePatchFamily.Planar, "plane", null, null, Transform3D.Identity, "cir:box", nameof(Aetheris.Continuum.Backends.Sdf.CirBoxNode), 0, FacePatchOrientationRole.Forward);
var trim = new TrimCurveDescriptor(TrimCurveFamily.Line, "edge-0", "loop:outer", 0, new ParameterInterval(0, 1), TrimCurveCapability.ExactSupported);
var patch = new FacePatchDescriptor(source, [trim], [], FacePatchOrientationRole.Forward, "outer", []);
@@ -69,7 +69,7 @@ public sealed class SurfacePatchDescriptorScaffoldTests
[Fact]
public void SurfaceFamilyRegistry_RejectsWrongFamilyWithReasons()
{
- var source = new SourceSurfaceDescriptor(SurfacePatchFamily.Spherical, "sphere", null, null, Transform3D.Identity, "cir:sphere", nameof(Aetheris.Kernel.Core.Cir.CirSphereNode), 4, FacePatchOrientationRole.Forward);
+ var source = new SourceSurfaceDescriptor(SurfacePatchFamily.Spherical, "sphere", null, null, Transform3D.Identity, "cir:sphere", nameof(Aetheris.Continuum.Backends.Sdf.CirSphereNode), 4, FacePatchOrientationRole.Forward);
var patch = new FacePatchDescriptor(source, [], [], FacePatchOrientationRole.Forward, "outer", []);
var eval = SurfaceFamilyMaterializerRegistry.Evaluate(patch);
diff --git a/Aetheris.Kernel.Firmament.Tests/SurfaceRestrictedFieldMarchingSquaresTests.cs b/Aetheris.Kernel.Firmament.Tests/SurfaceRestrictedFieldMarchingSquaresTests.cs
index 01c56b78..1380b7b9 100644
--- a/Aetheris.Kernel.Firmament.Tests/SurfaceRestrictedFieldMarchingSquaresTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/SurfaceRestrictedFieldMarchingSquaresTests.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Firmament.Execution;
using Aetheris.Kernel.Firmament.Materializer;
using Aetheris.Kernel.Firmament.Diagnostics;
diff --git a/Aetheris.Kernel.Firmament.Tests/SurfaceRestrictedFieldTests.cs b/Aetheris.Kernel.Firmament.Tests/SurfaceRestrictedFieldTests.cs
index 8072d754..629b4698 100644
--- a/Aetheris.Kernel.Firmament.Tests/SurfaceRestrictedFieldTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/SurfaceRestrictedFieldTests.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Math;
using Aetheris.Kernel.Firmament.Execution;
using Aetheris.Kernel.Firmament.Materializer;
diff --git a/Aetheris.Kernel.Firmament.Tests/SurfaceTrimContourStitcherTests.cs b/Aetheris.Kernel.Firmament.Tests/SurfaceTrimContourStitcherTests.cs
index 5c078fb9..f461c6b5 100644
--- a/Aetheris.Kernel.Firmament.Tests/SurfaceTrimContourStitcherTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/SurfaceTrimContourStitcherTests.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Math;
using Aetheris.Kernel.Firmament.Execution;
using Aetheris.Kernel.Firmament.Materializer;
diff --git a/Aetheris.Kernel.Firmament.Tests/ThroughHoleRecoveryExecutorTests.cs b/Aetheris.Kernel.Firmament.Tests/ThroughHoleRecoveryExecutorTests.cs
index bb4128cf..938026d5 100644
--- a/Aetheris.Kernel.Firmament.Tests/ThroughHoleRecoveryExecutorTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/ThroughHoleRecoveryExecutorTests.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Geometry;
using Aetheris.Kernel.Core.Geometry.Surfaces;
using Aetheris.Kernel.Core.Math;
diff --git a/Aetheris.Kernel.Firmament.Tests/ThroughHoleRecoveryPolicyTests.cs b/Aetheris.Kernel.Firmament.Tests/ThroughHoleRecoveryPolicyTests.cs
index 56cb2177..ec4e53a7 100644
--- a/Aetheris.Kernel.Firmament.Tests/ThroughHoleRecoveryPolicyTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/ThroughHoleRecoveryPolicyTests.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Math;
using Aetheris.Kernel.Core.Numerics;
using Aetheris.Kernel.Firmament.Materializer;
diff --git a/Aetheris.Kernel.Firmament.Tests/ThroughHoleRecoveryStepSmokeTests.cs b/Aetheris.Kernel.Firmament.Tests/ThroughHoleRecoveryStepSmokeTests.cs
index 2bc46f6f..3557a6c8 100644
--- a/Aetheris.Kernel.Firmament.Tests/ThroughHoleRecoveryStepSmokeTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/ThroughHoleRecoveryStepSmokeTests.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Geometry;
using Aetheris.Kernel.Core.Math;
using Aetheris.Kernel.Core.Step242;
diff --git a/Aetheris.Kernel.Firmament.Tests/TieredTrimRepresentationBuilderTests.cs b/Aetheris.Kernel.Firmament.Tests/TieredTrimRepresentationBuilderTests.cs
index b798d359..58df6579 100644
--- a/Aetheris.Kernel.Firmament.Tests/TieredTrimRepresentationBuilderTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/TieredTrimRepresentationBuilderTests.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Firmament.Execution;
using Aetheris.Kernel.Firmament.Materializer;
using Aetheris.Kernel.Firmament.Diagnostics;
diff --git a/Aetheris.Kernel.Firmament.Tests/TopologyAssemblyDryRunTests.cs b/Aetheris.Kernel.Firmament.Tests/TopologyAssemblyDryRunTests.cs
index dd86e383..2e9bef8f 100644
--- a/Aetheris.Kernel.Firmament.Tests/TopologyAssemblyDryRunTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/TopologyAssemblyDryRunTests.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Firmament.Execution;
using Aetheris.Kernel.Firmament.Materializer;
using Aetheris.Kernel.Firmament.Diagnostics;
diff --git a/Aetheris.Kernel.Firmament.Tests/TopologyPairingEvidenceTests.cs b/Aetheris.Kernel.Firmament.Tests/TopologyPairingEvidenceTests.cs
index 9ac448d1..4086bbcb 100644
--- a/Aetheris.Kernel.Firmament.Tests/TopologyPairingEvidenceTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/TopologyPairingEvidenceTests.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Firmament.Execution;
using Aetheris.Kernel.Firmament.Materializer;
using Aetheris.Kernel.Firmament.Diagnostics;
diff --git a/Aetheris.Kernel.Firmament/Aetheris.Kernel.Firmament.csproj b/Aetheris.Kernel.Firmament/Aetheris.Kernel.Firmament.csproj
index 93cf8847..61e4a4e3 100644
--- a/Aetheris.Kernel.Firmament/Aetheris.Kernel.Firmament.csproj
+++ b/Aetheris.Kernel.Firmament/Aetheris.Kernel.Firmament.csproj
@@ -6,6 +6,7 @@
</PropertyGroup>
<ItemGroup>
+ <ProjectReference Include="..\Aetheris.Continuum\Aetheris.Continuum.csproj" />
<ProjectReference Include="..\Aetheris.Kernel.Core\Aetheris.Kernel.Core.csproj" />
<ProjectReference Include="..\Aetheris.Kernel.StandardLibrary\Aetheris.Kernel.StandardLibrary.csproj" />
<ProjectReference Include="..\Aetheris.Forge\Aetheris.Forge.csproj" />
diff --git a/Aetheris.Kernel.Firmament/Analysis/CirNativeAnalysisService.cs b/Aetheris.Kernel.Firmament/Analysis/CirNativeAnalysisService.cs
index 48b7c4c9..3617405a 100644
--- a/Aetheris.Kernel.Firmament/Analysis/CirNativeAnalysisService.cs
+++ b/Aetheris.Kernel.Firmament/Analysis/CirNativeAnalysisService.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Diagnostics;
using Aetheris.Kernel.Core.Math;
using Aetheris.Kernel.Core.Results;
diff --git a/Aetheris.Kernel.Firmament/Diagnostics/EmittedTokenPairingAnalyzer.cs b/Aetheris.Kernel.Firmament/Diagnostics/EmittedTokenPairingAnalyzer.cs
index db308141..fed9870e 100644
--- a/Aetheris.Kernel.Firmament/Diagnostics/EmittedTokenPairingAnalyzer.cs
+++ b/Aetheris.Kernel.Firmament/Diagnostics/EmittedTokenPairingAnalyzer.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Firmament.Execution;
namespace Aetheris.Kernel.Firmament.Diagnostics;
diff --git a/Aetheris.Kernel.Firmament/Diagnostics/FacePatchCandidateDryRun.cs b/Aetheris.Kernel.Firmament/Diagnostics/FacePatchCandidateDryRun.cs
index 59fdf7f1..b77917a3 100644
--- a/Aetheris.Kernel.Firmament/Diagnostics/FacePatchCandidateDryRun.cs
+++ b/Aetheris.Kernel.Firmament/Diagnostics/FacePatchCandidateDryRun.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Math;
using Aetheris.Kernel.Firmament.Execution;
diff --git a/Aetheris.Kernel.Firmament/Diagnostics/MaterializationReadinessAnalyzer.cs b/Aetheris.Kernel.Firmament/Diagnostics/MaterializationReadinessAnalyzer.cs
index bee8fc30..2bff549d 100644
--- a/Aetheris.Kernel.Firmament/Diagnostics/MaterializationReadinessAnalyzer.cs
+++ b/Aetheris.Kernel.Firmament/Diagnostics/MaterializationReadinessAnalyzer.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Firmament.Execution;
namespace Aetheris.Kernel.Firmament.Diagnostics;
diff --git a/Aetheris.Kernel.Firmament/Diagnostics/ShellStitchingDryRun.cs b/Aetheris.Kernel.Firmament/Diagnostics/ShellStitchingDryRun.cs
index e71dced0..aacf97a9 100644
--- a/Aetheris.Kernel.Firmament/Diagnostics/ShellStitchingDryRun.cs
+++ b/Aetheris.Kernel.Firmament/Diagnostics/ShellStitchingDryRun.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Firmament.Execution;
namespace Aetheris.Kernel.Firmament.Diagnostics;
diff --git a/Aetheris.Kernel.Firmament/Diagnostics/SurfaceFamilyBoxCylinderPressureTest.cs b/Aetheris.Kernel.Firmament/Diagnostics/SurfaceFamilyBoxCylinderPressureTest.cs
index 361fc908..3d26cffc 100644
--- a/Aetheris.Kernel.Firmament/Diagnostics/SurfaceFamilyBoxCylinderPressureTest.cs
+++ b/Aetheris.Kernel.Firmament/Diagnostics/SurfaceFamilyBoxCylinderPressureTest.cs
@@ -1,5 +1,5 @@
using Aetheris.Kernel.Core.Brep;
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Step242;
using Aetheris.Kernel.Firmament.Execution;
diff --git a/Aetheris.Kernel.Firmament/Diagnostics/SurfacePatchDescriptorScaffold.cs b/Aetheris.Kernel.Firmament/Diagnostics/SurfacePatchDescriptorScaffold.cs
index 85a99201..e44da459 100644
--- a/Aetheris.Kernel.Firmament/Diagnostics/SurfacePatchDescriptorScaffold.cs
+++ b/Aetheris.Kernel.Firmament/Diagnostics/SurfacePatchDescriptorScaffold.cs
@@ -1,5 +1,5 @@
using Aetheris.Kernel.Core.Geometry;
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Geometry.Curves;
using Aetheris.Kernel.Core.Geometry.Surfaces;
using Aetheris.Kernel.Core.Brep;
diff --git a/Aetheris.Kernel.Firmament/Diagnostics/TopologyAssemblyDryRun.cs b/Aetheris.Kernel.Firmament/Diagnostics/TopologyAssemblyDryRun.cs
index 140e27f0..737e41da 100644
--- a/Aetheris.Kernel.Firmament/Diagnostics/TopologyAssemblyDryRun.cs
+++ b/Aetheris.Kernel.Firmament/Diagnostics/TopologyAssemblyDryRun.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Firmament.Execution;
namespace Aetheris.Kernel.Firmament.Diagnostics;
diff --git a/Aetheris.Kernel.Firmament/Diagnostics/TopologyPairingEvidenceDryRun.cs b/Aetheris.Kernel.Firmament/Diagnostics/TopologyPairingEvidenceDryRun.cs
index 2eb84670..aff2b5ac 100644
--- a/Aetheris.Kernel.Firmament/Diagnostics/TopologyPairingEvidenceDryRun.cs
+++ b/Aetheris.Kernel.Firmament/Diagnostics/TopologyPairingEvidenceDryRun.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Firmament.Execution;
namespace Aetheris.Kernel.Firmament.Diagnostics;
diff --git a/Aetheris.Kernel.Firmament/Execution/RetainedLoopTrimOracleIntegrator.cs b/Aetheris.Kernel.Firmament/Execution/RetainedLoopTrimOracleIntegrator.cs
index f093c0e7..5f983f21 100644
--- a/Aetheris.Kernel.Firmament/Execution/RetainedLoopTrimOracleIntegrator.cs
+++ b/Aetheris.Kernel.Firmament/Execution/RetainedLoopTrimOracleIntegrator.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
namespace Aetheris.Kernel.Firmament.Execution;
diff --git a/Aetheris.Kernel.Firmament/Execution/SelectedOppositeFieldBuilder.cs b/Aetheris.Kernel.Firmament/Execution/SelectedOppositeFieldBuilder.cs
index 33a75624..7209e64a 100644
--- a/Aetheris.Kernel.Firmament/Execution/SelectedOppositeFieldBuilder.cs
+++ b/Aetheris.Kernel.Firmament/Execution/SelectedOppositeFieldBuilder.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Math;
namespace Aetheris.Kernel.Firmament.Execution;
diff --git a/Aetheris.Kernel.Firmament/Execution/SourceSurfaceExtraction.cs b/Aetheris.Kernel.Firmament/Execution/SourceSurfaceExtraction.cs
index cdb11a24..2b1b0e39 100644
--- a/Aetheris.Kernel.Firmament/Execution/SourceSurfaceExtraction.cs
+++ b/Aetheris.Kernel.Firmament/Execution/SourceSurfaceExtraction.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Math;
namespace Aetheris.Kernel.Firmament.Execution;
diff --git a/Aetheris.Kernel.Firmament/Execution/SurfaceFamilyShellAssembler.cs b/Aetheris.Kernel.Firmament/Execution/SurfaceFamilyShellAssembler.cs
index 85c382f4..05cb92f5 100644
--- a/Aetheris.Kernel.Firmament/Execution/SurfaceFamilyShellAssembler.cs
+++ b/Aetheris.Kernel.Firmament/Execution/SurfaceFamilyShellAssembler.cs
@@ -1,5 +1,5 @@
using Aetheris.Kernel.Core.Brep;
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
namespace Aetheris.Kernel.Firmament.Execution;
diff --git a/Aetheris.Kernel.Firmament/Execution/SurfaceFamilyStitchCandidatePlanner.cs b/Aetheris.Kernel.Firmament/Execution/SurfaceFamilyStitchCandidatePlanner.cs
index 946492e1..5ba81f38 100644
--- a/Aetheris.Kernel.Firmament/Execution/SurfaceFamilyStitchCandidatePlanner.cs
+++ b/Aetheris.Kernel.Firmament/Execution/SurfaceFamilyStitchCandidatePlanner.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
namespace Aetheris.Kernel.Firmament.Execution;
diff --git a/Aetheris.Kernel.Firmament/Execution/SurfaceRestrictedField.cs b/Aetheris.Kernel.Firmament/Execution/SurfaceRestrictedField.cs
index 5c0153c2..47b24288 100644
--- a/Aetheris.Kernel.Firmament/Execution/SurfaceRestrictedField.cs
+++ b/Aetheris.Kernel.Firmament/Execution/SurfaceRestrictedField.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Math;
using Aetheris.Kernel.Core.Numerics;
diff --git a/Aetheris.Kernel.Firmament/Execution/TieredTrimRepresentationBuilder.cs b/Aetheris.Kernel.Firmament/Execution/TieredTrimRepresentationBuilder.cs
index 5e22d956..3dffa601 100644
--- a/Aetheris.Kernel.Firmament/Execution/TieredTrimRepresentationBuilder.cs
+++ b/Aetheris.Kernel.Firmament/Execution/TieredTrimRepresentationBuilder.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
namespace Aetheris.Kernel.Firmament.Execution;
diff --git a/Aetheris.Kernel.Firmament/Lowering/FirmamentCirLowerer.cs b/Aetheris.Kernel.Firmament/Lowering/FirmamentCirLowerer.cs
index 99d77934..fa465458 100644
--- a/Aetheris.Kernel.Firmament/Lowering/FirmamentCirLowerer.cs
+++ b/Aetheris.Kernel.Firmament/Lowering/FirmamentCirLowerer.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Math;
using Aetheris.Kernel.Core.Diagnostics;
using Aetheris.Kernel.Core.Results;
diff --git a/Aetheris.Kernel.Firmament/Materializer/CirBoxCylinderRecognizer.cs b/Aetheris.Kernel.Firmament/Materializer/CirBoxCylinderRecognizer.cs
index 45e2d369..e1d258cc 100644
--- a/Aetheris.Kernel.Firmament/Materializer/CirBoxCylinderRecognizer.cs
+++ b/Aetheris.Kernel.Firmament/Materializer/CirBoxCylinderRecognizer.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Math;
using Aetheris.Kernel.Core.Numerics;
using Aetheris.Kernel.Firmament.Execution;
diff --git a/Aetheris.Kernel.Firmament/Materializer/CirBrepMaterializer.cs b/Aetheris.Kernel.Firmament/Materializer/CirBrepMaterializer.cs
index d47e0909..90e21c19 100644
--- a/Aetheris.Kernel.Firmament/Materializer/CirBrepMaterializer.cs
+++ b/Aetheris.Kernel.Firmament/Materializer/CirBrepMaterializer.cs
@@ -1,6 +1,6 @@
using Aetheris.Kernel.Core.Brep;
using Aetheris.Kernel.Core.Brep.Boolean;
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Diagnostics;
using Aetheris.Kernel.Core.Judgment;
using Aetheris.Kernel.Core.Math;
diff --git a/Aetheris.Kernel.Firmament/Materializer/FrepMaterializerPlanner.cs b/Aetheris.Kernel.Firmament/Materializer/FrepMaterializerPlanner.cs
index 08b0d9b3..b64893ec 100644
--- a/Aetheris.Kernel.Firmament/Materializer/FrepMaterializerPlanner.cs
+++ b/Aetheris.Kernel.Firmament/Materializer/FrepMaterializerPlanner.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Judgment;
using Aetheris.Kernel.Firmament.Execution;
diff --git a/Aetheris.Kernel.Firmament/Materializer/FrepSemanticRecoveryRematerializer.cs b/Aetheris.Kernel.Firmament/Materializer/FrepSemanticRecoveryRematerializer.cs
index d686f9db..4fe6bf38 100644
--- a/Aetheris.Kernel.Firmament/Materializer/FrepSemanticRecoveryRematerializer.cs
+++ b/Aetheris.Kernel.Firmament/Materializer/FrepSemanticRecoveryRematerializer.cs
@@ -1,5 +1,5 @@
using Aetheris.Kernel.Core.Brep;
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Firmament.Execution;
namespace Aetheris.Kernel.Firmament.Materializer;
diff --git a/Aetheris.Kernel.Firmament/Materializer/HoleRecoveryPolicy.cs b/Aetheris.Kernel.Firmament/Materializer/HoleRecoveryPolicy.cs
index d27cf2b9..8d6a70b1 100644
--- a/Aetheris.Kernel.Firmament/Materializer/HoleRecoveryPolicy.cs
+++ b/Aetheris.Kernel.Firmament/Materializer/HoleRecoveryPolicy.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Judgment;
namespace Aetheris.Kernel.Firmament.Materializer;
@@ -550,11 +550,11 @@ internal sealed class CounterboreVariant : IHoleRecoveryVariant
return new(Name, true, Score, plan, evidence, Array.Empty<string>(), ["CounterboreVariant admitted canonical nested subtract pattern."]);
}
- internal static bool TryUnwrapTranslation(Aetheris.Kernel.Core.Cir.CirNode node, out Aetheris.Kernel.Core.Cir.CirNode unwrapped, out Aetheris.Kernel.Core.Math.Vector3D translation)
+ internal static bool TryUnwrapTranslation(Aetheris.Continuum.Backends.Sdf.CirNode node, out Aetheris.Continuum.Backends.Sdf.CirNode unwrapped, out Aetheris.Kernel.Core.Math.Vector3D translation)
{
unwrapped = node;
translation = Aetheris.Kernel.Core.Math.Vector3D.Zero;
- while (unwrapped is Aetheris.Kernel.Core.Cir.CirTransformNode transformNode)
+ while (unwrapped is Aetheris.Continuum.Backends.Sdf.CirTransformNode transformNode)
{
var origin = transformNode.Transform.Apply(Aetheris.Kernel.Core.Math.Point3D.Origin);
var x = transformNode.Transform.Apply(new Aetheris.Kernel.Core.Math.Point3D(1d, 0d, 0d));
diff --git a/Aetheris.Kernel.Firmament/Materializer/NativeGeometryRematerializer.cs b/Aetheris.Kernel.Firmament/Materializer/NativeGeometryRematerializer.cs
index 5edbcf49..ed407bb6 100644
--- a/Aetheris.Kernel.Firmament/Materializer/NativeGeometryRematerializer.cs
+++ b/Aetheris.Kernel.Firmament/Materializer/NativeGeometryRematerializer.cs
@@ -1,4 +1,4 @@
-using Aetheris.Kernel.Core.Cir;
+using Aetheris.Continuum.Backends.Sdf;
using Aetheris.Kernel.Core.Diagnostics;
using Aetheris.Kernel.Core.Results;
using Aetheris.Kernel.Firmament.Lowering;
diff --git a/Aetheris.slnx b/Aetheris.slnx
index 2f9c1456..e97eac77 100644
--- a/Aetheris.slnx
+++ b/Aetheris.slnx
@@ -2,6 +2,8 @@
<Project Path="Aetheris.Server/Aetheris.Server.csproj" />
<Project Path="Aetheris.Server.Tests/Aetheris.Server.Tests.csproj" />
<Project Path="Aetheris.Kernel.Core/Aetheris.Kernel.Core.csproj" />
+ <Project Path="Aetheris.Continuum/Aetheris.Continuum.csproj" />
+ <Project Path="Aetheris.Continuum.Tests/Aetheris.Continuum.Tests.csproj" />
<Project Path="Aetheris.Forge/Aetheris.Forge.csproj" />
<Project Path="Aetheris.Kernel.StandardLibrary/Aetheris.Kernel.StandardLibrary.csproj" />
<Project Path="Aetheris.Kernel.Firmament/Aetheris.Kernel.Firmament.csproj" />
diff --git a/README.md b/README.md
index e9f5de8d..895d86e1 100644
--- a/README.md
+++ b/README.md
@@ -94,6 +94,7 @@ export PATH="$HOME/.dotnet:$PATH"
dotnet test Aetheris.Kernel.Firmament.Tests/Aetheris.Kernel.Firmament.Tests.csproj --logger "console;verbosity=minimal"
dotnet test Aetheris.Server.Tests/Aetheris.Server.Tests.csproj --logger "console;verbosity=minimal"
dotnet test Aetheris.Kernel.Core.Tests/Aetheris.Kernel.Core.Tests.csproj --logger "console;verbosity=minimal"
+dotnet test Aetheris.Continuum.Tests/Aetheris.Continuum.Tests.csproj --logger "console;verbosity=minimal"
```
If you want the same script with a narrower or broader explicit project list, pass the test projects as arguments:
@@ -122,6 +123,9 @@ Use `Aetheris.slnx` as the only solution entrypoint. For legacy Firmament V1/Fri
## Repo map
+- exact kernel math, geometry, and BRep: `Aetheris.Kernel.Core/`
+- occupied-region, SDF backend, and lattice experiments: `Aetheris.Continuum/`
+- Continuum architecture and M0 evidence: `docs/continuum/`
- language/compiler/runtime: `Aetheris.Kernel.Firmament/`
- examples: `testdata/firmament/examples/`
- exported STEP artifacts: `testdata/firmament/exports/`
diff --git a/docs/continuum/architecture.md b/docs/continuum/architecture.md
new file mode 100644
index 00000000..cf6d1ce4
--- /dev/null
+++ b/docs/continuum/architecture.md
@@ -0,0 +1,104 @@
+# Aetheris Continuum architecture
+
+## Definition and authority
+
+**CIR means Continuum Implicit Representation.** A CIR value represents an occupied continuum region, optionally partitioned into material or semantic regions, through spatial queries. Occupancy is fundamental. Signed distance, gradients, projection, and exact cell classification are optional capabilities.
+
+CIR is not inherently an SDF, mesh, BRep, CSG tree, NURBS model, or topology graph. SDF is one CIR evaluation backend.
+
+Authority is deliberately split:
+
+| Representation | Owns | Does not silently own |
+| --- | --- | --- |
+| BRep | exact faces, edges, vertices, trims, adjacency, orientation, topology identity, STEP interchange, semantic boundary ownership, and provenance | occupied-field sampling or regular-cell state |
+| CIR | occupied-space classification, continuum/material regions, implicit fields, cell occupancy, and geometry sampling | exact boundary topology or stable face/edge identity |
+| SurfaceMeshIR | derived structured approximation of the BRep boundary for tessellation, DCC, STL, and possible candidate-cell acceleration | occupancy or exact-boundary authority |
+| SDF backend | distance-like evaluation, analytic primitives, field composition, transforms, intervals, gradients where exposed, and sampling support | the definition of CIR |
+
+Implicit representations remain because they are unusually strong for occupancy, material fields, distance/proximity cues, Boolean-like volumetric classification, regular lattices, and continuum analysis—not as a fallback attempt to replace exact BRep.
+
+The dependency direction is `Aetheris.Continuum -> Aetheris.Kernel.Core`. Core supplies general math, tolerances, JudgmentEngine, and exact geometry/BRep types. Core must not reference Continuum.
+
+## Pre-extraction audit (AETHERIS-CONTINUUM-M0)
+
+This inventory was written before implementation movement. The eight files under `Aetheris.Kernel.Core/Cir` totaled 1,893 lines.
+
+| Existing item | Location/capability | Class | M0 disposition |
+| --- | --- | --- | --- |
+| `CirNode`, `CirBounds`, point classification | `Core/Cir/CirNode.cs`, `CirAnalysis.cs` | A: CIR concept mixed with B: SDF contract | split broad CIR contracts from signed-distance backend; retain narrow legacy names only in the backend |
+| analytic box, cylinder, cone, sphere, torus | `Core/Cir/CirNodes.cs` | B: SDF backend | move without rewriting |
+| union, subtraction, intersection, transforms | `Core/Cir/CirNodes.cs` | B: SDF field/composition backend | move without rewriting |
+| dense volume sampler | `CirNodes.cs` | A/B: continuum sampling tied to SDF nodes | move; new lattice sampling becomes representation-neutral |
+| tape instructions, payloads, lowering, point evaluation | `Core/Cir/CirTape.cs` | B: SDF backend | move intact under the SDF backend |
+| conservative field intervals and region classification | `CirTape.cs` | B with A-facing capability | move; expose through optional cell-bounds classification capability |
+| adaptive volume estimator | `CirAdaptiveVolumeEstimator.cs` | D: continuum experiment tied to SDF tape | move to Continuum; preserve regression behavior |
+| `CirRegionPlanner` using `JudgmentEngine` | `CirRegionPlanner.cs` | D: continuum strategy selection | move to Continuum; it correctly uses explicit admissibility/scoring |
+| mirror admission/provenance metadata | `CirMirrorMetadata.cs` | D/E: AIR consumer bridge and experimental policy | move out of Core; preserve as internal compatibility surface |
+| convex prismatic mirror and top-view map | `Cir/Mirrors/CirConvexPolyhedronMirror.cs` | D: AIR/prismatic consumer-specific implicit mirror | move out of Core; keep dependency on Core prismatic/math types |
+| `AirCirMirrorAdapter` | `Core/Air/AirCirMirrorAdapter.cs` | D: misplaced AIR-to-CIR consumer adapter | move with Continuum so Core does not depend on Continuum |
+| `Point3D`, `Vector3D`, `Transform3D` | `Core/Math` | C: general kernel utility | remain in Core |
+| `ToleranceContext` | `Core/Numerics` | C: general kernel utility | remain in Core |
+| `JudgmentEngine` | `Core/Judgment` | C: general bounded-strategy utility | remain in Core |
+| Firmament CIR lowering | `Kernel.Firmament/Lowering/FirmamentCirLowerer.cs` | D: consumer/compiler bridge | remain in Firmament and reference Continuum |
+| Firmament analysis/materializers/recovery | `Kernel.Firmament/Analysis`, `Materializer`, and related execution | D plus E: bounded consumers and historically overextended CIR-to-BRep experiments | remain consumers; generic rematerialization redesign is out of M0 |
+| CLI | no direct CIR implementation dependency found; CIR data is exposed through Firmament/AIR summaries | D: transitive consumer | no new direct authority path |
+| Core CIR tests | 11 focused files under `Kernel.Core.Tests/Cir` plus AIR mirror tests | tests owned by old location | move CIR/SDF regression ownership to `Aetheris.Continuum.Tests`; leave genuinely Core tests in Core |
+| Firmament/FrictionLab tests | lowering, analysis, recovery, and experimental mirror coverage | consumer regression tests | retain in consumer test assemblies and update references |
+| serialization/debug | no general CIR serializer; diagnostics are records/strings and CLI summaries | E: incomplete | add deterministic lattice JSON diagnostics in Continuum; do not invent persistence format |
+| gradients/normals | no general public CIR gradient contract found; SDF tape provides values/intervals only | E: missing capability seam | add optional capability; finite-difference SDF adapter may implement it |
+| generic BRep -> CIR | none; existing paths primarily lower constructive Firmament/AIR to CIR or narrowly rematerialize CIR to BRep | E: absent and major | explicitly not required for M0 |
+
+### Old architecture problems
+
+The public `CirNode.Evaluate` contract made CIR look synonymous with a scalar signed-distance evaluator. Continuum implementation, SDF bytecode, adaptive sampling policy, AIR mirror provenance, and prismatic consumer experiments all lived in Core. This made Core appear to own an implicit-modeling authority while Firmament also used CIR in the opposite direction for narrow BRep recovery. The assembly boundary did not communicate the now-established authority split.
+
+### BRep and boundary identity
+
+A cut cell may carry a `BoundaryReference` with source representation, stable source identifier, optional exact BRep face identifier, and semantic region. This is an attachment hook, not inferred correspondence. M0 analytic fixtures use analytic boundary identifiers. A future bounded BRep-to-CIR bridge may attach exact face references only when it can prove the correspondence.
+
+No generic BRep-to-CIR conversion is required in M0. Imported STEP/BRep bodies cannot acquire an implicit mirror merely because sampling would be convenient.
+
+### Geometry sampling versus solver quadrature
+
+`GeometrySamplePlan` answers what portion of a cell is occupied and which boundaries are candidates. Its deterministic subcell patterns may later grow from 2x2x2 to 4x4x4 or hierarchical reuse.
+
+Solver quadrature is a future, separate artifact that will choose integration locations and weights for PDE terms. Geometry samples are not quadrature points and M0 introduces no solver state.
+
+### Boundary offset map seam
+
+A future `BoundaryOffsetMap` is a compact local, derived cache for a cut cell: source boundary reference, local frame, offset/normal samples, parameter bounds, and approximation/error metadata. It is analogous to a rendering displacement/normal map only as a storage intuition. It never becomes exact geometry authority; BRep and/or CIR remain authoritative.
+
+### SurfaceMeshIR relationship
+
+SurfaceMeshIR may later accelerate candidate boundary-cell detection, provide structured samples and normal/parameter hints, or propagate semantic regions. Every result must still be confirmed against occupancy authority. SurfaceMeshIR does not classify material by itself.
+
+## Oct Continuum Boundary Experiment audit
+
+Local evidence was available in `C:/Users/yuech/source/repos/oct/Experiments/ContinuumComputabilityBoundary` and was read without modifying that repository.
+
+Ideas that transfer cleanly:
+
+- M4's plain Cartesian specification and deterministic row-major indexing;
+- M11's fixed, deterministic MSAA-style coverage samples;
+- M12's separation of a cheap base pattern from later selective higher-rate boundary sampling;
+- M15's conclusion that coverage and signed-distance narrow bands are related but distinct capabilities;
+- explicit metrics and fixed ordering for reproducibility.
+
+Ideas redesigned for Aetheris:
+
+- Oct's site/cell masks become typed 3D `CellIndex`, bounds, and `Inside/Outside/Cut` records;
+- sampled coverage is used only in Cut cells after analytic/interval classification where available;
+- SDF is an optional backend/cue rather than the continuum definition;
+- refinement selection and solver transfer/flux structures are deferred.
+
+Ideas made obsolete or inappropriate by Aetheris authority:
+
+- sampled masks must not stand in for exact BRep boundary identity;
+- coverage gradients need not pretend to be exact normals when CIR/SDF or BRep can supply them;
+- solver coupling, flux, and balance records from later Oct milestones do not belong in this geometry-only substrate.
+
+## Deferred numerical distinctions
+
+Geometric refinement means more deterministic samples, improved offset maps, or a higher MSAA rate without changing lattice cells. Physical refinement means smaller cells or AMR. Boundary curvature alone does not force AMR.
+
+Tiny active fractions will eventually require numerical policy such as cell aggregation, basis aggregation, redistribution, or a minimum-active-fraction rule. That is solver stabilization, not M0 geometry, and no such policy is embedded in `CutCell`.
diff --git a/docs/continuum/artifacts/m0-summary.json b/docs/continuum/artifacts/m0-summary.json
new file mode 100644
index 00000000..e0500aeb
--- /dev/null
+++ b/docs/continuum/artifacts/m0-summary.json
@@ -0,0 +1,24 @@
+{
+ "schema": "aetheris-continuum-m0-summary-v1",
+ "sampling": {
+ "pattern": "SubcellCenters",
+ "cylindricalHoleSamplesPerAxis": 4,
+ "deterministic": true,
+ "solverQuadrature": false
+ },
+ "fixtures": [
+ { "name": "axis-aligned-box", "dimensions": [4, 4, 4], "totalCells": 64, "insideCells": 8, "outsideCells": 56, "cutCells": 0, "geometrySamples": 0, "exactVolume": 8.0, "estimatedVolume": 8.0, "relativeVolumeError": 0.0 },
+ { "name": "angled-plane", "dimensions": [8, 8, 8], "totalCells": 512, "insideCells": 224, "outsideCells": 224, "cutCells": 64, "geometrySamples": 512, "exactVolume": 4.0, "estimatedVolume": 4.0, "relativeVolumeError": 0.0 },
+ { "name": "cylindrical-hole-coarse", "dimensions": [8, 8, 2], "totalCells": 128, "insideCells": 96, "outsideCells": 8, "cutCells": 24, "geometrySamples": 1536, "exactVolume": 12.858407346410207, "estimatedVolume": 12.75, "relativeVolumeError": 0.008430853331184278 },
+ { "name": "cylindrical-hole-medium", "dimensions": [16, 16, 4], "totalCells": 1024, "insideCells": 784, "outsideCells": 128, "cutCells": 112, "geometrySamples": 7168, "exactVolume": 12.858407346410207, "estimatedVolume": 12.828125, "relativeVolumeError": 0.0023550619913018287 },
+ { "name": "cylindrical-hole-fine", "dimensions": [32, 32, 8], "totalCells": 8192, "insideCells": 6400, "outsideCells": 1312, "cutCells": 480, "geometrySamples": 30720, "exactVolume": 12.858407346410207, "estimatedVolume": 12.84765625, "relativeVolumeError": 0.0008361141563312163 }
+ ],
+ "coarseHoleCutCells": [
+ { "index": [2, 2, 0], "occupancy": 0.625 }, { "index": [3, 2, 0], "occupancy": 0.0625 }, { "index": [4, 2, 0], "occupancy": 0.0625 }, { "index": [5, 2, 0], "occupancy": 0.625 },
+ { "index": [2, 3, 0], "occupancy": 0.0625 }, { "index": [5, 3, 0], "occupancy": 0.0625 }, { "index": [2, 4, 0], "occupancy": 0.0625 }, { "index": [5, 4, 0], "occupancy": 0.0625 },
+ { "index": [2, 5, 0], "occupancy": 0.625 }, { "index": [3, 5, 0], "occupancy": 0.0625 }, { "index": [4, 5, 0], "occupancy": 0.0625 }, { "index": [5, 5, 0], "occupancy": 0.625 },
+ { "index": [2, 2, 1], "occupancy": 0.625 }, { "index": [3, 2, 1], "occupancy": 0.0625 }, { "index": [4, 2, 1], "occupancy": 0.0625 }, { "index": [5, 2, 1], "occupancy": 0.625 },
+ { "index": [2, 3, 1], "occupancy": 0.0625 }, { "index": [5, 3, 1], "occupancy": 0.0625 }, { "index": [2, 4, 1], "occupancy": 0.0625 }, { "index": [5, 4, 1], "occupancy": 0.0625 },
+ { "index": [2, 5, 1], "occupancy": 0.625 }, { "index": [3, 5, 1], "occupancy": 0.0625 }, { "index": [4, 5, 1], "occupancy": 0.0625 }, { "index": [5, 5, 1], "occupancy": 0.625 }
+ ]
+}
diff --git a/docs/continuum/continuum-refactoring-notes.md b/docs/continuum/continuum-refactoring-notes.md
new file mode 100644
index 00000000..4b04bf58
--- /dev/null
+++ b/docs/continuum/continuum-refactoring-notes.md
@@ -0,0 +1,66 @@
+# Continuum refactoring notes
+
+These items were discovered during AETHERIS-CONTINUUM-M0 and intentionally not expanded into broad reconstruction.
+
+## Historical SDF types retain `Cir*` names
+
+- **Current state:** `CirNode`, `CirTape`, `CirBounds`, and related records now live under `Aetheris.Continuum.Backends.Sdf`, but their names predate the rule that CIR is broader than SDF.
+- **Problem:** the namespace communicates backend ownership, while individual names can still suggest that the SDF tree is the whole CIR model.
+- **Why larger than M0:** renaming the public family affects Firmament lowering/materializers, FrictionLab experiments, docs, external API consumers, and serialized/reflected type-name assumptions that need a compatibility policy.
+- **Proposed direction:** rename toward `SdfNode`, `SdfTape`, and a general bounds type in a source-breaking milestone; keep `SdfContinuumRegion` as the explicit CIR adapter and retire old names once consumers migrate.
+- **Blocks M0:** no.
+- **Recommended milestone:** CONTINUUM-M1A API naming and compatibility review.
+
+## Legacy AIR/prismatic bridge reaches Core internals
+
+- **Current state:** the relocated `Bridges/Air` and `Mirrors` code uses internal AIR and prismatic source records through `InternalsVisibleTo("Aetheris.Continuum")`.
+- **Problem:** dependency direction is correct, but the friend-assembly surface is implicit and wider than a small stable bridge contract.
+- **Why larger than M0:** extracting public source descriptors requires coordinated AIR/BRepPlan design and would affect experimental chamfer/prismatic routes.
+- **Proposed direction:** define a small immutable public/internal bridge DTO in Core that exposes only admitted section vertices, correspondence, source identity, and provenance; have Continuum consume that DTO.
+- **Blocks M0:** no; Core has no Continuum reference and behavior remains regression-tested.
+- **Recommended milestone:** AIR-CIR-M1 bridge contract.
+
+## Firmament contains substantial CIR-to-BRep recovery logic
+
+- **Current state:** Firmament recognizers/materializers and FrictionLab experiments consume CIR trees to recover bounded BRep output.
+- **Problem:** historical documents sometimes frame CIR as constructive boundary authority; this conflicts with the new authority contract if generalized.
+- **Why larger than M0:** the paths contain feature-family policy, topology stitching, trim oracles, recovery diagnostics, and many regressions. Moving or redesigning them would be kernel-wide work.
+- **Proposed direction:** retain only explicit, bounded rematerializers as consumer adapters with declared loss/admissibility; prefer AIR/BRep construction as the exact path and prohibit generic implicit-to-exact claims without proof.
+- **Blocks M0:** no; existing consumers compile and retain behavior.
+- **Recommended milestone:** CIR-BREP authority cleanup after Continuum M1 experiments.
+
+## Generic BRep-to-CIR conversion is absent
+
+- **Current state:** generated Firmament/AIR shapes may carry admitted mirrors; arbitrary imported trimmed BRep/STEP does not.
+- **Problem:** future continuum analysis of arbitrary imports needs occupied-region interpretation and boundary correspondence.
+- **Why larger than M0:** correct conversion requires oriented closed-shell interpretation, trimmed periodic analytic surfaces, robust point containment, tolerance/error contracts, and face-identity mapping.
+- **Proposed direction:** start with a bounded closed analytic-shell adapter that exposes occupancy and exact face candidates; do not begin with universal tessellation-as-authority conversion.
+- **Blocks M0:** no; analytic fixtures prove the substrate.
+- **Recommended milestone:** CONTINUUM-BREP-BRIDGE-M0, separately scoped.
+
+## SDF interval and transform contracts need mathematical labels
+
+- **Current state:** the tape preserves analytic interval bounds and transformed primitives; `CirTransformNode.Evaluate` returns the child scalar after inverse transformation.
+- **Problem:** under general non-rigid scaling, the scalar may retain correct sign/occupancy but is not necessarily exact Euclidean signed distance. `CirIntersectNode.Bounds` also uses a safe union rather than a tight intersection.
+- **Why larger than M0:** tightening requires auditing transform classes, Lipschitz/error metadata, empty intersections, and all interval regression expectations.
+- **Proposed direction:** distinguish sign-correct implicit field, conservative interval field, and exact-distance capability; advertise exact signed distance only when transform/composition rules preserve it.
+- **Blocks M0:** no; M0 classification requires occupancy and bounded classification, not universal exact-distance claims.
+- **Recommended milestone:** SDF-CAPABILITIES-M1.
+
+## Serialization/versioning contract is missing
+
+- **Current state:** no general CIR serializer was found. Existing diagnostics and CLI records are runtime/debug shapes; repository sources were updated to the new namespace directly.
+- **Problem:** reflected type-name persistence or future public interchange would be brittle across the extraction.
+- **Why larger than M0:** a stable format requires schema/version/identity decisions beyond moving code.
+- **Proposed direction:** define a representation-neutral CIR descriptor schema with explicit backend payload/version only when a real persistence consumer exists.
+- **Blocks M0:** no.
+- **Recommended milestone:** first milestone that needs persisted Continuum artifacts.
+
+## Boundary-area estimation is intentionally absent
+
+- **Current state:** analytic fixtures report exact boundary area, while sampled estimated area is null.
+- **Problem:** occupancy coverage alone does not define a trustworthy surface-area estimator.
+- **Why larger than M0:** a useful estimate should consume reconstructed local cuts, normals, or offset maps and carry an error contract.
+- **Proposed direction:** make boundary-position and area error part of the first BoundaryOffsetMap experiment.
+- **Blocks M0:** no; volume convergence and Cut-cell localization are demonstrated.
+- **Recommended milestone:** CONTINUUM-M1 offset-surface/MSAA experiment.
diff --git a/docs/continuum/m0-extraction.md b/docs/continuum/m0-extraction.md
new file mode 100644
index 00000000..fbd6d88e
--- /dev/null
+++ b/docs/continuum/m0-extraction.md
@@ -0,0 +1,157 @@
+# AETHERIS-CONTINUUM-M0 extraction report
+
+## Outcome
+
+`Aetheris.Continuum` is the architectural home for Continuum Implicit Representation, SDF evaluation, regular lattice classification, Cut cells, and geometry sampling. `Aetheris.Kernel.Core` has no project reference to Continuum and no longer contains its historical `Cir` folder.
+
+## Assembly and folder structure
+
+```text
+Aetheris.Continuum/
+ Cir/ occupancy contracts and optional capabilities
+ Regions/Analytic/ exact bounded M0 fixtures
+ Backends/Sdf/ preserved node, composition, tape, interval, and volume code
+ Lattice/ uniform Cartesian indexing, cells, classification, CutCell
+ Sampling/ deterministic geometry-only sample plans
+ Boundaries/ source identity and BoundaryOffsetMap seam
+ Diagnostics/ deterministic JSON inspection
+ Experiments/ reproducible M0 fixtures and metrics
+ Bridges/Air/ quarantined historical AIR adapter
+ Mirrors/ quarantined historical mirror admission/provenance
+
+Aetheris.Continuum.Tests/
+ Backends/Sdf/ moved regression suite
+ Bridges/Air/ moved adapter regression suite
+ Lattice/ CIR contracts, grid, fixtures, convergence, diagnostics
+```
+
+## Dependency graph
+
+Before:
+
+```text
+Firmament / FrictionLab / CLI
+ |
+ v
+ Aetheris.Kernel.Core
+ - math and BRep
+ - AIR
+ - CIR/SDF runtime
+ - adaptive continuum experiments
+ - CIR mirror policy
+```
+
+After:
+
+```text
+CLI -> Firmament -> Aetheris.Continuum -> Aetheris.Kernel.Core
+ | ^ ^
+ +-----------------+ |
+FrictionLab --------------------------------------+
+
+Aetheris.Kernel.Core -X-> Aetheris.Continuum
+```
+
+Consumer assemblies that directly compile against CIR/SDF add an explicit Continuum reference. Core remains the lower-level dependency and grants a narrow friend-assembly relationship so the relocated legacy AIR bridge can consume existing internal AIR/prismatic records without broadening their public API in M0.
+
+## CIR API
+
+`IContinuumRegion` provides `Id`, `Bounds`, point `Classify`, and `Contains`. It does not require a scalar field. Optional interfaces are:
+
+- `ISignedDistanceCapability`;
+- `IGradientCapability`;
+- `IBoundaryProjectionCapability`;
+- `IMaterialRegionCapability`;
+- `IBoundsClassificationCapability` for conservative/exact cell classification;
+- `IBoundaryReferenceCapability` for attaching analytic, semantic, or future exact-BRep candidates.
+
+`RegionId` and `MaterialRegion` are intentionally minimal. There is no material-property database.
+
+## SDF backend extraction
+
+The existing analytic primitives (box, cylinder, cone, sphere, torus), CSG-style field nodes (union, subtraction, intersection), transforms, point evaluation, tape lowering/runtime, interval evaluation, regular/adaptive volume estimators, and JudgmentEngine region planner moved from `Aetheris.Kernel.Core.Cir` to `Aetheris.Continuum.Backends.Sdf` without an engine rewrite.
+
+`SdfContinuumRegion` is the adapter from the historical node/tape model to CIR occupancy plus optional signed-distance, gradient, and bounds-classification capabilities. This makes the direction explicit: the SDF backend implements CIR; CIR does not inherit an SDF requirement.
+
+The historical public type names (`CirNode`, `CirTape`, and related records) remain inside the SDF backend for source migration economy. There is no old-namespace shim and no second CIR API. A later narrow rename is documented as debt.
+
+## Core cleanup and ownership
+
+Before extraction, `Aetheris.Kernel.Core/Cir` contained 8 files / 1,893 lines, and `Core/Air/AirCirMirrorAdapter.cs` added another consumer-specific implicit bridge.
+
+Moved/extracted:
+
+- 6 SDF runtime/planning files to `Backends/Sdf`;
+- 2 mirror policy/convex mirror files to `Mirrors`;
+- 1 AIR adapter to `Bridges/Air`;
+- 12 CIR/SDF regression test files and 1 AIR bridge test to `Aetheris.Continuum.Tests`;
+- all consuming namespaces from `Aetheris.Kernel.Core.Cir*` to explicit Continuum namespaces.
+
+Remaining Core dependency surface consists of general `Point3D`, `Vector3D`, `Transform3D`, `BoundingBox3D`, tolerances, JudgmentEngine, and internal AIR/prismatic source records used through the declared friend assembly. Core has no Continuum project reference and no `Core/Cir` implementation files.
+
+## Lattice and classification
+
+`LatticeSpec` is a fixed 3D Cartesian box with `(CountX, CountY, CountZ)`, constant cell size, deterministic `k/j/i` enumeration, and row-major flattening `((k * Ny) + j) * Nx + i`. `CellIndex`, `CellBounds`, and `CellCenter` are value-oriented and contain no solver state.
+
+`ContinuumGridClassifier` uses JudgmentEngine to choose between:
+
+1. a backend/analytic `IBoundsClassificationCapability`, preferred for bounded robust classification;
+2. a conservative bounds fallback, which returns Outside only for disjoint bounds and Cut otherwise.
+
+Analytic box, plane, and cylindrical-hole fixtures classify bounds from exact inequalities. Classification never relies on the cell center alone. The SDF adapter uses the preserved interval evaluator plus a center-side tie-break only for zero-measure boundary contact.
+
+`CutCell` contains only cell index/bounds, continuum region identity, boundary references, a `GeometrySamplePlan`, and occupancy estimate. It contains no displacement, stress, strain, matrix, timestep, or quadrature state.
+
+## Geometry sampling
+
+M0 uses deterministic subcell-center patterns with a configurable samples-per-axis value. Boundary samples contribute half measure to remove a directional bias when a deterministic sample lies exactly on an analytic interface. The plan records every sample position and classification, boundary candidates, sample count, and coverage.
+
+Sampling is invoked only for Cut cells. A future selective 2x2x2/4x4x4 or hierarchical policy can reuse the same plan shape. No solver quadrature API or implementation exists.
+
+## Boundary identity and offset-map seam
+
+`BoundaryReference` can carry source representation/id, optional exact BRep face id, and semantic region. M0 analytic fixtures attach stable analytic boundary ids. No BRep correspondence is inferred.
+
+`IBoundaryOffsetMap` sketches a source reference, local frame, offset/normal samples, and approximation metadata. It is a derived cache seam for M1, never a replacement authority.
+
+## Fixture evidence
+
+All values below come from the production `ContinuumM0Experiments` path and deterministic 4x4x4 geometry sampling for cylindrical-hole Cut cells.
+
+| Fixture | Resolution | Cells | Inside | Outside | Cut | Geometry samples | Exact volume | Estimated volume | Relative error |
+| --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
+| aligned box | 4x4x4 | 64 | 8 | 56 | 0 | 0 | 8 | 8 | 0 |
+| oblique plane | 8x8x8 | 512 | 224 | 224 | 64 | 512 | 4 | 4 | 0 |
+| cylindrical hole, coarse | 8x8x2 | 128 | 96 | 8 | 24 | 1,536 | 12.8584073464 | 12.75 | 0.843085% |
+| cylindrical hole, medium | 16x16x4 | 1,024 | 784 | 128 | 112 | 7,168 | 12.8584073464 | 12.828125 | 0.235506% |
+| cylindrical hole, fine | 32x32x8 | 8,192 | 6,400 | 1,312 | 480 | 30,720 | 12.8584073464 | 12.84765625 | 0.083611% |
+
+The box boundary is aligned to grid planes, so zero-measure contact does not create Cut cells. The oblique plane cuts exactly one diagonal cell band and symmetric deterministic samples recover half the support-box volume. The hole fixture retains a boring regular lattice: 6,400 of 8,192 fine cells are trivially Inside and only 480 are sampled as Cut.
+
+Exact boundary areas are 24 for the box and 48 for the block-with-hole fixture. M0 deliberately does not claim a sampled boundary-area estimator; that metric remains null rather than presenting an occupancy-derived guess as boundary geometry.
+
+## Diagnostics, determinism, and performance
+
+`ContinuumGridDiagnostics.ToJson` emits lattice dimensions/cell size, aggregate counts, every cell state and occupancy, Cut indices, and boundary references with string enums and deterministic enumeration. A compact checked-in summary is at `docs/continuum/artifacts/m0-summary.json`.
+
+The full 8,192-cell fine fixture plus 30,720 boundary samples averaged 13.01 ms over 20 warmed runs on the validation machine. All patterns, cell ordering, strategy tie-breaking, boundary ids, and JSON order are deterministic; a regression test compares repeated JSON byte-for-byte.
+
+## Compatibility
+
+No compatibility shim was added. All repository consumers were moved to the new namespaces in the same change, avoiding two permanent CIR APIs. Public downstream users of the pre-M0 namespace will need a source namespace update; this is preferred over preserving the incorrect Core ownership indefinitely.
+
+## SurfaceMeshIR and BRep bridges
+
+SurfaceMeshIR is not wired into M0 classification. It may later accelerate candidate-cell discovery and provide structured boundary hints, but occupancy must still be confirmed by CIR. A generic BRep-to-CIR converter remains deliberately absent; existing bounded Firmament/AIR mirrors continue as explicit consumers/bridges.
+
+## Recommended M1
+
+Run one cylindrical-hole boundary experiment that compares fixed 2x2x2, fixed 4x4x4, and selective/hierarchically reused sampling in the same Cut cells, then attach an analytic `IBoundaryOffsetMap` for the cylindrical wall. Measure occupied-volume error, local boundary-position/normal error, reused sample count, and cache size while keeping the lattice fixed. Do not add AMR or solver quadrature in that experiment.
+
+## Validation
+
+- `dotnet restore Aetheris.slnx`: passed.
+- `dotnet build Aetheris.slnx -f net10.0 --no-restore /m:1`: passed with 0 warnings and 0 errors.
+- full solution tests: 2,484 passed (Core 931, Firmament 1,061, CLI 350, Server/Cadmata 49, Continuum 93); the opt-in legacy FrictionLab assembly reported no discoverable tests under the default gate.
+- TSPack from `aetheris.client`: sync, check, format check, typecheck, 69 frontend tests, production build, and lint passed. The existing lock audit still reports 21 multi-version packages and 114 acknowledged/blocked lifecycle scripts.
+- `git diff --check`: passed.