Skip to content

Next Gen STEP AP242 Native-ish BREP Geometric Modeling Kernel

Add semantic edge finishes and strengthen topology mapping

Yuechen Li744e111d4a34
diff --git a/Aetheris.Firmament.SchemaGenerator/SemanticSchemaGenerator.cs b/Aetheris.Firmament.SchemaGenerator/SemanticSchemaGenerator.cs
index c5e5d38d..5300607a 100644
--- a/Aetheris.Firmament.SchemaGenerator/SemanticSchemaGenerator.cs
+++ b/Aetheris.Firmament.SchemaGenerator/SemanticSchemaGenerator.cs
@@ -53,7 +53,8 @@ public sealed class SemanticSchemaGenerator : IIncrementalGenerator
var variantConstant = Named(attribute, "Variants");
var variants = variantConstant.Kind == TypedConstantKind.Array ? variantConstant.Values.Select(v => v.Value?.ToString() ?? "").ToArray() : Array.Empty<string>();
if (!ValidId(fieldId) || !ValidId(fieldName) || !fieldIds.Add(fieldId) || !fieldNames.Add(fieldName) || !Kinds.Contains(kind)
- || kind == "Choice" && choices.Length == 0 || kind != "Choice" && choices.Length != 0
+ || kind == "Choice" && choices.Length == 0 || kind is not ("Choice" or "FaceSelector" or "String") && choices.Length != 0
+ || choices.Any(string.IsNullOrWhiteSpace) || choices.Distinct(StringComparer.Ordinal).Count() != choices.Length
|| variants.Any(v => !ValidId(v)) || variants.Distinct(StringComparer.Ordinal).Count() != variants.Length
|| unit is not ("None" or "Length" or "Angle")
|| kind == "Length" && unit != "Length" || kind == "Angle" && unit != "Angle"
diff --git a/Aetheris.Kernel.Firmament.Tests/FirmamentGraphAuthoringTests.cs b/Aetheris.Kernel.Firmament.Tests/FirmamentGraphAuthoringTests.cs
index 83b7f3c7..6b3140bb 100644
--- a/Aetheris.Kernel.Firmament.Tests/FirmamentGraphAuthoringTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/FirmamentGraphAuthoringTests.cs
@@ -107,6 +107,20 @@ public sealed class FirmamentGraphAuthoringTests
Assert.Contains("size: [80mm, 60mm]", result.Text);
Assert.Contains("to: 8mm", result.Text);
Builds(result.Text);
+ var built = FirmamentBuildAndExport.CompileSource(result.Text).Value;
+ var correspondence = built.RuntimeCorrespondence!;
+ var map = new GeometrySourceMap(correspondence);
+ var walls = correspondence.Descendants.Where(d => d.Face.HasValue && !d.IsTopologyAlias && d.GeometryPreview == "Pocket").ToArray();
+ Assert.NotEmpty(walls);
+ foreach (var wall in walls)
+ {
+ Assert.True(map.TryGetByBrepFace(wall.Face!.Value, out var picked));
+ Assert.Equal(wall, picked);
+ var origin = Assert.Single(correspondence.Descendants, d => d.IsTopologyAlias && d.Face == wall.Face);
+ Assert.StartsWith("profile:", origin.SourceStableId);
+ Assert.Contains(origin, map.GetEntitiesForSemanticKey(origin.StableId));
+ Assert.Throws<InvalidOperationException>(() => new GeometrySourceMap(correspondence with { Descendants = correspondence.Descendants.Where(d => d != wall).ToArray() }));
+ }
}
[Fact]
diff --git a/Aetheris.Kernel.Firmament.Tests/FirmamentSemanticSchemaTests.cs b/Aetheris.Kernel.Firmament.Tests/FirmamentSemanticSchemaTests.cs
index 04a287bb..c0e5e9c6 100644
--- a/Aetheris.Kernel.Firmament.Tests/FirmamentSemanticSchemaTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/FirmamentSemanticSchemaTests.cs
@@ -11,7 +11,7 @@ public sealed class FirmamentSemanticSchemaTests
string[] expectedNames =
[
"Appearance", "FrameTransform", "Placement", "Pmi", "Note", "Provenance",
- "Box", "Concept", "Points", "Door", "Drape", "Ellipsoid", "Fabric", "FigureFit", "Fitting", "Garment",
+ "Box", "Concept", "Points", "Door", "Drape", "EdgeFinish", "Ellipsoid", "Fabric", "FigureFit", "Fitting", "Garment",
"Helix", "Hole", "Interface<Fixed>", "Interface<Prismatic>", "Interface<Revolute>",
"Interface<Stitch>", "Inventory", "Joint", "Loft", "Panel", "Perforation", "Material", "Linear", "Series", "Polyhedron", "Pose", "PoseTransition",
"Room", "Scene", "Camera", "Section", "Thread", "Window", "Follow", "WireRoute",
@@ -44,6 +44,29 @@ public sealed class FirmamentSemanticSchemaTests
Assert.Equal(loft.Fields.Select(f => f.Name), LoftOrHelixCompletion("Model M { Loft Body {\n ", "Loft").Fields.Select(f => f.Name));
}
+ [Fact]
+ public void GraphAuthoringPresetsComeFromSchemaAndBuildOnTheirDocumentedHost()
+ {
+ var hole = FirmamentSemanticSchemas.Get("Hole")!;
+ foreach (var on in hole.Fields.Single(f => f.Name == "On").Choices)
+ foreach (var end in hole.Fields.Single(f => f.Name == "End").Choices)
+ {
+ var source = $"Model Preset {{ units: mm Box Body {{ size: [40mm, 30mm, 20mm] }} Modify Body {{ Hole<Shaft> H {{ on: {on} center: Point2(0mm, 0mm) diameter: 6mm end: {end} }} }} }}";
+ var build = FirmamentBuildAndExport.CompileSource(source);
+ Assert.True(build.IsSuccess, $"{on}/{end}: {string.Join(';', build.Diagnostics.Select(d => d.Message))}");
+ }
+ var finish = FirmamentSemanticSchemas.Get("EdgeFinish")!;
+ var completionSource = "Model M { Box B { size: [40mm,30mm,10mm] } Modify B { EdgeFinish F { ";
+ var completion = FirmamentLanguageService.Complete(completionSource, "graph.firmament", "1", completionSource.Length);
+ Assert.Equal("EdgeFinish", completion.Context);
+ Assert.Equal(finish.Fields.Select(f => f.Name), completion.Fields.Select(f => f.Name));
+ foreach (var kind in new[] { "Chamfer", "Fillet" })
+ {
+ var source = $"Model Preset {{ units: mm Box Body {{ size: [40mm, 30mm, 10mm] }} Modify Body {{ EdgeFinish F {{ face: +Z target: Boundary kind: {kind} {(kind == "Chamfer" ? "distance" : "radius")}: 1mm }} }} }}";
+ Assert.True(FirmamentBuildAndExport.CompileSource(source).IsSuccess);
+ }
+ }
+
[Fact]
public void ConceptAndBox_KeepTheirSemanticBoundaries()
{
diff --git a/Aetheris.Kernel.Firmament/FirmamentV2/FirmamentLanguageService.cs b/Aetheris.Kernel.Firmament/FirmamentV2/FirmamentLanguageService.cs
index cf95ea62..cbce69dc 100644
--- a/Aetheris.Kernel.Firmament/FirmamentV2/FirmamentLanguageService.cs
+++ b/Aetheris.Kernel.Firmament/FirmamentV2/FirmamentLanguageService.cs
@@ -150,7 +150,7 @@ public static class FirmamentLanguageService
{
// Ignore comments/strings and balance nested blocks in incomplete drafts.
var prefix = Regex.Replace(source[..offset], @"//[^\r\n]*|/\*[\s\S]*?\*/|""(?:\\.|[^""\\])*""", m => new string(' ', m.Length));
- var names = "Scene|Room|Door|Window|Camera|WireRoute|Follow|Section|Points|Linear|Series|Appearance|Material|Placement|FrameTransform|Garment|Panel|Fabric|Drape|FigureFit|Fitting|PoseTransition|Pose|Joint|Interface|Hole";
+ var names = "Scene|Room|Door|Window|Camera|WireRoute|Follow|Section|Points|Linear|Series|Appearance|Material|Placement|FrameTransform|Garment|Panel|Fabric|Drape|FigureFit|Fitting|PoseTransition|Pose|Joint|Interface|Hole|EdgeFinish";
var matches = Regex.Matches(prefix, $@"\b(?<kind>{names})(?:\s*<(?<family>[^>]+)>)?(?:\s+[A-Za-z_]\w*)?\s*\{{");
var syntax = FirmamentSyntaxParser.Parse(source);
var declarations = FirmamentSyntaxTraversal.Declarations(syntax.Document).ToArray();
diff --git a/Aetheris.Kernel.Firmament/FirmamentV2/SemanticConstructDeclarations.cs b/Aetheris.Kernel.Firmament/FirmamentV2/SemanticConstructDeclarations.cs
index 596d4e38..977c60ab 100644
--- a/Aetheris.Kernel.Firmament/FirmamentV2/SemanticConstructDeclarations.cs
+++ b/Aetheris.Kernel.Firmament/FirmamentV2/SemanticConstructDeclarations.cs
@@ -15,10 +15,10 @@ public static class EllipsoidSemanticDeclaration { }
public static class PolyhedronSemanticDeclaration { }
[FirmamentConstruct("Hole", "Hole", Context = "Modify body", Entry = "Modify Body { Hole<Shaft> H { On: +Z; Center: Point2(0mm, 0mm); Diameter: 6mm; End: ThroughAll } }", Description = "Semantic drilled hole.")]
-[FirmamentField("On", "On", FirmamentSchemaValueKind.FaceSelector, Required = true, Description = "Entry face of the hole.")]
+[FirmamentField("On", "On", FirmamentSchemaValueKind.FaceSelector, Required = true, Choices = ["+Z", "-Z"], Description = "Entry face. Top/+Z and bottom/-Z are admitted on profile-stack stock. Other selectors require their specific supported body lane. Center X/Y are coordinates in this face's local frame, not screen coordinates.")]
[FirmamentField("Center", "Center", FirmamentSchemaValueKind.Point, Required = true, Description = "Center in the support face.")]
[FirmamentField("Diameter", "Diameter", FirmamentSchemaValueKind.Length, Required = true, Description = "Shaft diameter.", SourceEditable = true, ProjectionMember = nameof(ProjectDiameter))]
-[FirmamentField("End", "End", FirmamentSchemaValueKind.String, Required = true, Description = "ThroughAll or a blind termination expression.")]
+[FirmamentField("End", "End", FirmamentSchemaValueKind.String, Required = true, Choices = ["ThroughAll", "Blind(5mm)"], Description = "ThroughAll cuts through the body. Blind(5mm) cuts to a finite depth; edit the expression for another depth.")]
[FirmamentField("CounterboreDiameter", "CounterboreDiameter", FirmamentSchemaValueKind.Length, Unit = FirmamentUnitKind.Length, Variants = ["Counterbore"], Description = "Relief diameter for Hole<Counterbore>; larger than the shaft diameter.")]
[FirmamentField("CounterboreDepth", "CounterboreDepth", FirmamentSchemaValueKind.Length, Unit = FirmamentUnitKind.Length, Variants = ["Counterbore"], Description = "Positive relief depth for Hole<Counterbore>.")]
[FirmamentField("CountersinkDiameter", "CountersinkDiameter", FirmamentSchemaValueKind.Length, Unit = FirmamentUnitKind.Length, Variants = ["Countersink"], Description = "Entry diameter for Hole<Countersink>; larger than the shaft diameter.")]
@@ -30,6 +30,14 @@ public static class HoleSemanticDeclaration
public static double ProjectDiameter(FirmamentV2SemanticHoleDecl instance) => instance.ShaftDiameter;
}
+[FirmamentConstruct("EdgeFinish", "EdgeFinish", Context = "Modify body", Entry = "EdgeFinish TopChamfer { Face: +Z; Target: Boundary; Kind: Chamfer; Distance: 1mm }", Description = "An exact fillet or chamfer on an admitted boundary. Preview checks host, selector and feature combinations.")]
+[FirmamentField("Face", "Face", FirmamentSchemaValueKind.FaceSelector, Choices = ["+Z", "-Z", "+X", "-X", "+Y", "-Y"], Description = "Support face whose boundary is finished. Supported faces depend on the body and existing features.")]
+[FirmamentField("Target", "Target", FirmamentSchemaValueKind.Choice, Required = true, Choices = ["Boundary", "AllEdges"], Description = "Boundary finishes the selected face perimeter. AllEdges is a uniform fillet on supported Box or Polyhedron stock only; omit Face for AllEdges.")]
+[FirmamentField("Kind", "Kind", FirmamentSchemaValueKind.Choice, Choices = ["Chamfer", "Fillet"], Description = "Chamfer makes a bevel; Fillet makes a circular round. May also be specified by EdgeFinish<Chamfer> or EdgeFinish<Fillet>.")]
+[FirmamentField("Distance", "Distance", FirmamentSchemaValueKind.Length, Unit = FirmamentUnitKind.Length, Description = "Chamfer distance. Supply Distance or Radius, not both.")]
+[FirmamentField("Radius", "Radius", FirmamentSchemaValueKind.Length, Unit = FirmamentUnitKind.Length, Description = "Fillet radius. Supply Radius or Distance, not both.")]
+public static class EdgeFinishSemanticDeclaration { }
+
[FirmamentConstruct("Perforation", "Perforation", Context = "Modify body", Entry = "Modify Body { Perforation Vent { On: +Z; Diameter: 6mm; Layout: Hex; Pitch: 9mm; Margin: 8mm } }", Description = "One semantic field of circular through openings on a planar Box or cylindrical Hollow body.")]
[FirmamentField("On", "On", FirmamentSchemaValueKind.FaceSelector, Required = true, Description = "Semantic support face: +Z on Box or OuterWall on Cylinder<Hollow>.")]
[FirmamentField("Diameter", "Diameter", FirmamentSchemaValueKind.Length, Required = true, Description = "Circular opening diameter.")]
diff --git a/Aetheris.Kernel.Firmament/FirmamentV2/SemanticSchema.cs b/Aetheris.Kernel.Firmament/FirmamentV2/SemanticSchema.cs
index 6de60412..5db1e3b9 100644
--- a/Aetheris.Kernel.Firmament/FirmamentV2/SemanticSchema.cs
+++ b/Aetheris.Kernel.Firmament/FirmamentV2/SemanticSchema.cs
@@ -25,6 +25,8 @@ public sealed class FirmamentFieldAttribute(string stableId, string name, Firmam
public bool Required { get; init; }
public string? Default { get; init; }
public string? Description { get; init; }
+ /// <summary>Vocabulary choices, or authored presets for String/FaceSelector fields.
+ /// Presets do not restrict expression binding or guarantee host capability admission.</summary>
public string[]? Choices { get; init; }
public string[]? Variants { get; init; }
public bool SourceEditable { get; init; }
diff --git a/Aetheris.Kernel.Firmament/Materializer/GeometrySourceMap.cs b/Aetheris.Kernel.Firmament/Materializer/GeometrySourceMap.cs
index b02a6937..45071669 100644
--- a/Aetheris.Kernel.Firmament/Materializer/GeometrySourceMap.cs
+++ b/Aetheris.Kernel.Firmament/Materializer/GeometrySourceMap.cs
@@ -17,11 +17,15 @@ public sealed class GeometrySourceMap
ArgumentNullException.ThrowIfNull(correspondence);
foreach (var descendant in correspondence.Descendants)
{
+ if (descendant.IsTopologyAlias) continue;
if (descendant.Face is { } face && !_faces.TryAdd(face, descendant))
throw new InvalidOperationException($"Duplicate construction correspondence for BRep face {face.Value}.");
if (descendant.Edge is { } edge && !_edges.TryAdd(edge, descendant))
throw new InvalidOperationException($"Duplicate construction correspondence for BRep edge {edge.Value}.");
}
+ foreach (var alias in correspondence.Descendants.Where(d => d.IsTopologyAlias))
+ if (alias.Face is { } face && !_faces.ContainsKey(face) || alias.Edge is { } edge && !_edges.ContainsKey(edge))
+ throw new InvalidOperationException($"Construction alias '{alias.StableId}' has no primary topology owner.");
var semanticGroups = correspondence.Descendants.GroupBy(item => item.StableId, StringComparer.Ordinal).ToArray();
foreach (var group in semanticGroups)
if (group.Select(item => (item.Role, item.SourceStableId, item.ParentStableId)).Distinct().Skip(1).Any())
diff --git a/Aetheris.Kernel.Firmament/Materializer/PrismaticSectionStackCompiler.cs b/Aetheris.Kernel.Firmament/Materializer/PrismaticSectionStackCompiler.cs
index 858a069d..7cb4dfd6 100644
--- a/Aetheris.Kernel.Firmament/Materializer/PrismaticSectionStackCompiler.cs
+++ b/Aetheris.Kernel.Firmament/Materializer/PrismaticSectionStackCompiler.cs
@@ -327,6 +327,20 @@ public static class PrismaticSectionStackEmitter
return new(null, d.Distinct().ToArray());
}
var descendants = new List<SemanticTopologyDescendant>();
+ void AddFeatureDescendant(SemanticTopologyDescendant descendant)
+ {
+ // Keep the exact profile/construction evidence as an alias. A pocket,
+ // hole or slot is the primary authored owner of its materialized wall.
+ // Distinct feature owners still conflict; never choose one by list order.
+ for (var index = 0; index < descendants.Count; index++)
+ {
+ var origin = descendants[index];
+ if (origin.StableId.StartsWith($"plan:{stack.Feature.Name}:", StringComparison.Ordinal)
+ && (descendant.Face is { } face && origin.Face == face || descendant.Edge is { } edge && origin.Edge == edge))
+ descendants[index] = origin with { IsTopologyAlias = true };
+ }
+ descendants.Add(descendant);
+ }
var topLevels = stack.Feature.Operations.GroupBy(x => x.ProfileReference, StringComparer.Ordinal).ToDictionary(x => x.Key, x => x.Max(y => y.To), StringComparer.Ordinal);
var bottomLevels = stack.Feature.Operations.GroupBy(x => x.ProfileReference, StringComparer.Ordinal).ToDictionary(x => x.Key, x => x.Min(y => y.From), StringComparer.Ordinal);
for (var i = 0; i < sideFaces.Count; i++)
@@ -358,7 +372,7 @@ public static class PrismaticSectionStackEmitter
var prefix = $"profile:{feature.ProfileReference}.Outer.";
foreach (var item in sideFaces.Select((side, index) => (Side: side, Face: faces[capFaces.Count + index]))
.Where(item => item.Side.Source.StartsWith(prefix, StringComparison.Ordinal)))
- descendants.Add(new($"material:{feature.StableId}:wall:{item.Face.Value}", "Face", SemanticTopologyRole.ExtrusionSideFace, feature.StableId, Face: item.Face, ParentStableId: feature.StableId, GeometryPreview: feature.Kind));
+ AddFeatureDescendant(new($"material:{feature.StableId}:wall:{item.Face.Value}", "Face", SemanticTopologyRole.ExtrusionSideFace, feature.StableId, Face: item.Face, ParentStableId: feature.StableId, GeometryPreview: feature.Kind));
}
foreach (var hole in (stack.Feature.ShaftHoles ?? []).Concat(countersinks.Select(h => new PrismaticShaftHoleFeature(
h.Name, h.StableId, h.ShaftProfileReference, h.CenterX, h.CenterY, h.Diameter, h.From, h.To, h.SemanticRole, h.SourceSpan))))
@@ -380,12 +394,12 @@ public static class PrismaticSectionStackEmitter
var exitZ = horizontalEdges.Min(x => x.Z);
var entryEdges = horizontalEdges.Where(x => Math.Abs(x.Z - entryZ) <= Tol).Select(x => x.Edge).Distinct().OrderBy(x => x.Value).ToArray();
var exitEdges = horizontalEdges.Where(x => Math.Abs(x.Z - exitZ) <= Tol).Select(x => x.Edge).Distinct().OrderBy(x => x.Value).ToArray();
- foreach (var edge in entryEdges) descendants.Add(new($"material:{hole.StableId}:entry-edge:{edge.Value}", "Edge", SemanticTopologyRole.TopBoundary, hole.StableId, Edge: edge, ParentStableId: hole.StableId, GeometryPreview: $"diameter={hole.Diameter:R}"));
- foreach (var edge in exitEdges) descendants.Add(new($"material:{hole.StableId}:exit-edge:{edge.Value}", "Edge", SemanticTopologyRole.BottomBoundary, hole.StableId, Edge: edge, ParentStableId: hole.StableId, GeometryPreview: $"diameter={hole.Diameter:R}"));
+ foreach (var edge in entryEdges) AddFeatureDescendant(new($"material:{hole.StableId}:entry-edge:{edge.Value}", "Edge", SemanticTopologyRole.TopBoundary, hole.StableId, Edge: edge, ParentStableId: hole.StableId, GeometryPreview: $"diameter={hole.Diameter:R}"));
+ foreach (var edge in exitEdges) AddFeatureDescendant(new($"material:{hole.StableId}:exit-edge:{edge.Value}", "Edge", SemanticTopologyRole.BottomBoundary, hole.StableId, Edge: edge, ParentStableId: hole.StableId, GeometryPreview: $"diameter={hole.Diameter:R}"));
foreach (var side in holeSides)
{
var cone = side.Side.Surface.Kind == SurfaceGeometryKind.Cone;
- descendants.Add(new($"material:{hole.StableId}:wall:{side.Face.Value}", "Face", cone ? SemanticTopologyRole.HoleCountersinkWallFace : SemanticTopologyRole.HoleWallFace,
+ AddFeatureDescendant(new($"material:{hole.StableId}:wall:{side.Face.Value}", "Face", cone ? SemanticTopologyRole.HoleCountersinkWallFace : SemanticTopologyRole.HoleWallFace,
hole.StableId, Face: side.Face, ParentStableId: hole.StableId, GeometryPreview: cone ? "conical-entry" : $"diameter={hole.Diameter:R}"));
}
LoopId? LoopFor(IReadOnlyList<EdgeId> boundary)
@@ -394,8 +408,8 @@ public static class PrismaticSectionStackEmitter
return builder.Model.Loops.Select(loop => (loop.Id, Edges: loop.CoedgeIds.Select(id => builder.Model.Coedges.Single(x => x.Id == id).EdgeId).ToHashSet()))
.Where(x => x.Edges.SetEquals(expected)).Select(x => (LoopId?)x.Id).SingleOrDefault();
}
- if (entryEdges.Length > 0 && LoopFor(entryEdges) is { } entryLoop) descendants.Add(new($"material:{hole.StableId}:entry-loop", "Loop", SemanticTopologyRole.HoleEntryLoop, hole.StableId, Loop: entryLoop, ParentStableId: hole.StableId, GeometryPreview: $"diameter={hole.Diameter:R}"));
- if (exitEdges.Length > 0 && LoopFor(exitEdges) is { } exitLoop) descendants.Add(new($"material:{hole.StableId}:exit-loop", "Loop", SemanticTopologyRole.HoleExitLoop, hole.StableId, Loop: exitLoop, ParentStableId: hole.StableId, GeometryPreview: $"diameter={hole.Diameter:R}"));
+ if (entryEdges.Length > 0 && LoopFor(entryEdges) is { } entryLoop) AddFeatureDescendant(new($"material:{hole.StableId}:entry-loop", "Loop", SemanticTopologyRole.HoleEntryLoop, hole.StableId, Loop: entryLoop, ParentStableId: hole.StableId, GeometryPreview: $"diameter={hole.Diameter:R}"));
+ if (exitEdges.Length > 0 && LoopFor(exitEdges) is { } exitLoop) AddFeatureDescendant(new($"material:{hole.StableId}:exit-loop", "Loop", SemanticTopologyRole.HoleExitLoop, hole.StableId, Loop: exitLoop, ParentStableId: hole.StableId, GeometryPreview: $"diameter={hole.Diameter:R}"));
}
foreach (var hole in stack.Feature.CounterboreHoles ?? [])
{
@@ -423,11 +437,11 @@ public static class PrismaticSectionStackEmitter
var exitEdges = shaftEdges.Where(item => Math.Abs(item.Z - exitZ) <= Tol).Select(item => item.Edge).Distinct().OrderBy(id => id.Value).ToArray();
LoopId? LoopFor(IReadOnlyList<EdgeId> boundary) => builder.Model.Loops.Select(loop => (loop.Id, Edges: loop.CoedgeIds.Select(id => builder.Model.Coedges.Single(x => x.Id == id).EdgeId).ToHashSet()))
.Where(item => item.Edges.SetEquals(boundary.ToHashSet())).Select(item => (LoopId?)item.Id).SingleOrDefault();
- foreach (var face in boreSides.Select(item => item.Face).Distinct().OrderBy(id => id.Value)) descendants.Add(new($"material:{hole.StableId}:counterbore-wall:{face.Value}", "Face", SemanticTopologyRole.HoleCounterboreWallFace, hole.StableId, Face: face, ParentStableId: hole.StableId, GeometryPreview: $"diameter={hole.CounterboreDiameter:R}"));
- foreach (var face in shaftSides.Select(item => item.Face).Distinct().OrderBy(id => id.Value)) descendants.Add(new($"material:{hole.StableId}:shaft-wall:{face.Value}", "Face", SemanticTopologyRole.HoleCounterboreShaftWallFace, hole.StableId, Face: face, ParentStableId: hole.StableId, GeometryPreview: $"diameter={hole.Diameter:R}"));
- if (mouthEdges.Length > 0 && LoopFor(mouthEdges) is { } mouthLoop) descendants.Add(new($"material:{hole.StableId}:mouth", "Loop", SemanticTopologyRole.HoleCounterboreMouthLoop, hole.StableId, Loop: mouthLoop, ParentStableId: hole.StableId));
- if (shoulderEdges.Length > 0 && LoopFor(shoulderEdges) is { } shoulderLoop) descendants.Add(new($"material:{hole.StableId}:shoulder", "Loop", SemanticTopologyRole.HoleCounterboreShoulderLoop, hole.StableId, Loop: shoulderLoop, ParentStableId: hole.StableId));
- if (exitEdges.Length > 0 && LoopFor(exitEdges) is { } exitLoop) descendants.Add(new($"material:{hole.StableId}:exit", "Loop", SemanticTopologyRole.HoleExitLoop, hole.StableId, Loop: exitLoop, ParentStableId: hole.StableId));
+ foreach (var face in boreSides.Select(item => item.Face).Distinct().OrderBy(id => id.Value)) AddFeatureDescendant(new($"material:{hole.StableId}:counterbore-wall:{face.Value}", "Face", SemanticTopologyRole.HoleCounterboreWallFace, hole.StableId, Face: face, ParentStableId: hole.StableId, GeometryPreview: $"diameter={hole.CounterboreDiameter:R}"));
+ foreach (var face in shaftSides.Select(item => item.Face).Distinct().OrderBy(id => id.Value)) AddFeatureDescendant(new($"material:{hole.StableId}:shaft-wall:{face.Value}", "Face", SemanticTopologyRole.HoleCounterboreShaftWallFace, hole.StableId, Face: face, ParentStableId: hole.StableId, GeometryPreview: $"diameter={hole.Diameter:R}"));
+ if (mouthEdges.Length > 0 && LoopFor(mouthEdges) is { } mouthLoop) AddFeatureDescendant(new($"material:{hole.StableId}:mouth", "Loop", SemanticTopologyRole.HoleCounterboreMouthLoop, hole.StableId, Loop: mouthLoop, ParentStableId: hole.StableId));
+ if (shoulderEdges.Length > 0 && LoopFor(shoulderEdges) is { } shoulderLoop) AddFeatureDescendant(new($"material:{hole.StableId}:shoulder", "Loop", SemanticTopologyRole.HoleCounterboreShoulderLoop, hole.StableId, Loop: shoulderLoop, ParentStableId: hole.StableId));
+ if (exitEdges.Length > 0 && LoopFor(exitEdges) is { } exitLoop) AddFeatureDescendant(new($"material:{hole.StableId}:exit", "Loop", SemanticTopologyRole.HoleExitLoop, hole.StableId, Loop: exitLoop, ParentStableId: hole.StableId));
}
foreach (var slot in stack.Feature.AllSlotProfiles)
{
@@ -443,17 +457,17 @@ public static class PrismaticSectionStackEmitter
var entryZ=horizontalEdges.Max(x=>x.Z); var exitZ=horizontalEdges.Min(x=>x.Z);
var entryEdges=horizontalEdges.Where(x=>Math.Abs(x.Z-entryZ)<=Tol).Select(x=>x.Edge).Distinct().OrderBy(x=>x.Value).ToArray();
var exitEdges=horizontalEdges.Where(x=>Math.Abs(x.Z-exitZ)<=Tol).Select(x=>x.Edge).Distinct().OrderBy(x=>x.Value).ToArray();
- foreach(var edge in entryEdges) descendants.Add(new($"material:{slot.StableId}:entry-edge:{edge.Value}","Edge",SemanticTopologyRole.TopBoundary,slot.StableId,Edge:edge,ParentStableId:slot.StableId,GeometryPreview:"capsule-entry"));
- foreach(var edge in exitEdges) descendants.Add(new($"material:{slot.StableId}:exit-edge:{edge.Value}","Edge",SemanticTopologyRole.BottomBoundary,slot.StableId,Edge:edge,ParentStableId:slot.StableId,GeometryPreview:"capsule-exit"));
+ foreach(var edge in entryEdges) AddFeatureDescendant(new($"material:{slot.StableId}:entry-edge:{edge.Value}","Edge",SemanticTopologyRole.TopBoundary,slot.StableId,Edge:edge,ParentStableId:slot.StableId,GeometryPreview:"capsule-entry"));
+ foreach(var edge in exitEdges) AddFeatureDescendant(new($"material:{slot.StableId}:exit-edge:{edge.Value}","Edge",SemanticTopologyRole.BottomBoundary,slot.StableId,Edge:edge,ParentStableId:slot.StableId,GeometryPreview:"capsule-exit"));
foreach(var side in slotSides)
{
var role = side.Side.Source.EndsWith(".PositiveSide",StringComparison.Ordinal) || side.Side.Source.EndsWith(".NegativeSide",StringComparison.Ordinal) || side.Side.Source.EndsWith(".StartSide",StringComparison.Ordinal) || side.Side.Source.EndsWith(".EndSide",StringComparison.Ordinal) ? SemanticTopologyRole.SlotStraightWallFace : SemanticTopologyRole.SlotEndWallFace;
- descendants.Add(new($"material:{slot.StableId}:wall:{side.Face.Value}","Face",SemanticTopologyRole.SlotWallFace,slot.StableId,Face:side.Face,ParentStableId:slot.StableId));
- descendants.Add(new($"material:{slot.StableId}:{role}:{side.Face.Value}","Face",role,slot.StableId,Face:side.Face,ParentStableId:slot.StableId));
+ AddFeatureDescendant(new($"material:{slot.StableId}:wall:{side.Face.Value}","Face",SemanticTopologyRole.SlotWallFace,slot.StableId,Face:side.Face,ParentStableId:slot.StableId,IsTopologyAlias:true));
+ AddFeatureDescendant(new($"material:{slot.StableId}:{role}:{side.Face.Value}","Face",role,slot.StableId,Face:side.Face,ParentStableId:slot.StableId));
}
LoopId? LoopFor(IReadOnlyList<EdgeId> boundary) => builder.Model.Loops.Select(loop => (loop.Id, Edges: loop.CoedgeIds.Select(id => builder.Model.Coedges.Single(x => x.Id == id).EdgeId).ToHashSet())).Where(x => x.Edges.SetEquals(boundary.ToHashSet())).Select(x => (LoopId?)x.Id).SingleOrDefault();
- if (entryEdges.Length > 0 && LoopFor(entryEdges) is { } entryLoop) descendants.Add(new($"material:{slot.StableId}:entry-loop","Loop",SemanticTopologyRole.SlotEntryLoop,slot.StableId,Loop:entryLoop,ParentStableId:slot.StableId));
- if (exitEdges.Length > 0 && LoopFor(exitEdges) is { } exitLoop) descendants.Add(new($"material:{slot.StableId}:exit-loop","Loop",SemanticTopologyRole.SlotExitLoop,slot.StableId,Loop:exitLoop,ParentStableId:slot.StableId));
+ if (entryEdges.Length > 0 && LoopFor(entryEdges) is { } entryLoop) AddFeatureDescendant(new($"material:{slot.StableId}:entry-loop","Loop",SemanticTopologyRole.SlotEntryLoop,slot.StableId,Loop:entryLoop,ParentStableId:slot.StableId));
+ if (exitEdges.Length > 0 && LoopFor(exitEdges) is { } exitLoop) AddFeatureDescendant(new($"material:{slot.StableId}:exit-loop","Loop",SemanticTopologyRole.SlotExitLoop,slot.StableId,Loop:exitLoop,ParentStableId:slot.StableId));
}
var provenance = new List<string> { "ProfileArrangement2D", "PrismaticSectionStackConstruction", "PrismaticSectionStackBrepPlan", "AuthoritativeBRepPlan" };
if ((stack.Feature.ShaftHoles?.Count ?? 0) > 0) provenance.Insert(0, "SemanticHoleComposeLowering");
diff --git a/Aetheris.Kernel.Firmament/Materializer/SemanticTopologySelections.cs b/Aetheris.Kernel.Firmament/Materializer/SemanticTopologySelections.cs
index cb0c0448..ad97cde3 100644
--- a/Aetheris.Kernel.Firmament/Materializer/SemanticTopologySelections.cs
+++ b/Aetheris.Kernel.Firmament/Materializer/SemanticTopologySelections.cs
@@ -18,7 +18,10 @@ public sealed record SemanticTopologyDescendant(
EdgeId? Edge = null, FaceId? Face = null, LoopId? Loop = null, VertexId? Vertex = null,
string? ParentStableId = null, string? GeometryPreview = null,
string? FirmamentSelector = null,
- SemanticTopologyAddressability Addressability = SemanticTopologyAddressability.RuntimeOnly);
+ SemanticTopologyAddressability Addressability = SemanticTopologyAddressability.RuntimeOnly,
+ // Producers may retain a construction origin alongside a more specific feature
+ // owner of the same entity. Aliases remain queryable but do not own viewport picks.
+ bool IsTopologyAlias = false);
public sealed record SemanticTopologyCorrespondence(
string BodyStableId,
diff --git a/Aetheris.Web.Runtime/sdk/scripts/build.mjs b/Aetheris.Web.Runtime/sdk/scripts/build.mjs
index 073e1c0a..ff3c57d8 100644
--- a/Aetheris.Web.Runtime/sdk/scripts/build.mjs
+++ b/Aetheris.Web.Runtime/sdk/scripts/build.mjs
@@ -25,7 +25,7 @@ if (production) {
// directory retains obsolete fingerprints and doubles the packaged runtime.
await rm(published, { recursive: true, force: true });
run(['publish', project, '-c', 'Release', '-p:RunAOTCompilation=true', '-p:WasmStripILAfterAOT=false',
- '-o', published, '--nologo', '-m:1']);
+ '-o', published, '--nologo', '-m:1', '-nr:false', '-p:UseSharedCompilation=false']);
await cp(join(published, 'wwwroot', '_framework'), join(dist, 'runtime-aot', '_framework'), { recursive: true });
}
await copyFile(join(sdk, 'src', 'index.js'), join(dist, 'index.js'));
diff --git a/docs/development/reports/2026-10/graph-authoring-ui-support.md b/docs/development/reports/2026-10/graph-authoring-ui-support.md
new file mode 100644
index 00000000..f3c6363c
--- /dev/null
+++ b/docs/development/reports/2026-10/graph-authoring-ui-support.md
@@ -0,0 +1,32 @@
+# Graph authoring compiler support
+
+The graph usability pass adds compiler-owned support/termination presets and
+EdgeFinish schema metadata, including inline completion in its owning block.
+String/FaceSelector presets remain suggestions; they do not restrict binding or
+promise admission on every host. Preset tests compile the documented choices.
+
+Browser pocket creation exposed `Duplicate construction correspondence for BRep
+face 12`: both a construction profile and a material feature were indexed as
+primary owners. Section-stack emission now explicitly marks construction origins
+as topology aliases when a more specific feature owns that entity. GeometrySourceMap
+indexes the primary owner, retains every alias for source/semantic queries, and
+rejects dangling aliases and unmarked conflicting owners. Hole and slot roles use
+the same producer-owned rule. No geometry construction, surface, trim or dimension
+was changed. The actual graph-generated exports retain expected enclosure, bounds,
+topology and independently calculated through-hole volume.
+
+Evidence: Release solution build passed; fast Core lane 1,110 passed; full solution
+lane 6,039 passed, zero failed, two pre-existing external Drawing Notes renderer
+tests skipped. Schema/palette lane 29 passed; graph/correspondence lane 27 passed.
+Logs: `artifacts/local/graph-ux-final-build.log`, `graph-ux-final-fast.log`,
+`graph-ux-final-full.log`, `graph-ux-schema.log`, `graph-ux-correspondence.log`.
+The production WASM/AOT SDK and extracted Windows Helios bundle passed seven
+actual graph-only workflows and STEP/GLB/PDF export qualification in HeliosCAD.
+The companion report is HeliosCAD's
+`docs/development/reports/2026-10/graph-authoring-usability.md`.
+
+The SDK production publish disables node reuse and shared compilation to avoid
+persistent compiler hosts. Current public language documentation explicitly notes
+that angular Draft is not yet a V2 Modify feature; its bounded V1 executor remains
+a separate admission/lowering gap. Verdict: Meaningful progression for the whole
+UI request, with that remaining compiler boundary isolated.
diff --git a/docs/public/reference/language/solids-and-features.md b/docs/public/reference/language/solids-and-features.md
index fd1d0182..037a734f 100644
--- a/docs/public/reference/language/solids-and-features.md
+++ b/docs/public/reference/language/solids-and-features.md
@@ -37,6 +37,9 @@ different construction.
patterns. `Modify Base {}` with no features is a valid no-op, as long as `Base`
exists.
+Angular mold `Draft` is not currently a V2 `Modify` feature. Its bounded legacy
+operation does not imply support on the modern authoring path.
+
## Compose
`Compose name { ... }` builds a body from a Profile-based stack of operations. It