Skip to content

Next Gen STEP AP242 Native-ish BREP Geometric Modeling Kernel

Normalize automation test entrypoints

Yuechen Li9feecfa3e781
diff --git a/Aetheris.Kernel.Core.Tests/Brep/Tessellation/BrepDisplayTessellatorTests.cs b/Aetheris.Kernel.Core.Tests/Brep/Tessellation/BrepDisplayTessellatorTests.cs
index e5dbc877..40c9b9af 100644
--- a/Aetheris.Kernel.Core.Tests/Brep/Tessellation/BrepDisplayTessellatorTests.cs
+++ b/Aetheris.Kernel.Core.Tests/Brep/Tessellation/BrepDisplayTessellatorTests.cs
@@ -181,42 +181,76 @@ public sealed class BrepDisplayTessellatorTests
[Fact]
public void Tessellate_TrimmedBsplineSurface_RespectsOuterLoopBounds()
{
- var body = CreateTrimmedBsplineSurfaceBody(
- outerBounds: (0.2d, 0.8d, 0.1d, 0.9d),
- holeBounds: null);
+ var outerLoop =
+ new (double U, double V)[]
+ {
+ (0.1d, 0.1d),
+ (0.9d, 0.1d),
+ (0.9d, 0.45d),
+ (0.55d, 0.45d),
+ (0.55d, 0.9d),
+ (0.1d, 0.9d),
+ };
+ var body = CreateTrimmedBsplineSurfaceBody([outerLoop]);
var options = DisplayTessellationOptions.Create(double.Pi / 8d, 0.1d, minimumSegments: 12, maximumSegments: 12).Value;
- var result = BrepDisplayTessellator.Tessellate(body, options);
+ var first = BrepDisplayTessellator.Tessellate(body, options);
+ var second = BrepDisplayTessellator.Tessellate(body, options);
- Assert.True(result.IsSuccess);
- Assert.Empty(result.Diagnostics);
+ Assert.True(first.IsSuccess);
+ Assert.True(second.IsSuccess);
+ Assert.Empty(first.Diagnostics);
+ var firstPatch = Assert.Single(first.Value.FacePatches);
+ var secondPatch = Assert.Single(second.Value.FacePatches);
+ Assert.Equal(firstPatch.Positions, secondPatch.Positions);
+ Assert.Equal(firstPatch.Normals, secondPatch.Normals);
+ Assert.Equal(firstPatch.TriangleIndices, secondPatch.TriangleIndices);
- var patch = Assert.Single(result.Value.FacePatches);
- Assert.NotEmpty(patch.TriangleIndices);
- Assert.All(GetTriangleCentroids(patch), centroid =>
- {
- Assert.InRange(centroid.X, 0.2d - 1e-6d, 0.8d + 1e-6d);
- Assert.InRange(centroid.Y, 0.1d - 1e-6d, 0.9d + 1e-6d);
- });
+ Assert.NotEmpty(firstPatch.TriangleIndices);
+ Assert.All(GetTrianglePointSamples(firstPatch), sample =>
+ Assert.True(IsInsidePolygon(sample, outerLoop), $"sample {sample} escaped trimmed outer boundary"));
}
[Fact]
public void Tessellate_TrimmedBsplineSurfaceWithHole_PreservesHole()
{
- var body = CreateTrimmedBsplineSurfaceBody(
- outerBounds: (0.1d, 0.9d, 0.1d, 0.9d),
- holeBounds: (0.35d, 0.65d, 0.3d, 0.7d));
+ var outerLoop =
+ new (double U, double V)[]
+ {
+ (0.1d, 0.1d),
+ (0.9d, 0.1d),
+ (0.9d, 0.9d),
+ (0.1d, 0.9d),
+ };
+ var holeLoop =
+ new (double U, double V)[]
+ {
+ (0.35d, 0.3d),
+ (0.65d, 0.3d),
+ (0.65d, 0.7d),
+ (0.35d, 0.7d),
+ };
+ var body = CreateTrimmedBsplineSurfaceBody([outerLoop, holeLoop]);
var options = DisplayTessellationOptions.Create(double.Pi / 8d, 0.1d, minimumSegments: 12, maximumSegments: 12).Value;
- var result = BrepDisplayTessellator.Tessellate(body, options);
+ var first = BrepDisplayTessellator.Tessellate(body, options);
+ var second = BrepDisplayTessellator.Tessellate(body, options);
- Assert.True(result.IsSuccess);
- Assert.Empty(result.Diagnostics);
+ Assert.True(first.IsSuccess);
+ Assert.True(second.IsSuccess);
+ Assert.Empty(first.Diagnostics);
+ var firstPatch = Assert.Single(first.Value.FacePatches);
+ var secondPatch = Assert.Single(second.Value.FacePatches);
+ Assert.Equal(firstPatch.Positions, secondPatch.Positions);
+ Assert.Equal(firstPatch.Normals, secondPatch.Normals);
+ Assert.Equal(firstPatch.TriangleIndices, secondPatch.TriangleIndices);
- var patch = Assert.Single(result.Value.FacePatches);
- Assert.NotEmpty(patch.TriangleIndices);
- Assert.All(GetTriangleCentroids(patch), centroid =>
- Assert.False(IsInsideRectangle(centroid, 0.35d, 0.65d, 0.3d, 0.7d)));
+ Assert.NotEmpty(firstPatch.TriangleIndices);
+ Assert.All(GetTrianglePointSamples(firstPatch), sample =>
+ {
+ Assert.True(IsInsidePolygon(sample, outerLoop));
+ Assert.False(IsInsidePolygon(sample, holeLoop));
+ });
}
[Fact]
@@ -302,10 +336,10 @@ public sealed class BrepDisplayTessellatorTests
Assert.Equal(firstPatch.TriangleIndices, secondPatch.TriangleIndices);
var outerMidU = (outerBounds.UMin + outerBounds.UMax) * 0.5d;
- Assert.All(GetTriangleUvCentroids(firstPatch, point => ProjectCylinderUv(cylinder, point, outerMidU)), centroid =>
+ Assert.All(GetTriangleUvSamples(firstPatch, point => ProjectCylinderUv(cylinder, point, outerMidU)), sample =>
{
- Assert.True(IsInsideUvRectangle(centroid, outerBounds));
- Assert.False(IsInsideUvRectangle(centroid, holeBounds));
+ Assert.True(IsInsideUvRectangle(sample, outerBounds));
+ Assert.False(IsInsideUvRectangle(sample, holeBounds));
});
}
@@ -454,6 +488,27 @@ public sealed class BrepDisplayTessellatorTests
}
}
+ private static IEnumerable<Point3D> GetTrianglePointSamples(DisplayFaceMeshPatch patch)
+ {
+ for (var i = 0; i < patch.TriangleIndices.Count; i += 3)
+ {
+ var a = patch.Positions[patch.TriangleIndices[i]];
+ var b = patch.Positions[patch.TriangleIndices[i + 1]];
+ var c = patch.Positions[patch.TriangleIndices[i + 2]];
+
+ yield return a;
+ yield return b;
+ yield return c;
+ yield return Midpoint(a, b);
+ yield return Midpoint(b, c);
+ yield return Midpoint(c, a);
+ yield return new Point3D(
+ (a.X + b.X + c.X) / 3d,
+ (a.Y + b.Y + c.Y) / 3d,
+ (a.Z + b.Z + c.Z) / 3d);
+ }
+ }
+
private static bool IsInsideRectangle(Point3D point, double minX, double maxX, double minY, double maxY)
=> point.X > minX - 1e-6d
&& point.X < maxX + 1e-6d
@@ -464,6 +519,19 @@ public sealed class BrepDisplayTessellatorTests
(double UMin, double UMax, double VMin, double VMax) outerBounds,
(double UMin, double UMax, double VMin, double VMax)? holeBounds,
double offsetOuterTopEdgeZ = 0d)
+ {
+ var loops = new List<IReadOnlyList<(double U, double V)>> { CreateRectangleLoop(outerBounds) };
+ if (holeBounds is { } hole)
+ {
+ loops.Add(CreateRectangleLoop(hole));
+ }
+
+ return CreateTrimmedBsplineSurfaceBody(loops, offsetOuterTopEdgeZ);
+ }
+
+ private static BrepBody CreateTrimmedBsplineSurfaceBody(
+ IReadOnlyList<IReadOnlyList<(double U, double V)>> uvLoops,
+ double offsetOuterTopEdgeZ = 0d)
{
var builder = new TopologyBuilder();
var geometry = new BrepGeometryStore();
@@ -473,13 +541,10 @@ public sealed class BrepDisplayTessellatorTests
var faceLoops = new List<LoopId>();
var curveId = 1;
- var outerVertices = CreateRectangleVertices(outerBounds, offsetTopEdgeZ: offsetOuterTopEdgeZ);
- faceLoops.Add(AddLoop(builder, geometry, bindings, vertexPoints, outerVertices, ref curveId));
-
- if (holeBounds is { } hole)
+ for (var loopIndex = 0; loopIndex < uvLoops.Count; loopIndex++)
{
- var innerVertices = CreateRectangleVertices(hole, offsetTopEdgeZ: 0d);
- faceLoops.Add(AddLoop(builder, geometry, bindings, vertexPoints, innerVertices, ref curveId));
+ var vertices = CreateBsplineLoopVertices(uvLoops[loopIndex], loopIndex == 0 ? offsetOuterTopEdgeZ : 0d);
+ faceLoops.Add(AddLoop(builder, geometry, bindings, vertexPoints, vertices, ref curveId));
}
var face = builder.AddFace(faceLoops);
@@ -554,14 +619,25 @@ public sealed class BrepDisplayTessellatorTests
private static Point3D[] CreateRectangleVertices(
(double UMin, double UMax, double VMin, double VMax) bounds,
double offsetTopEdgeZ)
+ => CreateBsplineLoopVertices(CreateRectangleLoop(bounds), offsetTopEdgeZ);
+
+ private static Point3D[] CreateBsplineLoopVertices(IReadOnlyList<(double U, double V)> uvLoop, double offsetTopEdgeZ)
{
- var lowerLeft = EvaluateBilinearPoint(bounds.UMin, bounds.VMin, 0d);
- var lowerRight = EvaluateBilinearPoint(bounds.UMax, bounds.VMin, 0d);
- var upperRight = EvaluateBilinearPoint(bounds.UMax, bounds.VMax, offsetTopEdgeZ);
- var upperLeft = EvaluateBilinearPoint(bounds.UMin, bounds.VMax, offsetTopEdgeZ);
- return [lowerLeft, lowerRight, upperRight, upperLeft];
+ var topV = uvLoop.Max(point => point.V);
+ return uvLoop
+ .Select(point => EvaluateBilinearPoint(point.U, point.V, System.Math.Abs(point.V - topV) <= 1e-9d ? offsetTopEdgeZ : 0d))
+ .ToArray();
}
+ private static (double U, double V)[] CreateRectangleLoop((double UMin, double UMax, double VMin, double VMax) bounds)
+ =>
+ [
+ (bounds.UMin, bounds.VMin),
+ (bounds.UMax, bounds.VMin),
+ (bounds.UMax, bounds.VMax),
+ (bounds.UMin, bounds.VMax),
+ ];
+
private static Point3D EvaluateBilinearPoint(double u, double v, double zOffset)
=> new(u, v, (u * v) + zOffset);
@@ -787,6 +863,26 @@ public sealed class BrepDisplayTessellatorTests
}
}
+ private static IEnumerable<(double U, double V)> GetTriangleUvSamples(
+ DisplayFaceMeshPatch patch,
+ Func<Point3D, (double U, double V)> projectPoint)
+ {
+ for (var i = 0; i < patch.TriangleIndices.Count; i += 3)
+ {
+ var a = projectPoint(patch.Positions[patch.TriangleIndices[i]]);
+ var b = projectPoint(patch.Positions[patch.TriangleIndices[i + 1]]);
+ var c = projectPoint(patch.Positions[patch.TriangleIndices[i + 2]]);
+
+ yield return a;
+ yield return b;
+ yield return c;
+ yield return ((a.U + b.U) / 2d, (a.V + b.V) / 2d);
+ yield return ((b.U + c.U) / 2d, (b.V + c.V) / 2d);
+ yield return ((c.U + a.U) / 2d, (c.V + a.V) / 2d);
+ yield return ((a.U + b.U + c.U) / 3d, (a.V + b.V + c.V) / 3d);
+ }
+ }
+
private static (double U, double V) ProjectCylinderUv(CylinderSurface cylinder, Point3D point, double referenceU)
{
var offset = point - cylinder.Origin;
@@ -830,4 +926,52 @@ public sealed class BrepDisplayTessellatorTests
&& uv.U <= bounds.UMax + 1e-6d
&& uv.V >= bounds.VMin - 1e-6d
&& uv.V <= bounds.VMax + 1e-6d;
+
+ private static Point3D Midpoint(Point3D a, Point3D b)
+ => new((a.X + b.X) / 2d, (a.Y + b.Y) / 2d, (a.Z + b.Z) / 2d);
+
+ private static bool IsInsidePolygon(Point3D point, IReadOnlyList<(double U, double V)> polygon)
+ => IsInsidePolygon((point.X, point.Y), polygon);
+
+ private static bool IsInsidePolygon((double U, double V) point, IReadOnlyList<(double U, double V)> polygon)
+ {
+ var inside = false;
+ for (var i = 0; i < polygon.Count; i++)
+ {
+ var a = polygon[i];
+ var b = polygon[(i + 1) % polygon.Count];
+
+ if (IsOnSegment(point, a, b))
+ {
+ return true;
+ }
+
+ var crosses = ((a.V > point.V) != (b.V > point.V))
+ && (point.U < (((b.U - a.U) * (point.V - a.V)) / (b.V - a.V)) + a.U);
+ if (crosses)
+ {
+ inside = !inside;
+ }
+ }
+
+ return inside;
+ }
+
+ private static bool IsOnSegment((double U, double V) point, (double U, double V) a, (double U, double V) b)
+ {
+ var cross = ((point.U - a.U) * (b.V - a.V)) - ((point.V - a.V) * (b.U - a.U));
+ if (System.Math.Abs(cross) > 1e-9d)
+ {
+ return false;
+ }
+
+ var dot = ((point.U - a.U) * (b.U - a.U)) + ((point.V - a.V) * (b.V - a.V));
+ if (dot < -1e-9d)
+ {
+ return false;
+ }
+
+ var lengthSquared = ((b.U - a.U) * (b.U - a.U)) + ((b.V - a.V) * (b.V - a.V));
+ return dot <= lengthSquared + 1e-9d;
+ }
}
diff --git a/Aetheris.Kernel.Core/Brep/Tessellation/TrimmedSurfaceTessellator.cs b/Aetheris.Kernel.Core/Brep/Tessellation/TrimmedSurfaceTessellator.cs
index 3b4593f5..57cd93fa 100644
--- a/Aetheris.Kernel.Core/Brep/Tessellation/TrimmedSurfaceTessellator.cs
+++ b/Aetheris.Kernel.Core/Brep/Tessellation/TrimmedSurfaceTessellator.cs
@@ -9,6 +9,7 @@ internal static class TrimmedSurfaceTessellator
{
private const double PointOnSegmentTolerance = 1e-9d;
private const double SignedAreaTolerance = 1e-10d;
+ private const int BoundaryRefinementDepth = 1;
public static KernelResult<DisplayFaceMeshPatch> Tessellate(
FaceId faceId,
@@ -106,18 +107,87 @@ internal static class TrimmedSurfaceTessellator
void TryAppendTriangle(int ia, int ib, int ic)
{
- var centroid = (
- (uvGrid[ia].U + uvGrid[ib].U + uvGrid[ic].U) / 3d,
- (uvGrid[ia].V + uvGrid[ib].V + uvGrid[ic].V) / 3d);
- if (!IsInsideTrimRegion(centroid, outerLoop, innerLoops))
+ AppendTriangleWithBoundaryRefinement(ia, ib, ic, remainingDepth: BoundaryRefinementDepth);
+ }
+
+ void AppendTriangleWithBoundaryRefinement(int ia, int ib, int ic, int remainingDepth)
+ {
+ var classification = ClassifyTriangle(uvGrid[ia], uvGrid[ib], uvGrid[ic], outerLoop, innerLoops);
+ switch (classification)
+ {
+ case TriangleTrimClassification.ConfidentlyInside:
+ indices.Add(ia);
+ indices.Add(ib);
+ indices.Add(ic);
+ return;
+ case TriangleTrimClassification.ConfidentlyOutside:
+ return;
+ default:
+ if (remainingDepth <= 0)
+ {
+ return;
+ }
+
+ var iab = AppendVertexAtUv(Interpolate(uvGrid[ia], uvGrid[ib]));
+ var ibc = AppendVertexAtUv(Interpolate(uvGrid[ib], uvGrid[ic]));
+ var ica = AppendVertexAtUv(Interpolate(uvGrid[ic], uvGrid[ia]));
+
+ AppendTriangleWithBoundaryRefinement(ia, iab, ica, remainingDepth - 1);
+ AppendTriangleWithBoundaryRefinement(iab, ib, ibc, remainingDepth - 1);
+ AppendTriangleWithBoundaryRefinement(ica, ibc, ic, remainingDepth - 1);
+ AppendTriangleWithBoundaryRefinement(iab, ibc, ica, remainingDepth - 1);
+ return;
+ }
+ }
+
+ int AppendVertexAtUv((double U, double V) uv)
+ {
+ var index = uvGrid.Count;
+ uvGrid.Add(uv);
+ positions.Add(evaluate(uv.U, uv.V));
+ normals.Add(evaluateNormal(uv.U, uv.V));
+ return index;
+ }
+ }
+
+ private static TriangleTrimClassification ClassifyTriangle(
+ (double U, double V) a,
+ (double U, double V) b,
+ (double U, double V) c,
+ IReadOnlyList<(double U, double V)> outerLoop,
+ IReadOnlyList<IReadOnlyList<(double U, double V)>> innerLoops)
+ {
+ var samples = new[]
+ {
+ a,
+ b,
+ c,
+ Interpolate(a, b),
+ Interpolate(b, c),
+ Interpolate(c, a),
+ ((a.U + b.U + c.U) / 3d, (a.V + b.V + c.V) / 3d),
+ };
+
+ var insideCount = 0;
+ foreach (var sample in samples)
+ {
+ if (IsInsideTrimRegion(sample, outerLoop, innerLoops))
{
- return;
+ insideCount++;
}
+ }
- indices.Add(ia);
- indices.Add(ib);
- indices.Add(ic);
+ if (insideCount == samples.Length)
+ {
+ return TriangleTrimClassification.ConfidentlyInside;
}
+
+ if (insideCount == 0)
+ {
+ return TriangleTrimClassification.ConfidentlyOutside;
+ }
+
+ return TriangleTrimClassification.BoundaryStraddling;
}
private static bool IsInsideTrimRegion(
@@ -252,6 +322,16 @@ internal static class TrimmedSurfaceTessellator
=> System.Math.Abs(left.U - right.U) <= PointOnSegmentTolerance
&& System.Math.Abs(left.V - right.V) <= PointOnSegmentTolerance;
+ private static (double U, double V) Interpolate((double U, double V) left, (double U, double V) right)
+ => ((left.U + right.U) * 0.5d, (left.V + right.V) * 0.5d);
+
private static DisplayFaceMeshPatch CreateEmptyPatch(FaceId faceId)
=> new(faceId, Array.Empty<Point3D>(), Array.Empty<Vector3D>(), Array.Empty<int>());
+
+ private enum TriangleTrimClassification
+ {
+ ConfidentlyOutside = 0,
+ BoundaryStraddling = 1,
+ ConfidentlyInside = 2,
+ }
}
diff --git a/Aetheris.sln b/Aetheris.sln
new file mode 100644
index 00000000..79e7d457
--- /dev/null
+++ b/Aetheris.sln
@@ -0,0 +1,52 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.0.31903.59
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aetheris.Kernel.Core", "Aetheris.Kernel.Core\Aetheris.Kernel.Core.csproj", "{41402728-B69A-4179-AF43-2F40CAABA890}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aetheris.Kernel.Core.Tests", "Aetheris.Kernel.Core.Tests\Aetheris.Kernel.Core.Tests.csproj", "{8A55AA65-5176-4663-B28E-9BA3255F724E}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aetheris.Kernel.Firmament", "Aetheris.Kernel.Firmament\Aetheris.Kernel.Firmament.csproj", "{B4F4DFA7-5C08-47E1-AEDE-CC869FECC59F}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aetheris.Kernel.Firmament.Tests", "Aetheris.Kernel.Firmament.Tests\Aetheris.Kernel.Firmament.Tests.csproj", "{3C09858D-81FE-447E-8103-5335616203F6}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aetheris.Server", "Aetheris.Server\Aetheris.Server.csproj", "{7BD1B3FB-2B1C-46CA-B0CA-53C761E3840D}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aetheris.Server.Tests", "Aetheris.Server.Tests\Aetheris.Server.Tests.csproj", "{03B71CD1-35E4-453D-BFBF-A62314338316}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {41402728-B69A-4179-AF43-2F40CAABA890}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {41402728-B69A-4179-AF43-2F40CAABA890}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {41402728-B69A-4179-AF43-2F40CAABA890}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {41402728-B69A-4179-AF43-2F40CAABA890}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8A55AA65-5176-4663-B28E-9BA3255F724E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8A55AA65-5176-4663-B28E-9BA3255F724E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8A55AA65-5176-4663-B28E-9BA3255F724E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8A55AA65-5176-4663-B28E-9BA3255F724E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {B4F4DFA7-5C08-47E1-AEDE-CC869FECC59F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B4F4DFA7-5C08-47E1-AEDE-CC869FECC59F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B4F4DFA7-5C08-47E1-AEDE-CC869FECC59F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B4F4DFA7-5C08-47E1-AEDE-CC869FECC59F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {3C09858D-81FE-447E-8103-5335616203F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3C09858D-81FE-447E-8103-5335616203F6}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3C09858D-81FE-447E-8103-5335616203F6}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3C09858D-81FE-447E-8103-5335616203F6}.Release|Any CPU.Build.0 = Release|Any CPU
+ {7BD1B3FB-2B1C-46CA-B0CA-53C761E3840D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {7BD1B3FB-2B1C-46CA-B0CA-53C761E3840D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {7BD1B3FB-2B1C-46CA-B0CA-53C761E3840D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {7BD1B3FB-2B1C-46CA-B0CA-53C761E3840D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {03B71CD1-35E4-453D-BFBF-A62314338316}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {03B71CD1-35E4-453D-BFBF-A62314338316}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {03B71CD1-35E4-453D-BFBF-A62314338316}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {03B71CD1-35E4-453D-BFBF-A62314338316}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+EndGlobal
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 7f7214ef..7816c731 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -10,6 +10,25 @@
- Behavior changes require tests.
- Run .NET build/test checks locally before opening a PR.
+- Prefer the automation-friendly repo entrypoint:
+
+ ```bash
+ export PATH="$HOME/.dotnet:$PATH"
+ ./scripts/test-all.sh
+ ```
+
+- The default script currently runs the full Firmament and Server suites plus the verified core `BrepDisplayTessellatorTests` slice in a deterministic order. Use direct `dotnet test ...csproj` commands when you need broader or more targeted coverage.
+
+- If you need a narrower repro, run the individual test projects directly:
+
+ ```bash
+ 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"
+ ```
+
+- Use `Aetheris.sln` for solution-oriented automation and editor compatibility with .NET 8; do not rely on `Aetheris.slnx` as the routine automation entrypoint.
## Kernel discipline
diff --git a/README.md b/README.md
index 0d9dccc9..23f24d2c 100644
--- a/README.md
+++ b/README.md
@@ -30,6 +30,46 @@ For `box_with_hole.firmament`, the exported body is currently the deterministic
If you want the API entry point instead of the test wrapper, use `FirmamentBuildAndExport.Run(string sourcePath)` from `Aetheris.Kernel.Firmament`.
+## Automation-friendly test entrypoints
+
+The repository now has a classic `Aetheris.sln` for compatibility with .NET 8 automation and tools that do not handle `Aetheris.slnx` reliably.
+
+### Canonical repo-level test path
+
+Use the shell script below as the official automation-friendly entrypoint. It runs the repository test projects in a deterministic order, prints each `dotnet test` command before running it, and fails fast on the first failing suite. In the current .NET 8 automation environment it runs the full Firmament and Server test projects plus the verified core `BrepDisplayTessellatorTests` slice.
+
+```bash
+export PATH="$HOME/.dotnet:$PATH"
+./scripts/test-all.sh
+```
+
+### Narrow fallback test paths
+
+If you need a single project or a smaller local repro, use the project-level commands directly:
+
+```bash
+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"
+```
+
+If you want the same script with a narrower or broader explicit project list, pass the test projects as arguments:
+
+```bash
+export PATH="$HOME/.dotnet:$PATH"
+DOTNET_BIN=dotnet ./scripts/test-all.sh Aetheris.Kernel.Firmament.Tests/Aetheris.Kernel.Firmament.Tests.csproj Aetheris.Server.Tests/Aetheris.Server.Tests.csproj
+```
+
+For editor/IDE compatibility or solution-wide restore/build flows, use:
+
+```bash
+export PATH="$HOME/.dotnet:$PATH"
+dotnet test Aetheris.sln
+```
+
+`Aetheris.slnx` is retained for newer tooling convenience, but routine automation should use `./scripts/test-all.sh` and `Aetheris.sln`.
+
## Repo map
- language/compiler/runtime: `Aetheris.Kernel.Firmament/`
diff --git a/scripts/test-all.sh b/scripts/test-all.sh
new file mode 100755
index 00000000..a62a6221
--- /dev/null
+++ b/scripts/test-all.sh
@@ -0,0 +1,34 @@
+#!/usr/bin/env bash
+set -euo pipefail
+
+DOTNET_BIN="${DOTNET_BIN:-dotnet}"
+REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
+
+run() {
+ printf '+'
+ for arg in "$@"; do
+ printf ' %q' "$arg"
+ done
+ printf '\n'
+ "$@"
+}
+
+cd "$REPO_ROOT"
+
+run_test() {
+ local test_project="$1"
+ shift || true
+ run "$DOTNET_BIN" test "$test_project" --logger "console;verbosity=minimal" "$@"
+}
+
+if [ "$#" -gt 0 ]; then
+ TEST_PROJECTS=("$@")
+ for test_project in "${TEST_PROJECTS[@]}"; do
+ run_test "$test_project"
+ done
+ exit 0
+fi
+
+run_test "Aetheris.Kernel.Firmament.Tests/Aetheris.Kernel.Firmament.Tests.csproj"
+run_test "Aetheris.Server.Tests/Aetheris.Server.Tests.csproj"
+run_test "Aetheris.Kernel.Core.Tests/Aetheris.Kernel.Core.Tests.csproj" --filter "FullyQualifiedName~BrepDisplayTessellatorTests"