Skip to content

Next Gen STEP AP242 Native-ish BREP Geometric Modeling Kernel

Add M10 programmatic polygon extrude framework

Yuechen Li621e38e53813
diff --git a/Aetheris.Kernel.Core.Tests/Brep/Features/BrepExtrudeTests.cs b/Aetheris.Kernel.Core.Tests/Brep/Features/BrepExtrudeTests.cs
new file mode 100644
index 00000000..e9c080e6
--- /dev/null
+++ b/Aetheris.Kernel.Core.Tests/Brep/Features/BrepExtrudeTests.cs
@@ -0,0 +1,137 @@
+using Aetheris.Kernel.Core.Brep;
+using Aetheris.Kernel.Core.Brep.Features;
+using Aetheris.Kernel.Core.Diagnostics;
+using Aetheris.Kernel.Core.Geometry;
+using Aetheris.Kernel.Core.Math;
+
+namespace Aetheris.Kernel.Core.Tests.Brep.Features;
+
+public sealed class BrepExtrudeTests
+{
+ [Fact]
+ public void Create_RectangleProfile_ProducesExpectedTopologyAndBindings()
+ {
+ var profile = PolylineProfile2D.Rectangle(4d, 2d);
+ var frame = new ExtrudeFrame3D(
+ Point3D.Origin,
+ Direction3D.Create(new Vector3D(0d, 0d, 1d)),
+ Direction3D.Create(new Vector3D(1d, 0d, 0d)));
+
+ var result = BrepExtrude.Create(profile, frame, 3d);
+
+ Assert.True(result.IsSuccess);
+ var body = result.Value;
+
+ Assert.Single(body.Topology.Bodies);
+ Assert.Equal(1, body.Topology.Shells.Count());
+ Assert.Equal(6, body.Topology.Faces.Count());
+ Assert.Equal(6, body.Topology.Loops.Count());
+ Assert.Equal(24, body.Topology.Coedges.Count());
+ Assert.Equal(12, body.Topology.Edges.Count());
+ Assert.Equal(8, body.Topology.Vertices.Count());
+
+ Assert.All(body.Topology.Faces, face => Assert.Equal(SurfaceGeometryKind.Plane, body.GetFaceSurface(face.Id).Kind));
+ Assert.All(body.Topology.Edges, edge => Assert.Equal(CurveGeometryKind.Line3, body.GetEdgeCurve(edge.Id).Kind));
+
+ var validation = BrepBindingValidator.Validate(body, requireAllEdgeAndFaceBindings: true);
+ Assert.True(validation.IsSuccess);
+
+ var bodyId = body.GetBodyIds().Single();
+ Assert.Equal(6, body.GetFaces(bodyId).Count);
+ foreach (var faceId in body.GetFaces(bodyId))
+ {
+ _ = body.GetEdges(faceId);
+ }
+ }
+
+ [Fact]
+ public void Create_DepthDirection_OffsetsTopCapAlongPositiveNormal()
+ {
+ var profile = PolylineProfile2D.Rectangle(2d, 2d);
+ var frame = new ExtrudeFrame3D(
+ new Point3D(10d, -3d, 5d),
+ Direction3D.Create(new Vector3D(0d, 0d, 1d)),
+ Direction3D.Create(new Vector3D(1d, 0d, 0d)));
+
+ var result = BrepExtrude.Create(profile, frame, 7d);
+
+ Assert.True(result.IsSuccess);
+ var topFace = result.Value.Topology.Faces.Single(face => face.Id.Value == 2);
+ var topSurface = result.Value.GetFaceSurface(topFace.Id).Plane;
+ Assert.NotNull(topSurface);
+ Assert.Equal(new Point3D(10d, -3d, 12d), topSurface.Value.Origin);
+ Assert.Equal(frame.Normal, topSurface.Value.Normal);
+ }
+
+ [Fact]
+ public void Create_AcceptsClockwiseAndCounterClockwiseWinding()
+ {
+ var ccw = PolylineProfile2D.Create(
+ [
+ new ProfilePoint2D(0d, 0d),
+ new ProfilePoint2D(3d, 0d),
+ new ProfilePoint2D(3d, 1d),
+ new ProfilePoint2D(0d, 1d),
+ ]);
+ var cw = PolylineProfile2D.Create(
+ [
+ new ProfilePoint2D(0d, 1d),
+ new ProfilePoint2D(3d, 1d),
+ new ProfilePoint2D(3d, 0d),
+ new ProfilePoint2D(0d, 0d),
+ ]);
+
+ var frame = new ExtrudeFrame3D(
+ Point3D.Origin,
+ Direction3D.Create(new Vector3D(0d, 0d, 1d)),
+ Direction3D.Create(new Vector3D(1d, 0d, 0d)));
+
+ var ccwResult = BrepExtrude.Create(ccw.Value, frame, 1d);
+ var cwResult = BrepExtrude.Create(cw.Value, frame, 1d);
+
+ Assert.True(ccwResult.IsSuccess);
+ Assert.True(cwResult.IsSuccess);
+ }
+
+ [Theory]
+ [InlineData(0d)]
+ [InlineData(-1d)]
+ [InlineData(double.NaN)]
+ [InlineData(double.PositiveInfinity)]
+ public void Create_InvalidDepth_FailsWithDiagnostics(double depth)
+ {
+ var profile = PolylineProfile2D.Rectangle(2d, 2d);
+ var frame = new ExtrudeFrame3D(
+ Point3D.Origin,
+ Direction3D.Create(new Vector3D(0d, 0d, 1d)),
+ Direction3D.Create(new Vector3D(1d, 0d, 0d)));
+
+ var result = BrepExtrude.Create(profile, frame, depth);
+
+ Assert.False(result.IsSuccess);
+ Assert.Contains(result.Diagnostics, d => d.Code == KernelDiagnosticCode.InvalidArgument && d.Message.Contains("depth", StringComparison.Ordinal));
+ }
+
+ [Fact]
+ public void Create_SelfIntersectingProfile_CurrentlyNotRejectedInM10()
+ {
+ var bowTie = PolylineProfile2D.Create(
+ [
+ new ProfilePoint2D(0d, 0d),
+ new ProfilePoint2D(2d, 2d),
+ new ProfilePoint2D(0d, 2d),
+ new ProfilePoint2D(2d, 0d),
+ ]);
+
+ Assert.True(bowTie.IsSuccess);
+
+ var frame = new ExtrudeFrame3D(
+ Point3D.Origin,
+ Direction3D.Create(new Vector3D(0d, 0d, 1d)),
+ Direction3D.Create(new Vector3D(1d, 0d, 0d)));
+
+ var result = BrepExtrude.Create(bowTie.Value, frame, 1d);
+
+ Assert.True(result.IsSuccess);
+ }
+}
diff --git a/Aetheris.Kernel.Core.Tests/Brep/Features/PolylineProfile2DTests.cs b/Aetheris.Kernel.Core.Tests/Brep/Features/PolylineProfile2DTests.cs
new file mode 100644
index 00000000..50e8abc6
--- /dev/null
+++ b/Aetheris.Kernel.Core.Tests/Brep/Features/PolylineProfile2DTests.cs
@@ -0,0 +1,75 @@
+using Aetheris.Kernel.Core.Brep.Features;
+using Aetheris.Kernel.Core.Diagnostics;
+
+namespace Aetheris.Kernel.Core.Tests.Brep.Features;
+
+public sealed class PolylineProfile2DTests
+{
+ [Fact]
+ public void Create_ValidPolygon_Succeeds()
+ {
+ var result = PolylineProfile2D.Create(
+ [
+ new ProfilePoint2D(0d, 0d),
+ new ProfilePoint2D(2d, 0d),
+ new ProfilePoint2D(1d, 1d),
+ ]);
+
+ Assert.True(result.IsSuccess);
+ Assert.Equal(3, result.Value.Vertices.Count);
+ }
+
+ [Fact]
+ public void Create_TooFewVertices_Fails()
+ {
+ var result = PolylineProfile2D.Create(
+ [
+ new ProfilePoint2D(0d, 0d),
+ new ProfilePoint2D(2d, 0d),
+ ]);
+
+ Assert.False(result.IsSuccess);
+ Assert.Contains(result.Diagnostics, d => d.Code == KernelDiagnosticCode.InvalidArgument);
+ }
+
+ [Fact]
+ public void Create_DuplicateAdjacentVertices_Fails()
+ {
+ var result = PolylineProfile2D.Create(
+ [
+ new ProfilePoint2D(0d, 0d),
+ new ProfilePoint2D(1d, 0d),
+ new ProfilePoint2D(1d, 0d),
+ new ProfilePoint2D(0d, 1d),
+ ]);
+
+ Assert.False(result.IsSuccess);
+ Assert.Contains(result.Diagnostics, d => d.Message.Contains("zero-length segment", StringComparison.Ordinal));
+ }
+
+ [Fact]
+ public void Create_NonFiniteCoordinates_Fails()
+ {
+ var result = PolylineProfile2D.Create(
+ [
+ new ProfilePoint2D(0d, 0d),
+ new ProfilePoint2D(double.NaN, 0d),
+ new ProfilePoint2D(0d, 1d),
+ ]);
+
+ Assert.False(result.IsSuccess);
+ Assert.Contains(result.Diagnostics, d => d.Message.Contains("finite", StringComparison.Ordinal));
+ }
+
+ [Fact]
+ public void RectangleHelper_ProducesFourVerticesInCounterClockwiseOrder()
+ {
+ var rectangle = PolylineProfile2D.Rectangle(4d, 2d);
+
+ Assert.Equal(4, rectangle.Vertices.Count);
+ Assert.Equal(new ProfilePoint2D(-2d, -1d), rectangle.Vertices[0]);
+ Assert.Equal(new ProfilePoint2D(2d, -1d), rectangle.Vertices[1]);
+ Assert.Equal(new ProfilePoint2D(2d, 1d), rectangle.Vertices[2]);
+ Assert.Equal(new ProfilePoint2D(-2d, 1d), rectangle.Vertices[3]);
+ }
+}
diff --git a/Aetheris.Kernel.Core/Brep/Features/BrepExtrude.cs b/Aetheris.Kernel.Core/Brep/Features/BrepExtrude.cs
new file mode 100644
index 00000000..746e90a6
--- /dev/null
+++ b/Aetheris.Kernel.Core/Brep/Features/BrepExtrude.cs
@@ -0,0 +1,181 @@
+using Aetheris.Kernel.Core.Diagnostics;
+using Aetheris.Kernel.Core.Geometry;
+using Aetheris.Kernel.Core.Geometry.Curves;
+using Aetheris.Kernel.Core.Geometry.Surfaces;
+using Aetheris.Kernel.Core.Math;
+using Aetheris.Kernel.Core.Results;
+using Aetheris.Kernel.Core.Topology;
+
+namespace Aetheris.Kernel.Core.Brep.Features;
+
+/// <summary>
+/// M10 minimal programmatic extrusion for a single outer polyline profile.
+/// </summary>
+public static class BrepExtrude
+{
+ public static KernelResult<BrepBody> Create(PolylineProfile2D profile, ExtrudeFrame3D frame, double depth)
+ {
+ var diagnostics = new List<KernelDiagnostic>();
+ if (!double.IsFinite(depth) || depth <= 0d)
+ {
+ diagnostics.Add(CreateInvalidArgument("depth must be finite and greater than zero."));
+ }
+
+ if (profile is null)
+ {
+ diagnostics.Add(CreateInvalidArgument("profile must be provided."));
+ return KernelResult<BrepBody>.Failure(diagnostics);
+ }
+
+ diagnostics.AddRange(PolylineProfile2D.ValidateVertices(profile.Vertices));
+ if (diagnostics.Count > 0)
+ {
+ return KernelResult<BrepBody>.Failure(diagnostics);
+ }
+
+ var vertices2D = profile.Vertices;
+ var n = vertices2D.Count;
+ var builder = new TopologyBuilder();
+
+ var bottomVertices = new VertexId[n];
+ var topVertices = new VertexId[n];
+ for (var i = 0; i < n; i++)
+ {
+ bottomVertices[i] = builder.AddVertex();
+ }
+
+ for (var i = 0; i < n; i++)
+ {
+ topVertices[i] = builder.AddVertex();
+ }
+
+ var bottomEdges = new EdgeId[n];
+ var topEdges = new EdgeId[n];
+ var sideEdges = new EdgeId[n];
+
+ for (var i = 0; i < n; i++)
+ {
+ var next = (i + 1) % n;
+ bottomEdges[i] = builder.AddEdge(bottomVertices[i], bottomVertices[next]);
+ topEdges[i] = builder.AddEdge(topVertices[i], topVertices[next]);
+ sideEdges[i] = builder.AddEdge(bottomVertices[i], topVertices[i]);
+ }
+
+ var faces = new List<FaceId>(n + 2)
+ {
+ AddFaceWithLoop(builder, bottomEdges.Select(EdgeUse.Forward).ToArray()),
+ AddFaceWithLoop(builder, topEdges.Select(EdgeUse.Reversed).ToArray()),
+ };
+
+ for (var i = 0; i < n; i++)
+ {
+ var next = (i + 1) % n;
+ faces.Add(
+ AddFaceWithLoop(
+ builder,
+ [
+ EdgeUse.Forward(bottomEdges[i]),
+ EdgeUse.Forward(sideEdges[next]),
+ EdgeUse.Reversed(topEdges[i]),
+ EdgeUse.Reversed(sideEdges[i]),
+ ]));
+ }
+
+ var shell = builder.AddShell(faces);
+ builder.AddBody([shell]);
+
+ var geometry = new BrepGeometryStore();
+ var bottomPoints = vertices2D.Select(v => frame.ToWorld(v)).ToArray();
+ var topPoints = vertices2D.Select(v => frame.ToWorld(v, depth)).ToArray();
+
+ var curveId = 1;
+ for (var i = 0; i < n; i++)
+ {
+ var next = (i + 1) % n;
+ geometry.AddCurve(new CurveGeometryId(curveId++), CurveGeometry.FromLine(CreateLine(bottomPoints[i], bottomPoints[next])));
+ }
+
+ for (var i = 0; i < n; i++)
+ {
+ var next = (i + 1) % n;
+ geometry.AddCurve(new CurveGeometryId(curveId++), CurveGeometry.FromLine(CreateLine(topPoints[i], topPoints[next])));
+ }
+
+ for (var i = 0; i < n; i++)
+ {
+ geometry.AddCurve(new CurveGeometryId(curveId++), CurveGeometry.FromLine(CreateLine(bottomPoints[i], topPoints[i])));
+ }
+
+ var bottomSurfaceId = new SurfaceGeometryId(1);
+ var topSurfaceId = new SurfaceGeometryId(2);
+ geometry.AddSurface(bottomSurfaceId, SurfaceGeometry.FromPlane(new PlaneSurface(frame.Origin, Direction3D.Create(-frame.Normal.ToVector()), frame.UAxis)));
+ geometry.AddSurface(topSurfaceId, SurfaceGeometry.FromPlane(new PlaneSurface(frame.Origin + (frame.Normal.ToVector() * depth), frame.Normal, frame.UAxis)));
+
+ for (var i = 0; i < n; i++)
+ {
+ var next = (i + 1) % n;
+ var edgeDirection = topPoints[next] - topPoints[i];
+ var sideNormal = Direction3D.Create(edgeDirection.Cross(frame.Normal.ToVector()));
+ geometry.AddSurface(
+ new SurfaceGeometryId(i + 3),
+ SurfaceGeometry.FromPlane(new PlaneSurface(bottomPoints[i], sideNormal, frame.Normal)));
+ }
+
+ var bindings = new BrepBindingModel();
+ for (var i = 0; i < n; i++)
+ {
+ bindings.AddEdgeBinding(new EdgeGeometryBinding(bottomEdges[i], new CurveGeometryId(i + 1), new ParameterInterval(0d, (bottomPoints[(i + 1) % n] - bottomPoints[i]).Length)));
+ bindings.AddEdgeBinding(new EdgeGeometryBinding(topEdges[i], new CurveGeometryId(n + i + 1), new ParameterInterval(0d, (topPoints[(i + 1) % n] - topPoints[i]).Length)));
+ bindings.AddEdgeBinding(new EdgeGeometryBinding(sideEdges[i], new CurveGeometryId((2 * n) + i + 1), new ParameterInterval(0d, depth)));
+ }
+
+ bindings.AddFaceBinding(new FaceGeometryBinding(faces[0], bottomSurfaceId));
+ bindings.AddFaceBinding(new FaceGeometryBinding(faces[1], topSurfaceId));
+ for (var i = 0; i < n; i++)
+ {
+ bindings.AddFaceBinding(new FaceGeometryBinding(faces[i + 2], new SurfaceGeometryId(i + 3)));
+ }
+
+ var body = new BrepBody(builder.Model, geometry, bindings);
+ var validation = BrepBindingValidator.Validate(body, requireAllEdgeAndFaceBindings: true);
+ return validation.IsSuccess
+ ? KernelResult<BrepBody>.Success(body, validation.Diagnostics)
+ : KernelResult<BrepBody>.Failure(validation.Diagnostics);
+ }
+
+ private static Line3Curve CreateLine(Point3D start, Point3D end)
+ {
+ return new Line3Curve(start, Direction3D.Create(end - start));
+ }
+
+ private static FaceId AddFaceWithLoop(TopologyBuilder builder, IReadOnlyList<EdgeUse> edgeUses)
+ {
+ var loopId = builder.AllocateLoopId();
+ var coedgeIds = new CoedgeId[edgeUses.Count];
+
+ for (var i = 0; i < edgeUses.Count; i++)
+ {
+ coedgeIds[i] = builder.AllocateCoedgeId();
+ }
+
+ for (var i = 0; i < edgeUses.Count; i++)
+ {
+ var next = coedgeIds[(i + 1) % edgeUses.Count];
+ var prev = coedgeIds[(i + edgeUses.Count - 1) % edgeUses.Count];
+ builder.AddCoedge(new Coedge(coedgeIds[i], edgeUses[i].EdgeId, loopId, next, prev, edgeUses[i].IsReversed));
+ }
+
+ builder.AddLoop(new Loop(loopId, coedgeIds));
+ return builder.AddFace([loopId]);
+ }
+
+ private static KernelDiagnostic CreateInvalidArgument(string message)
+ => new(KernelDiagnosticCode.InvalidArgument, KernelDiagnosticSeverity.Error, message);
+
+ private readonly record struct EdgeUse(EdgeId EdgeId, bool IsReversed)
+ {
+ public static EdgeUse Forward(EdgeId edgeId) => new(edgeId, false);
+
+ public static EdgeUse Reversed(EdgeId edgeId) => new(edgeId, true);
+ }
+}
diff --git a/Aetheris.Kernel.Core/Brep/Features/ExtrudeFrame3D.cs b/Aetheris.Kernel.Core/Brep/Features/ExtrudeFrame3D.cs
new file mode 100644
index 00000000..908a0ec0
--- /dev/null
+++ b/Aetheris.Kernel.Core/Brep/Features/ExtrudeFrame3D.cs
@@ -0,0 +1,46 @@
+using Aetheris.Kernel.Core.Math;
+
+namespace Aetheris.Kernel.Core.Brep.Features;
+
+/// <summary>
+/// Local frame used to map profile-space (u,v) points into world-space for extrusion.
+/// Extrusion direction is +Normal.
+/// </summary>
+public readonly record struct ExtrudeFrame3D
+{
+ private readonly Direction3D _uAxis;
+ private readonly Direction3D _vAxis;
+
+ public ExtrudeFrame3D(Point3D origin, Direction3D normal, Direction3D uAxis)
+ {
+ var n = normal.ToVector();
+ var uReference = uAxis.ToVector();
+ var projected = uReference - (n * uReference.Dot(n));
+
+ if (!Direction3D.TryCreate(projected, out var normalizedU))
+ {
+ throw new ArgumentOutOfRangeException(nameof(uAxis), "U axis must not be parallel to normal.");
+ }
+
+ if (!Direction3D.TryCreate(n.Cross(normalizedU.ToVector()), out var normalizedV))
+ {
+ throw new ArgumentOutOfRangeException(nameof(normal), "Normal must define a valid frame basis.");
+ }
+
+ Origin = origin;
+ Normal = normal;
+ _uAxis = normalizedU;
+ _vAxis = normalizedV;
+ }
+
+ public Point3D Origin { get; }
+
+ public Direction3D Normal { get; }
+
+ public Direction3D UAxis => _uAxis;
+
+ public Direction3D VAxis => _vAxis;
+
+ public Point3D ToWorld(ProfilePoint2D point, double normalOffset = 0d)
+ => Origin + (_uAxis.ToVector() * point.X) + (_vAxis.ToVector() * point.Y) + (Normal.ToVector() * normalOffset);
+}
diff --git a/Aetheris.Kernel.Core/Brep/Features/PolylineProfile2D.cs b/Aetheris.Kernel.Core/Brep/Features/PolylineProfile2D.cs
new file mode 100644
index 00000000..d6c66005
--- /dev/null
+++ b/Aetheris.Kernel.Core/Brep/Features/PolylineProfile2D.cs
@@ -0,0 +1,109 @@
+using Aetheris.Kernel.Core.Diagnostics;
+using Aetheris.Kernel.Core.Results;
+
+namespace Aetheris.Kernel.Core.Brep.Features;
+
+/// <summary>
+/// Minimal M10 profile representation: one outer closed loop, line segments only.
+/// Closure is implicit (last vertex connects to first).
+/// </summary>
+public sealed class PolylineProfile2D
+{
+ private PolylineProfile2D(IReadOnlyList<ProfilePoint2D> vertices)
+ {
+ Vertices = vertices;
+ }
+
+ public IReadOnlyList<ProfilePoint2D> Vertices { get; }
+
+ public static KernelResult<PolylineProfile2D> Create(IReadOnlyList<ProfilePoint2D> vertices)
+ {
+ var diagnostics = ValidateVertices(vertices);
+ return diagnostics.Count > 0
+ ? KernelResult<PolylineProfile2D>.Failure(diagnostics)
+ : KernelResult<PolylineProfile2D>.Success(new PolylineProfile2D(vertices.ToArray()));
+ }
+
+ public static PolylineProfile2D Rectangle(double width, double height)
+ {
+ if (!double.IsFinite(width) || width <= 0d)
+ {
+ throw new ArgumentOutOfRangeException(nameof(width), "width must be finite and greater than zero.");
+ }
+
+ if (!double.IsFinite(height) || height <= 0d)
+ {
+ throw new ArgumentOutOfRangeException(nameof(height), "height must be finite and greater than zero.");
+ }
+
+ return new PolylineProfile2D(
+ [
+ new ProfilePoint2D(-width * 0.5d, -height * 0.5d),
+ new ProfilePoint2D(width * 0.5d, -height * 0.5d),
+ new ProfilePoint2D(width * 0.5d, height * 0.5d),
+ new ProfilePoint2D(-width * 0.5d, height * 0.5d),
+ ]);
+ }
+
+ internal static List<KernelDiagnostic> ValidateVertices(IReadOnlyList<ProfilePoint2D>? vertices)
+ {
+ var diagnostics = new List<KernelDiagnostic>();
+ if (vertices is null)
+ {
+ diagnostics.Add(CreateInvalidArgument("Profile vertices must be provided."));
+ return diagnostics;
+ }
+
+ if (vertices.Count < 3)
+ {
+ diagnostics.Add(CreateInvalidArgument("Profile must contain at least three vertices."));
+ return diagnostics;
+ }
+
+ var distinct = new HashSet<ProfilePoint2D>();
+ for (var i = 0; i < vertices.Count; i++)
+ {
+ var current = vertices[i];
+ if (!double.IsFinite(current.X) || !double.IsFinite(current.Y))
+ {
+ diagnostics.Add(CreateInvalidArgument("Profile coordinates must be finite."));
+ return diagnostics;
+ }
+
+ distinct.Add(current);
+
+ var next = vertices[(i + 1) % vertices.Count];
+ var dx = next.X - current.X;
+ var dy = next.Y - current.Y;
+ if ((dx * dx) + (dy * dy) <= 0d)
+ {
+ diagnostics.Add(CreateInvalidArgument("Profile contains a zero-length segment (duplicate adjacent vertices)."));
+ return diagnostics;
+ }
+ }
+
+ if (distinct.Count < 3)
+ {
+ diagnostics.Add(CreateInvalidArgument("Profile must contain at least three distinct vertices."));
+ return diagnostics;
+ }
+
+ var signedArea = 0d;
+ for (var i = 0; i < vertices.Count; i++)
+ {
+ var current = vertices[i];
+ var next = vertices[(i + 1) % vertices.Count];
+ signedArea += (current.X * next.Y) - (next.X * current.Y);
+ }
+
+ if (double.Abs(signedArea) <= 1e-12d)
+ {
+ diagnostics.Add(CreateInvalidArgument("Profile polygon area is zero or numerically degenerate."));
+ }
+
+ return diagnostics;
+ }
+
+ private static KernelDiagnostic CreateInvalidArgument(string message)
+ => new(KernelDiagnosticCode.InvalidArgument, KernelDiagnosticSeverity.Error, message);
+}
diff --git a/Aetheris.Kernel.Core/Brep/Features/ProfilePoint2D.cs b/Aetheris.Kernel.Core/Brep/Features/ProfilePoint2D.cs
new file mode 100644
index 00000000..f651c542
--- /dev/null
+++ b/Aetheris.Kernel.Core/Brep/Features/ProfilePoint2D.cs
@@ -0,0 +1,3 @@
+namespace Aetheris.Kernel.Core.Brep.Features;
+
+public readonly record struct ProfilePoint2D(double X, double Y);
diff --git a/docs/milestones.md b/docs/milestones.md
index 7d0c9add..01bec09b 100644
--- a/docs/milestones.md
+++ b/docs/milestones.md
@@ -78,3 +78,12 @@
- [x] Support M08 primitive outputs (`CreateBox`, `CreateCylinder`, `CreateSphere`) with deterministic hit ordering and tolerance-aware boundary handling.
- [x] Add focused unit tests for primitive hit/classification behavior, tangent handling, seam dedup behavior, and unsupported-body fallbacks.
- [x] Explicitly defer arbitrary trimmed/general B-rep intersection and classification support.
+
+## M10 — Programmatic Extrude Framework v1 (No Sketcher)
+
+- [x] Add a minimal programmatic profile model for extrusion input using local 2D planar coordinates (single outer closed loop, line segments only).
+- [x] M10 profile validation intentionally does not yet perform full polygon self-intersection rejection (deferred to a later milestone).
+- [x] Add an explicit extrusion API (`BrepExtrude.Create`) returning `KernelResult<BrepBody>` with strict validator-backed output checks.
+- [x] Support constant-depth linear extrusion along +normal of an explicit frame, producing top/bottom caps and planar side faces.
+- [x] Add focused unit tests for profile/extrude validation, topology and binding expectations, traversal safety, depth-direction convention, and winding behavior.
+- [x] Explicitly defer sketching/constraints, holes/multi-loop profiles, arcs/splines, draft/thin features, booleans, and generalized feature history.