Skip to content

Next Gen STEP AP242 Native-ish BREP Geometric Modeling Kernel

Add retained IntelliDraft shapes and elliptic extrusion tessellation

Yuechen Li0bf064bdfe1d
diff --git a/Aetheris.Kernel.Core.Tests/Step242/Step242LinearExtrusionSurfaceProductionTests.cs b/Aetheris.Kernel.Core.Tests/Step242/Step242LinearExtrusionSurfaceProductionTests.cs
index 6f27c6f9..115b0397 100644
--- a/Aetheris.Kernel.Core.Tests/Step242/Step242LinearExtrusionSurfaceProductionTests.cs
+++ b/Aetheris.Kernel.Core.Tests/Step242/Step242LinearExtrusionSurfaceProductionTests.cs
@@ -10,6 +10,24 @@ namespace Aetheris.Kernel.Core.Tests.Step242;
public sealed class Step242LinearExtrusionSurfaceProductionTests
{
+ [Fact]
+ public void EllipticStripTessellatesItsActualTrimAndRetainsExactSupport()
+ {
+ var body = CreateEllipticStripSurfaceBody();
+ var exactBefore = Step242Exporter.ExportBody(body).Value;
+ var display = Aetheris.Kernel.Core.Brep.Tessellation.BrepDisplayTessellator.Tessellate(body);
+ Assert.True(display.IsSuccess, string.Join(";", display.Diagnostics.Select(d => d.Message)));
+ var patch = Assert.Single(display.Value.FacePatches); Assert.NotEmpty(patch.TriangleIndices);
+ Assert.All(patch.Positions, point => {
+ Assert.Equal(1, point.X * point.X / 16 + point.Y * point.Y / 4, 8);
+ Assert.InRange(point.Z, -1e-8, 5 + 1e-8);
+ Assert.True(point.Y >= -1e-8, "The half-ellipse trim must not become a full tube.");
+ });
+ Assert.All(patch.Normals, normal => Assert.Equal(1, normal.Length, 8));
+ Assert.All(body.Geometry.Surfaces, surface => Assert.Equal(SurfaceGeometryKind.LinearExtrusion, surface.Value.Kind));
+ Assert.Equal(exactBefore, Step242Exporter.ExportBody(body).Value);
+ }
+
[Fact]
public void EllipseDirectrixLinearExtrusion_ExportsReimportsAsExactSweptSurface()
{
diff --git a/Aetheris.Kernel.Core/Brep/Tessellation/BrepDisplayTessellator.cs b/Aetheris.Kernel.Core/Brep/Tessellation/BrepDisplayTessellator.cs
index 82543d58..adf7f8b7 100644
--- a/Aetheris.Kernel.Core/Brep/Tessellation/BrepDisplayTessellator.cs
+++ b/Aetheris.Kernel.Core/Brep/Tessellation/BrepDisplayTessellator.cs
@@ -272,6 +272,8 @@ public static class BrepDisplayTessellator
SurfaceGeometryKind.Ellipsoid => TessellateEllipsoidFace(body, faceId, surface.Ellipsoid!, options, executionBudget),
SurfaceGeometryKind.Torus => TessellateTorusFace(body, faceId, surface.Torus!.Value, options, executionBudget),
SurfaceGeometryKind.BSplineSurfaceWithKnots => TessellateBSplineSurfaceFace(body, faceId, surface.BSplineSurfaceWithKnots!, options, executionBudget),
+ SurfaceGeometryKind.LinearExtrusion when surface.LinearExtrusion!.Value.Directrix.Ellipse3.HasValue
+ => TessellateEllipticExtrusionFace(body, faceId, surface.LinearExtrusion.Value, options, executionBudget),
SurfaceGeometryKind.LinearExtrusion when surface.LinearExtrusion!.Value.Directrix.BSpline3 is { } curve
=> TessellateBSplineSurfaceFace(body, faceId, new BSplineSurfaceWithKnots(
curve.Degree, 1,
@@ -282,6 +284,39 @@ public static class BrepDisplayTessellator
};
}
+ private static KernelResult<DisplayFaceMeshPatch> TessellateEllipticExtrusionFace(BrepBody body, FaceId faceId,
+ LinearExtrusionSurface surface, DisplayTessellationOptions options, DisplayTessellationExecutionBudget? budget)
+ {
+ var ellipse = surface.Directrix.Ellipse3!.Value;
+ var vector = surface.ExtrusionVector;
+ var height = vector.Dot(ellipse.Normal.ToVector());
+ if (double.Abs(height) <= 1e-12 * vector.Length)
+ return KernelResult<DisplayFaceMeshPatch>.Failure([CreateNotImplemented($"Face {faceId.Value} has a degenerate in-plane elliptic extrusion.")]);
+ var loops = body.GetLoopIds(faceId).Where(id => body.Topology.GetLoop(id).Kind == LoopKind.Edge).ToArray();
+ if (loops.Length == 0)
+ return KernelResult<DisplayFaceMeshPatch>.Failure([CreateNotImplemented($"Face {faceId.Value} elliptic extrusion requires explicit trim loops.")]);
+ (double U, double V)? Project(Point3D point)
+ {
+ var v = (point - ellipse.Center).Dot(ellipse.Normal.ToVector()) / height;
+ var radial = point - (ellipse.Center + vector * v);
+ var u = double.Atan2(radial.Dot(ellipse.YAxis.ToVector()) / ellipse.MinorRadius,
+ radial.Dot(ellipse.XAxis.ToVector()) / ellipse.MajorRadius);
+ var residual = point - (ellipse.Evaluate(u) + vector * v);
+ return residual.Length <= 1e-6 ? (u, v) : null;
+ }
+ var trim = TryBuildPeriodicTrimmedSurfaceUvLoops(body, faceId, loops, Project, options, budget, SurfaceGeometryKind.LinearExtrusion);
+ if (!trim.IsSuccess) return KernelResult<DisplayFaceMeshPatch>.Failure(trim.Diagnostics);
+ var patch = TrimmedSurfaceTessellator.Tessellate(faceId, trim.Value,
+ (u, v) => ellipse.Evaluate(u) + vector * v,
+ (u, _) => Direction3D.Create((ellipse.XAxis.ToVector() * (-ellipse.MajorRadius * double.Sin(u))
+ + ellipse.YAxis.ToVector() * (ellipse.MinorRadius * double.Cos(u))).Cross(vector)).ToVector(),
+ options, double.NegativeInfinity, double.PositiveInfinity, double.NegativeInfinity, double.PositiveInfinity,
+ CreateValidationWarning, budget, SurfaceGeometryKind.LinearExtrusion);
+ return patch.IsSuccess && patch.Value.TriangleIndices.Count == 0
+ ? KernelResult<DisplayFaceMeshPatch>.Failure([CreateNotImplemented($"Face {faceId.Value} elliptic extrusion trim produced no display triangles.")])
+ : patch;
+ }
+
private static KernelResult<DisplayFaceMeshPatch> TessellatePlanarFaceWithSamplingRetry(BrepBody body, FaceId faceId,
PlaneSurface plane, DisplayTessellationOptions options, DisplayTessellationExecutionBudget? budget)
{
diff --git a/Aetheris.Kernel.Firmament.Tests/FirmamentIntelliDraftTests.cs b/Aetheris.Kernel.Firmament.Tests/FirmamentIntelliDraftTests.cs
index 99a3ca2c..ab0b67e5 100644
--- a/Aetheris.Kernel.Firmament.Tests/FirmamentIntelliDraftTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/FirmamentIntelliDraftTests.cs
@@ -5,6 +5,49 @@ namespace Aetheris.Kernel.Firmament.Tests;
public class FirmamentIntelliDraftTests
{
+ [Theory]
+ [InlineData("Rect2", 4800)]
+ [InlineData("Circle2", 1884.955592153876)]
+ [InlineData("Ellipse2", 3769.911184307752)]
+ [InlineData("Slot2", 4284.955592153876)]
+ [InlineData("RoundedRect2", 4779.398223686156)]
+ public void DrawnClosedShapeRetainsItsOwnerControlsAndBuildsItsAnalyticProfile(string kind, double volume)
+ {
+ var draft = new Draft(); draft.Add(new("layout", Name: "layout"));
+ draft.Add(new("shape", draft.Id("layout"), "outline", Kind: kind, Width: 40, Height: 20, Radius: kind == "RoundedRect2" ? 2 : 10));
+ var shape = Assert.Single(draft.View.Shapes);
+ Assert.Equal(kind, shape.Kind); Assert.Equal([0d, 0], shape.Center);
+ Assert.Contains(draft.View.Guides, g => g.Name.StartsWith("outline.", StringComparison.Ordinal));
+ Assert.All(draft.View.Guides, g => Assert.StartsWith("draft.firmament:", g.Provenance!.SourceSpan));
+ var center = shape.Controls.Single(c => c.Label == "Center X");
+ draft.Source = FirmamentSketchService.Edit(draft.Source, "draft.firmament", "0", new("constructionDimensions", Changes: [new(center.Id, 5)])).Text;
+ Assert.Equal(5, Assert.Single(draft.View.Shapes).Center[0]);
+ draft.Add(new("trace", draft.Id("layout"), "section", Trace: [new("outline", WholeLoop: true)]));
+ draft.Add(new("extrude", draft.Id("section"), "body", Length: 6));
+ var built = FirmamentBuildAndExport.CompileSource(draft.Source);
+ Assert.True(built.IsSuccess, string.Join(";", built.Diagnostics.Select(d => d.Message)));
+ GeometryMatches(draft.Source, "draw-" + kind.ToLowerInvariant() + ".firmament");
+ if (kind is not ("Circle2" or "Ellipse2")) Assert.Equal(volume, new FirmamentMeasurements(built.Value).Volume().ValueMm3!.Value, 6);
+ // The generic closed conic extrusion lane does not expose an analytic volume
+ // measurement yet. Exact geometry records are compared with the reference above.
+ Assert.Contains(kind + " outline", draft.Source);
+ var body = new FirmamentMeasurements(built.Value).Body;
+ var display = Aetheris.Kernel.Core.Brep.Tessellation.BrepDisplayTessellator.Tessellate(body);
+ Assert.True(display.IsSuccess, string.Join(";", display.Diagnostics.Select(d => d.Message)));
+ Assert.Equal(body.Topology.Faces.Count(), display.Value.FacePatches.Count);
+ Assert.All(display.Value.FacePatches, face => Assert.NotEmpty(face.TriangleIndices));
+ }
+
+ [Fact]
+ public void InvalidDrawnShapesDoNotChangeTheDraft()
+ {
+ var draft = new Draft(); draft.Add(new("layout", Name: "layout")); var before = draft.Source;
+ Assert.Throws<FirmamentLanguageEditException>(() => draft.Add(new("shape", draft.Id("layout"), "invalid", Kind: "Slot2", Width: 10, Height: 20)));
+ Assert.Throws<FirmamentLanguageEditException>(() => draft.Add(new("shape", draft.Id("layout"), "invalid", Kind: "RoundedRect2", Width: 40, Height: 20, Radius: 15)));
+ Assert.Throws<FirmamentLanguageEditException>(() => draft.Add(new("shape", draft.Id("layout"), "invalid", Kind: "Unknown2")));
+ Assert.Equal(before, draft.Source);
+ }
+
[Fact]
public void RetainedRectanglesResolveTheirSharedDimensionsThroughNormalCompilation()
{
diff --git a/Aetheris.Kernel.Firmament/FirmamentV2/ClosedBoundary2Authoring.cs b/Aetheris.Kernel.Firmament/FirmamentV2/ClosedBoundary2Authoring.cs
index 831db180..18c0e582 100644
--- a/Aetheris.Kernel.Firmament/FirmamentV2/ClosedBoundary2Authoring.cs
+++ b/Aetheris.Kernel.Firmament/FirmamentV2/ClosedBoundary2Authoring.cs
@@ -17,6 +17,8 @@ internal static class ClosedBoundary2Authoring
internal sealed record Result(string Source, IReadOnlyList<FirmamentV2ClosedBoundary2Decl> Boundaries)
{
internal IReadOnlyList<string> GeneratedDeclarationNames { get; init; } = [];
+ internal IReadOnlyDictionary<string, IReadOnlyDictionary<string, string>> AuthoringMembers { get; init; }
+ = new Dictionary<string, IReadOnlyDictionary<string, string>>();
public IReadOnlyList<FirmamentV2Polygon2Decl> Polygons => Boundaries.Where(x => x.ShapeType == "Polygon2")
.Select(x => new FirmamentV2Polygon2Decl(x.Name, x.Variant!, x.CenterX, x.CenterY,
x.Dimensions.GetValueOrDefault("DiagonalX"), x.Dimensions.GetValueOrDefault("DiagonalY"),
@@ -112,6 +114,7 @@ internal static class ClosedBoundary2Authoring
foreach (var change in changes.OrderByDescending(x => x.Start)) source = source.Remove(change.Start, change.Length).Insert(change.Start, change.Text);
return new(source, shapes.Select(x => x.Declaration).ToArray())
{
+ AuthoringMembers = shapes.ToDictionary(s => s.Declaration.Name, s => s.MemberMap, StringComparer.Ordinal),
GeneratedDeclarationNames = shapes.Where(s => s.LoweredSource is not null)
.SelectMany(s => s.MemberMap.Values).Distinct(StringComparer.Ordinal).ToArray()
};
diff --git a/Aetheris.Kernel.Firmament/FirmamentV2/FirmamentIntelliDraft.cs b/Aetheris.Kernel.Firmament/FirmamentV2/FirmamentIntelliDraft.cs
index 3b39f097..16f8d641 100644
--- a/Aetheris.Kernel.Firmament/FirmamentV2/FirmamentIntelliDraft.cs
+++ b/Aetheris.Kernel.Firmament/FirmamentV2/FirmamentIntelliDraft.cs
@@ -42,7 +42,7 @@ public static class FirmamentIntelliDraft
return new(f.Name.Text, source.Substring(f.Value.Span.Start, f.Value.Span.Length), unit is null ? null : value,
unit, unit is not null && FirmamentSketchService.Literal(f.Value));
}
- var elements = declarations.Where(d => d.Syntax.Type.Name.Text is "Model" or "Struct" or "Static" or "Rect2" or "Point2" or "Line2" or "Circle2" or "Path" or "Line" or "Arc" or "Close" or "Profile" or "Extrude")
+ var elements = declarations.Where(d => FirmamentSketchService.EditableShapes.Contains(d.Syntax.Type.Name.Text) || d.Syntax.Type.Name.Text is "Model" or "Struct" or "Static" or "Point2" or "Line2" or "Path" or "Line" or "Arc" or "Close" or "Profile" or "Extrude")
.Select(d => new FirmamentDraftElement(d.Id, d.Syntax.Name?.Text ?? d.Id, d.Syntax.Type.Name.Text, d.ParentId,
new(d.Syntax.Span.Start, d.Syntax.Span.Length), (d.Syntax.Body?.Statements.OfType<FieldSyntax>() ?? [])
.Select(Field).Concat(d.Syntax.Initializer is { } initial ? [new FirmamentDraftField("value", source.Substring(initial.Span.Start, initial.Span.Length),
@@ -54,7 +54,7 @@ public static class FirmamentIntelliDraft
.Select(d => new FirmamentOutlineDiagnostic("error", d.Code, d.Message,
d.SourceSpan is { } s ? new(s.Start, s.Length) : null)));
if (diagnostics.Count > 0) return new(elements, [], [], diagnostics, "Unresolved");
- var duplicate = elements.Where(e => e.Kind is "Rect2" or "Point2" or "Line2" or "Circle2" or "Path")
+ var duplicate = elements.Where(e => FirmamentSketchService.EditableShapes.Contains(e.Kind) || e.Kind is "Point2" or "Line2" or "Path")
.GroupBy(e => e.Name).FirstOrDefault(g => g.Count() > 1);
if (duplicate is not null)
return new(elements, [], [], [new("error", "draft-guide-ambiguous", $"Construction preview requires an unambiguous guide name: '{duplicate.Key}'.", duplicate.First().Span)], "Unresolved");
@@ -63,7 +63,7 @@ public static class FirmamentIntelliDraft
diagnostics.Add(new("error", code.Split(':')[0], $"Construction could not resolve: {code}. Check the named guide or Path step. Location is the enclosing Model; the resolver did not supply a more precise source span.", elements.FirstOrDefault(e => e.Kind == "Model")?.Span));
var curves = bound.Guides.Select(g =>
{
- var owner = elements.FirstOrDefault(e => e.Name == g.Key || g.Key.StartsWith(e.Name + ".", StringComparison.Ordinal) && e.Kind is "Path" or "Rect2");
+ var owner = elements.FirstOrDefault(e => e.Name == g.Key || g.Key.StartsWith(e.Name + ".", StringComparison.Ordinal) && (e.Kind == "Path" || FirmamentSketchService.EditableShapes.Contains(e.Kind)));
var span = owner is null ? "unavailable: expanded construction" : $"{document}:{owner.Span.Start}:{owner.Span.Length}";
return FirmamentSketchService.Curve(new(g.Key, g.Value,
new("construction:" + g.Key, "construction:" + g.Key, span, "ConstructionGuide", "Local2D")));
@@ -108,6 +108,23 @@ public static class FirmamentIntelliDraft
?? throw Refuse("draft-model-required", "IntelliDraft requires one authored Model.");
switch (request.Action)
{
+ case "shape":
+ var shapeOwner = Owner("Struct");
+ var shapeName = Name();
+ if (request.Kind is null || !FirmamentSketchService.EditableShapes.Contains(request.Kind))
+ throw Refuse("draft-shape-unsupported", "Choose Rect2, Circle2, Ellipse2, Slot2 or RoundedRect2.");
+ var centerFields = $"center: [{Mm(request.X)}, {Mm(request.Y)}]";
+ var shapeFields = request.Kind switch
+ {
+ "Rect2" => $"size: [{Positive(request.Width)}mm, {Positive(request.Height)}mm]",
+ "Circle2" => $"radius: {Positive(request.Radius)}mm",
+ "Ellipse2" => $"axisLengths: [{Positive(request.Width)}mm, {Positive(request.Height)}mm]",
+ "Slot2" => $"length: {Positive(request.Width)}mm; width: {Positive(request.Height)}mm; rotation: {Number(request.Turn)}deg",
+ "RoundedRect2" => $"size: [{Positive(request.Width)}mm, {Positive(request.Height)}mm]; radius: {Positive(request.Radius)}mm",
+ _ => throw Refuse("draft-shape-unsupported", "Choose a supported construction shape.")
+ };
+ Insert(shapeOwner.Id, $"{request.Kind} {shapeName} {{ {centerFields}; {shapeFields} }}");
+ break;
case "rectangle":
var rectangleOwner = Owner("Struct");
var rectangleName = Name();
@@ -226,8 +243,8 @@ public static class FirmamentIntelliDraft
{
if (entry.WholeLoop)
{
- if (entries.Count != 1 || !view.Shapes.Any(s => s.Name == entry.Reference && s.Kind == "Rect2"))
- throw Refuse("draft-whole-loop-required", "A complete rectangle outline must be the only entry in this outer trace.");
+ if (entries.Count != 1 || !view.Shapes.Any(s => s.Name == entry.Reference))
+ throw Refuse("draft-whole-loop-required", "A complete shape outline must be the only entry in this outer trace.");
return entry.Reference + " |> TraceLoop";
}
if (!view.Guides.Any(g => g.Name == entry.Reference)) throw Refuse("draft-guide-required", $"Unresolved guide '{entry.Reference}'.");
diff --git a/Aetheris.Kernel.Firmament/FirmamentV2/FirmamentSketch.cs b/Aetheris.Kernel.Firmament/FirmamentV2/FirmamentSketch.cs
index 69f0576d..4023d652 100644
--- a/Aetheris.Kernel.Firmament/FirmamentV2/FirmamentSketch.cs
+++ b/Aetheris.Kernel.Firmament/FirmamentV2/FirmamentSketch.cs
@@ -32,7 +32,7 @@ public sealed record FirmamentSketchEditRequest(string Kind, string? Node = null
/// Profile resolution and structural transactions. A resolved sketch is deliberately not a built solid.</summary>
public static class FirmamentSketchService
{
- private static readonly HashSet<string> EditableShapes = ["Rect2", "Circle2", "Slot2", "RoundedRect2"];
+ internal static readonly IReadOnlySet<string> EditableShapes = new HashSet<string>(StringComparer.Ordinal) { "Rect2", "Circle2", "Ellipse2", "Slot2", "RoundedRect2" };
private static readonly IReadOnlySet<string> DomainResults = new HashSet<string>(StringComparer.Ordinal);
private sealed record Target(string Node, string? Field, ExpressionSyntax Expression, string? Parameter);
@@ -189,6 +189,7 @@ public static class FirmamentSketchService
var fields = request.Shape switch
{
"Circle2" => $"diameter: {Length(request.Width)}", "Slot2" => $"length: {Length(request.Width)} width: {Length(request.Height)}",
+ "Ellipse2" => $"axisLengths: [{Length(request.Width)}, {Length(request.Height)}]",
"RoundedRect2" => $"size: [{Length(request.Width)}, {Length(request.Height)}] radius: {Length(Math.Min(request.Width, request.Height) / 8)}",
_ => $"size: [{Length(request.Width)}, {Length(request.Height)}]"
};
@@ -305,6 +306,8 @@ public static class FirmamentSketchService
private static string FieldLabel(string name, int? axis) => (name.ToLowerInvariant(), axis) switch
{
("size", 0) => "Width", ("size", 1) => "Height", ("center", 0) => "Center X", ("center", 1) => "Center Y",
+ ("axislengths" or "axes", 0) => "Width", ("axislengths" or "axes", 1) => "Height",
+ ("radius", _) => "Radius", ("diameter", _) => "Diameter", ("width", _) => "Width", ("rotation", _) => "Rotation",
("length", _) => "Overall length", _ => name + (axis is null ? "" : " " + axis)
};
private static ExpressionSyntax[] Components(ExpressionSyntax expression) => expression switch
diff --git a/Aetheris.Kernel.Firmament/FirmamentV2/ProfileAuthoringParser.cs b/Aetheris.Kernel.Firmament/FirmamentV2/ProfileAuthoringParser.cs
index 55e04731..2edbf64f 100644
--- a/Aetheris.Kernel.Firmament/FirmamentV2/ProfileAuthoringParser.cs
+++ b/Aetheris.Kernel.Firmament/FirmamentV2/ProfileAuthoringParser.cs
@@ -19,11 +19,26 @@ public static class ProfileAuthoringParser
InspectConstruction(string source, FirmamentCompileTimeValues values)
{
var diagnostics = new List<string>();
- source = ExpandBuiltInPolygons(FirmamentSourceSpelling.Normalize(source), diagnostics, values);
+ source = FirmamentSourceSpelling.Normalize(source);
+ var boundaries = ClosedBoundary2Authoring.Expand(source, diagnostics, values);
+ source = boundaries?.Source ?? source;
var points = new Dictionary<string, (double X, double Y)>(StringComparer.Ordinal);
var guides = new Dictionary<string, LineArcProfileCurve2D>(StringComparer.Ordinal);
AddOrdinaryGuides(source, points, guides, diagnostics, applySpans: false, bind: values.NominalExpression);
BindPaths(source, points, guides, diagnostics);
+ // Use the lowerer's own public member map; do not guess generated-name ownership.
+ if (boundaries is not null)
+ {
+ var generated = boundaries.GeneratedDeclarationNames.ToHashSet(StringComparer.Ordinal);
+ foreach (var (owner, members) in boundaries.AuthoringMembers)
+ foreach (var (member, lowered) in members)
+ {
+ if (generated.Contains(lowered) && points.Remove(lowered, out var point)) points[owner + "." + member] = point;
+ if (lowered != owner && guides.Remove(lowered, out var curve)) guides[owner + "." + member] = curve;
+ if (lowered.LastIndexOf('.') is var dot && dot > 0 && lowered[..dot] != owner)
+ foreach (var key in points.Keys.Where(k => k.StartsWith(lowered[..dot] + ".", StringComparison.Ordinal)).ToArray()) points.Remove(key);
+ }
+ }
return (points, guides, diagnostics);
}
public const string SegmentEndpointMustReferenceNamedPoint = "ProfileSegmentEndpointMustReferenceNamedPoint";
diff --git a/Aetheris.Web.Runtime/sdk/README.md b/Aetheris.Web.Runtime/sdk/README.md
index 46e198a7..80f77f30 100644
--- a/Aetheris.Web.Runtime/sdk/README.md
+++ b/Aetheris.Web.Runtime/sdk/README.md
@@ -252,3 +252,12 @@ Origin-to-Parent translation and one-axis rotation, or a disclosed read-only
reason. General matrices, expressions and named-frame relationships must not be
flattened into editable numbers. Support picking similarly requires an actual
compiler-owned selector; display face identity alone is insufficient.
+
+
+The `construction` edit action `shape` authors a retained `Rect2`, `Circle2`,
+`Ellipse2`, `Slot2` or `RoundedRect2` in a Concept Struct. The normal closed-boundary
+owner validates fields and dimensions. Construction inspection projects public
+member names from that lowerer's own member map and retains authored source
+provenance. A single `wholeLoop` trace entry can consume any projected closed
+shape. Workspace visibility is a client presentation choice; it never rewrites
+source or changes engineering admission.
diff --git a/Aetheris.Web.Runtime/sdk/src/index.d.ts b/Aetheris.Web.Runtime/sdk/src/index.d.ts
index 61060251..cf2f8c6f 100644
--- a/Aetheris.Web.Runtime/sdk/src/index.d.ts
+++ b/Aetheris.Web.Runtime/sdk/src/index.d.ts
@@ -178,6 +178,6 @@ export interface MeasurementResult {
export interface DraftElement { id: string; name: string; kind: string; parent: string | null; span: { start: number; length: number }; fields: readonly { name: string; value: string; number: number | null; unit: string | null; editable: boolean }[] }
export interface DraftTrace { reference: string; from?: string; to?: string; alias?: string; reverse?: boolean; connect?: boolean; wholeLoop?: boolean }
-export interface DraftOperation { action: 'layout' | 'point' | 'line' | 'circle' | 'path' | 'step' | 'trace' | 'extrude' | 'movePoint' | 'dimension' | 'rectangle' | 'parameter'; width?: number; height?: number; reference?: string; insetX?: number; insetY?: number; sharedInset?: boolean; targetProfile?: string; field?: string; value?: number; parent?: string; name?: string; kind?: string; plane?: string; x?: number; y?: number; length?: number; radius?: number; turn?: number; from?: string; to?: string; trace?: readonly DraftTrace[] }
+export interface DraftOperation { action: 'layout' | 'point' | 'line' | 'circle' | 'path' | 'step' | 'trace' | 'extrude' | 'movePoint' | 'dimension' | 'rectangle' | 'shape' | 'parameter'; width?: number; height?: number; reference?: string; insetX?: number; insetY?: number; sharedInset?: boolean; targetProfile?: string; field?: string; value?: number; parent?: string; name?: string; kind?: string; plane?: string; x?: number; y?: number; length?: number; radius?: number; turn?: number; from?: string; to?: string; trace?: readonly DraftTrace[] }
export interface DraftSpan { id: string; owner: string; reference: string; from: string; to: string; curve: SketchCurve }
export interface DraftConstruction { shapes?: readonly SketchShape[]; spans?: readonly DraftSpan[]; frames: readonly { owner: string; frame: NonNullable<SketchProjection['frame']> }[]; elements: readonly DraftElement[]; points: readonly { name: string; x: number; y: number }[]; guides: readonly SketchCurve[]; diagnostics: readonly SketchProjection['diagnostics'][number][]; validationLevel: 'ConstructionResolvedNotTraced' | 'Unresolved' }
diff --git a/docs/development/reports/2026-10/intellidraft-shape-list.md b/docs/development/reports/2026-10/intellidraft-shape-list.md
new file mode 100644
index 00000000..4a6357ae
--- /dev/null
+++ b/docs/development/reports/2026-10/intellidraft-shape-list.md
@@ -0,0 +1,92 @@
+# IntelliDraft: mixed shape lists and visibility
+
+## Changes
+
+- Replaced the two-column shape cards with a searchable, independently scrollable
+ list. Selection follows the canvas/inspector and scrolls its row into view
+ without scrolling the whole sidebar. The list is also available during Trace.
+- Each row has a Show checkbox. Hidden construction is removed from the canvas,
+ picking and alignment targets. Selecting a hidden row does not reveal it;
+ Show all restores visibility. These are local workspace display preferences,
+ not source deletion or conditional engineering suppression. Existing Profiles,
+ source and exports remain unchanged; visibility resets when the workspace closes.
+- Added direct drawing and exact-field creation for Circle2, Ellipse2, Slot2 and
+ RoundedRect2 alongside Rect2. They use the existing closed-boundary compiler
+ owners and dimension-edit transactions. Vertical slots retain their orientation.
+ Whole-outline tracing now accepts each projected closed shape.
+- Promoted the existing lowerer's member map into construction inspection, so
+ generated Curve/Path names project as authored shape members with original
+ source provenance. No second field schema, expression evaluator or parser
+ route was introduced. Existing rectangle expressions and advanced point/Path
+ workflows remain supported.
+- Moved the palette above the list, compacted shorter windows and reduced canvas
+ name labels to the selected shape for large layouts. Full names remain in the
+ list. Runtime failure details now survive the IntelliDraft error presenter.
+
+## Ellipse display gap found through actual use
+
+Ellipse profiles already compiled and exported exact geometry, but the browser
+could not display their LinearExtrusion side surface. The retained draft exposed
+this as a generic internal error. The diagnostic presenter now includes the
+runtime's specific explanation.
+
+The shared BRep display tessellator now handles an elliptic directrix by sampling
+the exact surface through its existing periodic trim and trimmed-surface owners.
+It does not modify the BRep, replace the surface with a spline or display an
+untrimmed substitute. Missing/degenerate trims and empty triangle output reject
+explicitly. Surface normals use the exact tangent crossed with the extrusion
+vector, normalized before the existing canonical face-orientation projection.
+
+A half-ellipse strip test verifies the actual trim, unit normals and unchanged
+STEP bytes. The five shape tests also require a nonempty patch for every BRep
+face. The partial strip must not become a full tube.
+
+## Qualification evidence
+
+- Manual UI dogfood: created a rectangle, circle and slot; selected rows; hid the
+ circle; confirmed it disappeared; restored it with Show all. No Source editing.
+- Browser tests draw each of the five shape types with the mouse, move it, trace
+ its outline, extrude, build and export. A separate case verifies a vertically
+ drawn slot. Exported STEP bounds, topology and analytic families are compared
+ against independently authored fixtures under `fixtures/Regression/IntelliDraft/`.
+- A 16-shape drawing verifies independent list scrolling, filtering, selection,
+ per-row visibility and Show all. Hiding a shape and rebuilding preserves saved
+ source byte-for-byte and matches the same reference STEP geometry.
+- Existing point/line L, arc/chord D, ordered Path, whole rectangle, explicit
+ rectangle dependency and independent-drag workflows remain in the browser lane.
+- Focused compiler/sketch tests: 36 passed. Elliptic extrusion tests: 2 passed.
+ Frontend unit suite: 161 passed. Production AOT SDK install and frontend build
+ succeeded. Final full-solution and production-browser gate results follow below.
+
+The first development-browser run found two failures: the legacy circle-span
+test needed to explicitly open Manual guide trace after closed-circle tracing
+became available, and ellipse display hit the missing surface dispatch described
+above. Geometry assertions were retained; the latter was repaired in the shared
+tessellator rather than hidden by the UI.
+
+## Limits
+
+This is a five-type closed-shape palette, plus existing advanced point/line/circle
+guides and Paths. It does not add arbitrary intersections, freeform trimming or
+a simultaneous constraint solver. Explicit expression-driven centers remain
+protected from literal dragging.
+
+The existing measurement query does not report analytic volume for the generic
+full-circle/ellipse Profile extrusion lane. Exact BRep records and exported
+geometry qualify these cases; no approximate volume is presented as exact.
+
+Logs are under ignored `artifacts/local/intellidraft-shape-list-*` in Aetheris
+and HeliosCAD. Browser source, STEP, comparison JSON and screenshots are under
+`HeliosCAD/artifacts/local/intellidraft/`, including `shape-list-many.png`,
+`shape-list-hidden.png` and each `draw-*-built.png`.
+
+## Final gate
+
+**Success.** Release solution build and production AOT/browser builds succeeded.
+Fast Core lane: 1111 passed. Full serial solution regression: **6054 passed,
+2 existing Drawing Notes skips**, across 20 projects. Frontend unit suite:
+**161 passed**. Final production browser lane: **13 passed**, including the
+selected-row scroll check, all five shape types, vertical slots and unchanged
+source/export behavior after construction visibility toggles. `git diff --check`
+passed in both repositories. Temporary dogfood hosts were stopped; no .NET
+build/test or WebAssembly optimizer processes remained after qualification.
diff --git a/docs/public/firmament/sketcher.md b/docs/public/firmament/sketcher.md
index 9b5b0cd7..047f9a2b 100644
--- a/docs/public/firmament/sketcher.md
+++ b/docs/public/firmament/sketcher.md
@@ -11,6 +11,19 @@ then dimensioned construction shapes. `Rect2` supplies right angles and equal,
parallel opposite sides. Its type and dimensions remain authoritative when
Trace selects material boundary spans from its named edges and corners.
+The sidebar's scrollable, searchable shape list selects retained construction.
+Its checkboxes show or hide construction in the workspace. Hidden shapes are
+excluded from picking and alignment, but their source and any existing traced
+Profile remain intact. **Show all** restores visibility; the visibility choice is
+local to the open workspace and does not suppress engineering geometry.
+
+Draw a circle, ellipse, slot or rounded rectangle with its palette tool, size it
+through the inspector, and drag it into place. **Use whole shape outline** traces
+its closed boundary through the existing compiler owner. Slots use overall
+length including both round ends; a vertically drawn slot retains a 90 degree
+rotation. Rounded rectangles expose their corner radius. Invalid dimensions are
+rejected instead of silently clamped.
+
For an L, draw a rectangle, then enter its exact 60 × 40 mm size and center
(0,0) mm. Draw a second independent rectangle and size it to 52 × 32 mm. Drag it
to align its top and right edges with the first: its center is then (4,4) mm.
@@ -27,7 +40,7 @@ rectangle outline** traces a single full rectangle.
**Shapes** edits exact dimensions. Apply or discard pending fields before
switching tools or building. Draw/drag previews commit on release; Escape
cancels an active gesture. Fit, zoom buttons and middle-drag navigate the canvas.
-The direct drawing tool currently creates rectangles. Alignment uses projected
+The drawing palette creates rectangles, circles, ellipses, slots and rounded rectangles. Alignment uses projected
bounds of shapes in the same Concept Struct. It writes independent placement
values, without persistent constraint metadata.
@@ -165,7 +178,7 @@ explicitly rejected while those support adapters still assume world XY.
## Current boundary
-The **Sketch** dimension workspace edits authored Rect2, Circle2, Slot2 and RoundedRect2 fields
+The **Sketch** dimension workspace edits authored Rect2, Circle2, Ellipse2, Slot2 and RoundedRect2 fields
and displays the resolved line/arc/ellipse/cubic curves of other Profiles.
Generated Template/Feature bodies do not become writable source through their
expanded geometry. Profiles must have an unambiguous authored name in the
diff --git a/fixtures/Regression/IntelliDraft/draw-circle2.firmament b/fixtures/Regression/IntelliDraft/draw-circle2.firmament
new file mode 100644
index 00000000..c20db2ff
--- /dev/null
+++ b/fixtures/Regression/IntelliDraft/draw-circle2.firmament
@@ -0,0 +1,8 @@
+Model DrawnShape {
+ units: mm
+ Concept Struct layout on XY {
+ Circle2 outline { center: [5mm, 0mm]; radius: 10mm }
+ }
+ Profile section using layout { Loop Outer { outline |> TraceLoop } }
+ Extrude body { profile: section; from: 0mm; to: 6mm }
+}
diff --git a/fixtures/Regression/IntelliDraft/draw-ellipse2.firmament b/fixtures/Regression/IntelliDraft/draw-ellipse2.firmament
new file mode 100644
index 00000000..422972d1
--- /dev/null
+++ b/fixtures/Regression/IntelliDraft/draw-ellipse2.firmament
@@ -0,0 +1,8 @@
+Model DrawnShape {
+ units: mm
+ Concept Struct layout on XY {
+ Ellipse2 outline { center: [5mm, 0mm]; axisLengths: [40mm, 20mm] }
+ }
+ Profile section using layout { Loop Outer { outline |> TraceLoop } }
+ Extrude body { profile: section; from: 0mm; to: 6mm }
+}
diff --git a/fixtures/Regression/IntelliDraft/draw-rect2.firmament b/fixtures/Regression/IntelliDraft/draw-rect2.firmament
new file mode 100644
index 00000000..abbc8dbf
--- /dev/null
+++ b/fixtures/Regression/IntelliDraft/draw-rect2.firmament
@@ -0,0 +1,8 @@
+Model DrawnShape {
+ units: mm
+ Concept Struct layout on XY {
+ Rect2 outline { center: [5mm, 0mm]; size: [40mm, 20mm] }
+ }
+ Profile section using layout { Loop Outer { outline |> TraceLoop } }
+ Extrude body { profile: section; from: 0mm; to: 6mm }
+}
diff --git a/fixtures/Regression/IntelliDraft/draw-roundedrect2.firmament b/fixtures/Regression/IntelliDraft/draw-roundedrect2.firmament
new file mode 100644
index 00000000..f415adf3
--- /dev/null
+++ b/fixtures/Regression/IntelliDraft/draw-roundedrect2.firmament
@@ -0,0 +1,8 @@
+Model DrawnShape {
+ units: mm
+ Concept Struct layout on XY {
+ RoundedRect2 outline { center: [5mm, 0mm]; size: [40mm, 20mm]; radius: 2mm }
+ }
+ Profile section using layout { Loop Outer { outline |> TraceLoop } }
+ Extrude body { profile: section; from: 0mm; to: 6mm }
+}
diff --git a/fixtures/Regression/IntelliDraft/draw-slot2-vertical.firmament b/fixtures/Regression/IntelliDraft/draw-slot2-vertical.firmament
new file mode 100644
index 00000000..b7ac367b
--- /dev/null
+++ b/fixtures/Regression/IntelliDraft/draw-slot2-vertical.firmament
@@ -0,0 +1,8 @@
+Model VerticalSlot {
+ units: mm
+ Concept Struct layout on XY {
+ Slot2 outline { center: [5mm, 0mm]; length: 40mm; width: 20mm; rotation: 90deg }
+ }
+ Profile section using layout { Loop Outer { outline |> TraceLoop } }
+ Extrude body { profile: section; from: 0mm; to: 6mm }
+}
diff --git a/fixtures/Regression/IntelliDraft/draw-slot2.firmament b/fixtures/Regression/IntelliDraft/draw-slot2.firmament
new file mode 100644
index 00000000..368dc05d
--- /dev/null
+++ b/fixtures/Regression/IntelliDraft/draw-slot2.firmament
@@ -0,0 +1,8 @@
+Model DrawnShape {
+ units: mm
+ Concept Struct layout on XY {
+ Slot2 outline { center: [5mm, 0mm]; length: 40mm; width: 20mm }
+ }
+ Profile section using layout { Loop Outer { outline |> TraceLoop } }
+ Extrude body { profile: section; from: 0mm; to: 6mm }
+}