Skip to content

Next Gen STEP AP242 Native-ish BREP Geometric Modeling Kernel

Simplify Firmament analysis and authoring flows

Yuechen Licfb1d32f0ef8
diff --git a/Aetheris.CLI/CliRunner.cs b/Aetheris.CLI/CliRunner.cs
index 0903c956..0919a1cf 100644
--- a/Aetheris.CLI/CliRunner.cs
+++ b/Aetheris.CLI/CliRunner.cs
@@ -575,9 +575,10 @@ public static class CliRunner
}
SectionChainMaterializationResult materialized;
SectionChain chain;
+ IReadOnlyList<SectionChainProfileDerivation>? profileDerivations = null;
if (File.Exists(witness))
{
- var authored = SectionChainAuthoringParser.Compile(File.ReadAllText(witness));
+ var authored = SectionChainAuthoringParser.CompileFile(witness);
if (!authored.IsSuccess || authored.Chain is null || authored.Materialization is null)
{
var failure = new { command = $"section-chain {operation}", success = false, input = Path.GetFullPath(witness), diagnostics = authored.Diagnostics };
@@ -585,6 +586,7 @@ public static class CliRunner
return 1;
}
chain = authored.Chain; materialized = authored.Materialization;
+ profileDerivations = authored.ProfileDerivations;
}
else
{
@@ -611,6 +613,7 @@ public static class CliRunner
var inspection = new
{
command = $"section-chain {operation}", success = true, chain.StableId,
+ profileDerivations,
sections = chain.Sections.Select(section => new { section.SectionId, section.Frame, profile = section.Profile.StableId, spans = section.Profile.Spans.Select(span => span.SpanId), seam = section.Profile.SeamSpanId }),
chain.Correspondence,
resolvedCorrespondence = Enumerable.Range(0, chain.Sections.Count - 1).Select(index => new
@@ -1427,7 +1430,7 @@ Model CanonicalPanel {
}
if (frontend.Schema == FirmamentFrontendSchema.SectionChain)
{
- var section = SectionChainAuthoringParser.Compile(source);
+ var section = SectionChainAuthoringParser.CompileFile(fullPath);
if (json) stdout.WriteLine(JsonSerializer.Serialize(new { command = "inspect", success = section.IsSuccess, input = fullPath, domain = "SectionChain", sectionChain = section.Chain?.StableId, diagnostics = section.Diagnostics }, JsonOptions));
else if (section.IsSuccess) stdout.WriteLine($"SectionChain {section.Chain!.StableId}: {section.Chain.Sections.Count} sections");
else foreach (var diagnostic in section.Diagnostics) stderr.WriteLine("error: " + diagnostic);
@@ -2325,7 +2328,7 @@ Model CanonicalPanel {
}
if (frontend.Schema == FirmamentFrontendSchema.SectionChain)
{
- var section = SectionChainAuthoringParser.Compile(validationSource);
+ var section = SectionChainAuthoringParser.CompileFile(sourcePath);
var payload = new { source = sourcePath, status = section.IsSuccess ? "valid" : "invalid", domain = "SectionChain", summary = new { fatalDiagnosticCount = section.Diagnostics.Count, warningDiagnosticCount = 0, sections = section.Chain?.Sections.Count ?? 0 }, diagnostics = section.Diagnostics };
if (json) stdout.WriteLine(JsonSerializer.Serialize(new { firmamentV2Validation = payload }, JsonOptions));
else stdout.WriteLine($"Firmament V2 SectionChain validation: {payload.status} ({payload.summary.fatalDiagnosticCount} fatal, 0 warning)");
diff --git a/Aetheris.Kernel.Firmament.Tests/Assembly/GuitarSurfacingWitnessTests.cs b/Aetheris.Kernel.Firmament.Tests/Assembly/GuitarSurfacingWitnessTests.cs
index 0c29830e..f574a769 100644
--- a/Aetheris.Kernel.Firmament.Tests/Assembly/GuitarSurfacingWitnessTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/Assembly/GuitarSurfacingWitnessTests.cs
@@ -24,7 +24,7 @@ public sealed class GuitarSurfacingWitnessTests
Assert.Equal(660, nut.OriginY, 6);
Assert.Equal(55, nut.OriginZ, 6);
Assert.DoesNotContain("Headstock", neck.SemanticRoot.ExposedMembers.Keys);
- Assert.Equal(15, result.Ir.SourceDependencies!.Count);
+ Assert.Equal(16, result.Ir.SourceDependencies!.Count);
Assert.Contains(result.Ir.SourceDependencies, d => d.Path == "tuners-assembly.firmament");
}
[Fact]
diff --git a/Aetheris.Kernel.Firmament.Tests/ConceptDerivationTests.cs b/Aetheris.Kernel.Firmament.Tests/ConceptDerivationTests.cs
new file mode 100644
index 00000000..002c7ded
--- /dev/null
+++ b/Aetheris.Kernel.Firmament.Tests/ConceptDerivationTests.cs
@@ -0,0 +1,155 @@
+using Aetheris.Kernel.Firmament.Assembly;
+using Aetheris.Kernel.Firmament.FirmamentV2;
+using Aetheris.Kernel.Firmament.Materializer;
+
+namespace Aetheris.Kernel.Firmament.Tests;
+
+public sealed class ConceptDerivationTests
+{
+ private const string Profiles = """
+ Model Test {
+ Units: mm
+ Rect2 Rectangle { Center: [0mm,0mm]; Size: [4mm,2mm] }
+ Profile Original { Loop Outer { Rectangle |> TraceLoop } }
+ Concept Struct Layout {
+ Deck: Plane { Origin: [0mm,0mm,7mm]; Normal: [0,0,1]; Up: [0,1,0] }
+ Curve2 Outline { From: Original; On: Deck; Translate: [10mm,20mm]; Rotate: 90deg }
+ }
+ Profile Derived Using Layout { Loop Outer { Outline |> TraceLoop } }
+ Extrude Body { Profile: Derived From: 0mm To: 3mm }
+ }
+ """;
+
+ [Fact]
+ public void RigidBoundaryPlacementPreservesSourceAndUsesRealProfileExtrusion()
+ {
+ var original = ProfileAuthoringParser.ResolveNamedProfile(Profiles, "Original", out var originalErrors);
+ var derived = ProfileAuthoringParser.ResolveNamedProfile(Profiles, "Derived", out var errors);
+ Assert.Empty(originalErrors); Assert.Empty(errors); Assert.NotNull(original); Assert.NotNull(derived);
+ Assert.Equal(8, ResolvedProfile2DValidator.Validate(derived).SignedArea, 8);
+ Assert.Equal(7, derived.EffectiveConstructionPlane.Origin.Z);
+ var lines = derived.Loops[0].Segments.Select(s => Assert.IsType<LineArcLineSegment2D>(s.Geometry)).ToArray();
+ Assert.Equal(9, lines.Min(l => Math.Min(l.Start.X,l.End.X)), 8);
+ Assert.Equal(11, lines.Max(l => Math.Max(l.Start.X,l.End.X)), 8);
+ Assert.Equal(18, lines.Min(l => Math.Min(l.Start.Y,l.End.Y)), 8);
+ Assert.Equal(22, lines.Max(l => Math.Max(l.Start.Y,l.End.Y)), 8);
+ Assert.All(derived.Loops[0].Segments, s => { Assert.Equal("concept-curve:Layout.Outline", s.Provenance.ConceptStableId); Assert.NotNull(s.Provenance.TracedFrom); });
+ var parsed = ProfileAuthoringParser.Parse(Profiles);
+ Assert.Empty(parsed.Diagnostics);
+ Assert.Equal(LineArcProfileExtrudeStatus.Succeeded, ResolvedProfile2DValidator.Extrude(parsed.Profile!, parsed.Height).Status);
+ var compiled = FirmamentBuildAndExport.CompileSource(Profiles);
+ Assert.True(compiled.IsSuccess, string.Join("\n", compiled.Diagnostics));
+ }
+
+ [Theory]
+ [InlineData("From: Original", "From: Derived", "concept-profile-dependency-cycle")]
+ [InlineData("From: Original", "From: Missing", "profile-source-missing-profile")]
+ [InlineData("On: Deck", "On: Missing", "Plane")]
+ [InlineData("Rotate: 90deg", "Rotate: 90mm", "concept-profile-unit-invalid")]
+ [InlineData("Rotate: 90deg", "Rotate: 90deg; Rotate: 0deg", "concept-profile-duplicate-field")]
+ [InlineData("Rotate: 90deg", "Rotate: 90deg; Scale: -1", "concept-profile-scale-invalid")]
+ [InlineData("Translate: [10mm,20mm]", "Translate: [10mm,20mm,30mm]", "concept-profile-vector-invalid")]
+ public void InvalidBoundaryDerivationsFailClosed(string from, string to, string diagnostic)
+ {
+ Assert.Null(ProfileAuthoringParser.ResolveNamedProfile(Profiles.Replace(from,to), "Derived", out var errors));
+ Assert.Contains(errors, e => e.Contains(diagnostic, StringComparison.Ordinal));
+ }
+
+ private const string Assembly = """
+ Concept Struct Layout {
+ Plane Deck { From: Test.Base.Top.Frame; Offset: 2mm; Clocking: 90deg }
+ DatumFrame Mount { On: Deck; At: [4mm,0mm]; X: [1,0] }
+ }
+ Template<H: Length> Struct Pad {
+ Expose { Semantic Bottom { DatumFrame Frame = [0mm,0mm,0mm] x [1,0,0] y [0,1,0] z [0,0,1]; }
+ Semantic Top { DatumFrame Frame = [0mm,0mm,H] x [1,0,0] y [0,1,0] z [0,0,1]; } }
+ Rect2 R { Center: [0mm,0mm]; Size: [20mm,20mm] }
+ Profile P { Loop Outer { R |> TraceLoop } }
+ Extrude Body { Profile: P From: 0mm To: H }
+ }
+ Interface<Fixed> Seating { Datum: Layout.Deck; Members: [Test.Hardware.Bottom] }
+ Assembly Test {
+ <Assembly Test>
+ <Part Base = Pad<H:10mm>> Placement { From: Origin; To: World; TranslateLocal: [0mm,0mm,30mm]; } </Part>
+ <Part Hardware = Pad<H:1mm>></Part>
+ </Assembly>
+ Anchor: Test;
+ Mate HardwareOnDeck: Seating { Member: Test.Hardware.Bottom; At: Layout.Mount; Orientation: SameDirection; }
+ }
+ """;
+
+ [Fact]
+ public void PublishedOccurrenceFrameDrivesOffsetClockingAndCachedPlacement()
+ {
+ using var session = new FirmamentCompilationSession();
+ var first = session.Compile(Assembly);
+ Assert.True(first.IsSuccess, string.Join("\n",first.Diagnostics));
+ var matrix = first.Ir!.Instances.Single(i => i.Path.ToString() == "Test.Hardware").ResolvedTransform!.Matrix;
+ Assert.Equal(0, matrix[12], 8); Assert.Equal(4, matrix[13], 8); Assert.Equal(42, matrix[14], 8);
+ Assert.Equal(0, matrix[0], 8); Assert.Equal(1, matrix[1], 8);
+ var edited = session.Compile(Assembly.Replace("Offset: 2mm", "Offset: 3mm"));
+ Assert.True(edited.IsSuccess, string.Join("\n",edited.Diagnostics));
+ Assert.Equal(2, edited.Reuse!.ReusedDefinitions);
+ Assert.Equal(43, edited.Ir!.Instances.Single(i => i.Path.ToString() == "Test.Hardware").ResolvedTransform!.Matrix[14], 8);
+ var nonPlanar = session.Compile(Assembly.Replace("TranslateLocal: [0mm,0mm,30mm];", "TranslateLocal: [0mm,0mm,30mm]; RotateLocal: { Axis: Y; Angle: 90deg; }"));
+ Assert.True(nonPlanar.IsSuccess, string.Join("\n",nonPlanar.Diagnostics));
+ var tilted = nonPlanar.Ir!.Instances.Single(i => i.Path.ToString() == "Test.Hardware").ResolvedTransform!.Matrix;
+ Assert.Equal(12, tilted[12], 8); Assert.Equal(4, tilted[13], 8); Assert.Equal(30, tilted[14], 8);
+ Assert.Equal(1, tilted[8], 8); Assert.Equal(0, tilted[10], 8);
+ Assert.Equal(2, nonPlanar.Reuse!.ReusedDefinitions);
+ Assert.All(nonPlanar.Geometry!.Artifact.DatumSeats!, s => Assert.True(s.Passed));
+ }
+
+ [Theory]
+ [InlineData("From: Test.Base.Top.Frame", "From: Test.Hardware.Bottom.Frame", "assembly-datum-source-placement-dependent")]
+ [InlineData("From: Test.Base.Top.Frame", "From: Test.Base.Missing.Frame", "assembly-datum-source-unresolved")]
+ [InlineData("From: Test.Base.Top.Frame", "From: Layout.Deck", "assembly-datum-dependency-cycle")]
+ public void InvalidDatumSourcesFailClosed(string from, string to, string code)
+ {
+ var result = new AssemblyM1Pipeline().Compile(Assembly.Replace(from,to));
+ Assert.False(result.IsSuccess); Assert.Contains(result.Diagnostics, d => d.Code == code);
+ }
+
+ [Fact]
+ public void DuplicateDerivedPlaneProducesDiagnosticRatherThanThrowing()
+ {
+ var source = Assembly.Replace("DatumFrame Mount", "Plane Deck { From: Test.Base.Top.Frame; Offset: 2mm; Clocking: 90deg } DatumFrame Mount");
+ var result = new AssemblyM1Pipeline().Compile(source);
+ Assert.False(result.IsSuccess);
+ Assert.Contains(result.Diagnostics, d => d.Code == "assembly-datum-duplicate");
+ }
+
+ [Fact]
+ public void SharedGuitarOutlineEditsInvalidateExactlyItsThreeConsumers()
+ {
+ var path = FirmamentCorpusHarness.ResolveFixtureFullPath("fixtures/Canonical/AssemblyInterfaces/GuitarX0/guitar.firmasm");
+ var documents = Directory.GetFiles(Path.GetDirectoryName(path)!,"*.firmament").Append(path).ToDictionary(p => Path.GetFileName(p),File.ReadAllText);
+ using var session = new FirmamentCompilationSession();
+ var first = session.CompileProject(new("guitar.firmasm",documents));
+ Assert.True(first.IsSuccess, string.Join("\n",first.Diagnostics)); Assert.Equal(16, first.Ir!.SourceDependencies!.Count);
+ Assert.Single(first.Ir.SourceDependencies, d => d.IsRoot);
+ Assert.Equal(9, first.Geometry!.Artifact.Definitions.Sum(d => d.Provenance.Count(p => p.Stage == "concept-boundary-placement")));
+ documents["body-outline.firmament"] = documents["body-outline.firmament"].Replace("115mm,-195mm", "115.1mm,-195mm");
+ var edited = session.CompileProject(new("guitar.firmasm",documents));
+ Assert.True(edited.IsSuccess, string.Join("\n",edited.Diagnostics));
+ Assert.Equal(3, edited.Reuse!.RebuiltDefinitions); Assert.Equal(50, edited.Reuse.ReusedDefinitions);
+ Assert.All(edited.Geometry!.Artifact.DatumSeats!, s => Assert.True(s.Passed));
+ foreach (var identity in new[] { "CarvedMaple", "MahoganyBack", "IvoryBinding" })
+ Assert.NotEqual(first.Geometry!.Artifact.Definitions.Single(d => d.DefinitionIdentity.Contains(identity)).StepSha256,
+ edited.Geometry.Artifact.Definitions.Single(d => d.DefinitionIdentity.Contains(identity)).StepSha256);
+ }
+
+ [Theory]
+ [InlineData(false, "assembly-include-file-not-found")]
+ [InlineData(true, "assembly-include-cycle")]
+ public void FileBackedProfileIncludesFailClosed(bool cycle, string code)
+ {
+ var project = new FirmamentProjectSnapshot("main.firmasm", new Dictionary<string,string> {
+ ["main.firmasm"] = "Assembly Test { <Assembly Test><Part Body = SectionChainFile<\"part.firmament\">></Part></Assembly> Anchor: Test; }",
+ ["part.firmament"] = "Include \"boundary.firmament\";\nModel Test { Units: mm }",
+ ["boundary.firmament"] = cycle ? "Include \"part.firmament\";" : "Include \"missing.firmament\";"
+ });
+ var result = new AssemblyM1Pipeline().CompileProject(project);
+ Assert.False(result.IsSuccess); Assert.Contains(result.Diagnostics, d => d.Code == code);
+ }
+}
diff --git a/Aetheris.Kernel.Firmament/Assembly/AssemblyDatumAuthoring.cs b/Aetheris.Kernel.Firmament/Assembly/AssemblyDatumAuthoring.cs
index 757a9403..17be4278 100644
--- a/Aetheris.Kernel.Firmament/Assembly/AssemblyDatumAuthoring.cs
+++ b/Aetheris.Kernel.Firmament/Assembly/AssemblyDatumAuthoring.cs
@@ -28,13 +28,30 @@ internal static class AssemblyDatumAuthoring
var fields = AssemblyM0Parser.BalancedBody(body, member.Index + member.Length - 1, diagnostics, "layout plane")!;
if (fields is null) continue;
var name = member.Groups["name"].Value;
- var origin = Vector(fields, "Origin", 3, true, diagnostics);
- var normal = Vector(fields, "Normal", 3, false, diagnostics);
- var up = Vector(fields, "Up", 3, false, diagnostics);
- CheckFields(fields, ["Origin", "Normal", "Up"], diagnostics);
- var transform = new AssemblyFrameTransformSource(owner + "_" + name, "World", origin, "Z", 0, normal, up,
- new(sourceIdentity, header.Index + member.Index, member.Length + fields.Length + 1));
- AssemblyFrameAuthoring.Compose(Transform3D.Identity, transform, diagnostics);
+ AssemblyFrameTransformSource transform;
+ var span = new SemanticSourceSpan(sourceIdentity, header.Index + member.Index, member.Length + fields.Length + 1);
+ if (Regex.IsMatch(fields, @"\bFrom\s*:"))
+ {
+ var from = Regex.Match(fields, @"\bFrom\s*:\s*(?<v>(?:SectionChainFile|LoftFile)<""[^""]+"">(?:\.\w+)+|\w+(?:\.\w+)+)\s*;?");
+ if (!from.Success || Regex.Matches(fields, @"\bFrom\s*:").Count != 1)
+ diagnostics.Add(new("assembly-datum-source-invalid", "From requires one published frame or Concept plane."));
+ var offset = Measure(fields, "Offset", "mm", diagnostics);
+ var clocking = Measure(fields, "Clocking", "deg", diagnostics);
+ var planeRemaining = from.Success ? fields.Remove(from.Index, from.Length) : fields;
+ planeRemaining = Regex.Replace(planeRemaining, @"\b(?:Offset|Clocking)\s*:\s*[-+0-9.eE]+(?:mm|deg)\s*;?", "");
+ if (!string.IsNullOrWhiteSpace(planeRemaining.Replace(";", "")))
+ diagnostics.Add(new("assembly-datum-fields-invalid", "Derived Plane admits From, Offset and Clocking only."));
+ transform = new(owner + "_" + name, from.Groups["v"].Value, [0,0,offset], "Z", clocking, SourceSpan: span);
+ }
+ else
+ {
+ var origin = Vector(fields, "Origin", 3, true, diagnostics);
+ var normal = Vector(fields, "Normal", 3, false, diagnostics);
+ var up = Vector(fields, "Up", 3, false, diagnostics);
+ CheckFields(fields, ["Origin", "Normal", "Up"], diagnostics);
+ transform = new(owner + "_" + name, "World", origin, "Z", 0, normal, up, span);
+ AssemblyFrameAuthoring.Compose(Transform3D.Identity, transform, diagnostics);
+ }
if (!planes.TryAdd(name, transform)) diagnostics.Add(new("assembly-datum-duplicate", $"Duplicate plane '{owner}.{name}'."));
result.Add(new(owner + "." + name, owner + "." + name, transform));
remaining = remaining.Replace(member.Value + fields + "}", "", StringComparison.Ordinal);
@@ -52,12 +69,8 @@ internal static class AssemblyDatumAuthoring
if (Math.Sqrt(x[0]*x[0] + x[1]*x[1]) < 1e-12)
diagnostics.Add(new("assembly-datum-invalid-direction", "DatumFrame X must be nonzero."));
var angle = Math.Atan2(x[1], x[0]) * 180 / Math.PI;
- var basis = AssemblyFrameAuthoring.Compose(Transform3D.Identity, plane, diagnostics);
- var matrix = (Transform3D.CreateRotationZ(angle * Math.PI / 180)
- * Transform3D.CreateTranslation(new(at[0], at[1], 0)) * basis).ToRowMajor();
var name = member.Groups["name"].Value;
- var frame = new AssemblyFrameTransformSource(owner + "_" + name, "World", [matrix[12], matrix[13], matrix[14]], "Z", 0,
- [matrix[8], matrix[9], matrix[10]], [matrix[4], matrix[5], matrix[6]], plane.SourceSpan);
+ var frame = new AssemblyFrameTransformSource(owner + "_" + name, owner + "." + planeName, [at[0], at[1], 0], "Z", angle, SourceSpan: plane.SourceSpan);
result.Add(new(owner + "." + name, owner + "." + planeName, frame));
remaining = remaining.Replace(member.Value + fields + "}", "", StringComparison.Ordinal);
}
@@ -67,6 +80,17 @@ internal static class AssemblyDatumAuthoring
}
if (result.Select(d => d.Identity).Distinct(StringComparer.Ordinal).Count() != result.Count)
diagnostics.Add(new("assembly-datum-duplicate", "Concept layout datum identities must be unique."));
+ foreach (var value in result)
+ {
+ var seen = new HashSet<string>(StringComparer.Ordinal);
+ var current = value;
+ while (current is not null)
+ {
+ if (!seen.Add(current.Identity))
+ { diagnostics.Add(new("assembly-datum-dependency-cycle", $"Concept datum cycle at '{current.Identity}'.")); break; }
+ current = result.FirstOrDefault(d => d.Identity == current.Transform.From);
+ }
+ }
declarations = new string(masked);
return result;
}
@@ -86,10 +110,77 @@ internal static class AssemblyDatumAuthoring
internal static AssemblyMemberSource Bind(string body, AssemblyMemberSource root,
IReadOnlyList<AssemblyLayoutDatum> layout, IReadOnlyList<InterfaceDefinition> interfaces,
- List<AssemblyDiagnostic> diagnostics, out IReadOnlyList<AssemblyFrameTransformSource> frames)
+ List<AssemblyDiagnostic> diagnostics, out IReadOnlyList<AssemblyFrameTransformSource> frames,
+ Func<string, IReadOnlyList<SemanticValue>>? publishedPorts = null)
{
var usedFrames = new Dictionary<string, AssemblyFrameTransformSource>(StringComparer.Ordinal);
var seats = new Dictionary<string, (AssemblyDatumSeat Seat, AssemblyFramePlacementSource Placement)>(StringComparer.Ordinal);
+ var resolved = new Dictionary<string, AssemblyLayoutDatum>(StringComparer.Ordinal);
+ var active = new HashSet<string>(StringComparer.Ordinal);
+ AssemblyLayoutDatum? Resolve(AssemblyLayoutDatum value)
+ {
+ if (resolved.TryGetValue(value.Identity, out var cached)) return cached;
+ if (!active.Add(value.Identity))
+ { diagnostics.Add(new("assembly-datum-dependency-cycle", $"Concept datum cycle at '{value.Identity}'.")); return null; }
+ var from = value.Transform.From;
+ Transform3D basis = Transform3D.Identity;
+ if (layout.FirstOrDefault(d => d.Identity == from) is { } parent)
+ {
+ var r = Resolve(parent);
+ if (r is null) { active.Remove(value.Identity); return null; }
+ basis = AssemblyFrameAuthoring.Compose(Transform3D.Identity, r.Transform, diagnostics);
+ }
+ else if (from != "World")
+ {
+ var file = Regex.Match(from, @"^(?<id>(?:SectionChainFile|LoftFile)<""[^""]+"">)\.(?<port>\w+)\.Frame$");
+ IReadOnlyList<SemanticValue>? ports = null;
+ string port = "";
+ Transform3D placement = Transform3D.Identity;
+ if (file.Success)
+ { ports = publishedPorts?.Invoke(file.Groups["id"].Value); port = file.Groups["port"].Value; }
+ else
+ {
+ var path = from.Split('.');
+ if (path.Length == 4 && path[0] == root.Name && path[3] == "Frame"
+ && root.Children.FirstOrDefault(c => c.Name == path[1] && c.Kind == AssemblyInstanceKind.Part) is { } child)
+ {
+ // A source must already have an independent placement. Never
+ // evaluate the very occurrence that this datum will place.
+ if ((child.ExplicitTransform is null && child.FramePlacement?.Target.From != "World") || Regex.IsMatch(body,
+ $@"\bMember\s*:\s*{Regex.Escape(root.Name + "." + child.Name)}\."))
+ { diagnostics.Add(new("assembly-datum-source-placement-dependent", $"'{from}' requires an independently placed direct Part.")); active.Remove(value.Identity); return null; }
+ ports = child.ExposedSemantics; port = path[2];
+ if (child.ExplicitTransform is { } explicitPlacement) placement = Transform3D.FromRowMajor(explicitPlacement.Matrix);
+ else
+ {
+ var authored = child.FramePlacement!;
+ var local = Transform3D.Identity;
+ if (authored.From != "Origin")
+ {
+ var pieces = authored.From.Split('.');
+ var sourcePort = ports.FirstOrDefault(p => p.ExposedName == pieces[0]);
+ if (pieces.Length != 2 || pieces[1] != "Frame" ||
+ sourcePort is null || !sourcePort.ExposedMembers.TryGetValue("Frame", out var sourceFrame) ||
+ !sourceFrame.TryBinding<ExactDatumFrameBinding>(out var exactSource))
+ { diagnostics.Add(new("assembly-datum-source-unresolved", $"Cannot resolve source Placement '{authored.From}'.")); active.Remove(value.Identity); return null; }
+ local = AssemblyFrameAuthoring.Matrix(exactSource);
+ }
+ placement = local.Inverse() * AssemblyFrameAuthoring.Compose(Transform3D.Identity, authored.Target, diagnostics);
+ }
+ }
+ }
+ var semantic = ports?.FirstOrDefault(p => p.ExposedName == port);
+ if (semantic is null || !semantic.ExposedMembers.TryGetValue("Frame", out var member) || !member.TryBinding<ExactDatumFrameBinding>(out var frame))
+ { diagnostics.Add(new("assembly-datum-source-unresolved", $"Cannot resolve published frame '{from}' in '{root.Name}'.")); active.Remove(value.Identity); return null; }
+ basis = AssemblyFrameAuthoring.Matrix(frame) * placement;
+ }
+ var m = AssemblyFrameAuthoring.Compose(basis, value.Transform, diagnostics).ToRowMajor();
+ var result = value with { Transform = value.Transform with { From = "World", Translation = [m[12],m[13],m[14]], RotationDegrees = 0,
+ Normal = [m[8],m[9],m[10]], Up = [m[4],m[5],m[6]] } };
+ active.Remove(value.Identity);
+ resolved[value.Identity] = result;
+ return result;
+ }
foreach (Match header in Regex.Matches(body, @"\bMate\s+(?<name>\w+)\s*:\s*(?<type>\w+)\s*\{"))
{
var fields = AssemblyM0Parser.BalancedBody(body, header.Index + header.Length - 1, diagnostics, "datum Mate")!;
@@ -110,8 +201,10 @@ internal static class AssemblyDatumAuthoring
diagnostics.Add(new("assembly-datum-support-invalid", "Support requires true or false."));
if (!contract.Members.Contains(member, StringComparer.Ordinal))
diagnostics.Add(new("assembly-datum-member-outside-contract", $"'{member}' is not a member of '{header.Groups["type"].Value}'."));
- var datum = layout.FirstOrDefault(d => d.Identity == contract.Datum && d.Plane == d.Identity);
- var target = layout.FirstOrDefault(d => d.Identity == at);
+ var datumSource = layout.FirstOrDefault(d => d.Identity == contract.Datum && d.Plane == d.Identity);
+ var targetSource = layout.FirstOrDefault(d => d.Identity == at);
+ var datum = datumSource is null ? null : Resolve(datumSource);
+ var target = targetSource is null ? null : Resolve(targetSource);
if (datum is null || target is null || target.Identity == target.Plane || target.Plane != contract.Datum)
{ diagnostics.Add(new("assembly-datum-target-invalid", $"'{at}' must be a frame on Concept plane '{contract.Datum}'.")); continue; }
if (orientation is not ("SameDirection" or "OpposedDirection"))
@@ -148,12 +241,23 @@ internal static class AssemblyDatumAuthoring
diagnostics.Add(new("assembly-placement-authority-conflict", $"'{root.Name}.{child.Name}' has authored Placement and datum Mate."));
return child with { FramePlacement = seating.Placement, DatumSeat = seating.Seat,
PlacementAuthority = PlacementAuthority.AuthoredFrame,
- Provenance = [.. child.Provenance ?? [], new("concept-datum-seating", seating.Seat.Datum, seating.Seat.Interface)] };
+ Provenance = [.. child.Provenance ?? [], new("concept-datum-seating", seating.Seat.Datum, seating.Seat.Interface),
+ new("concept-datum-derivation", layout.First(d => d.Identity == seating.Seat.Datum).Transform.From, seating.Seat.Datum)] };
}).ToArray();
frames = usedFrames.Values.ToArray();
return root with { Children = children };
}
+ private static double Measure(string fields, string name, string unit, List<AssemblyDiagnostic> diagnostics)
+ {
+ var matches = Regex.Matches(fields, $@"\b{name}\s*:\s*(?<v>[-+0-9.eE]+){unit}\s*;?");
+ if (!Regex.IsMatch(fields, $@"\b{name}\s*:")) return 0;
+ if (matches.Count != 1 || Regex.Matches(fields, $@"\b{name}\s*:").Count != 1
+ || !double.TryParse(matches[0].Groups["v"].Value, NumberStyles.Float, CultureInfo.InvariantCulture, out var result) || !double.IsFinite(result))
+ { diagnostics.Add(new("assembly-datum-measure-invalid", $"'{name}' requires one finite value in {unit}.")); return 0; }
+ return result;
+ }
+
private static string Field(string fields, string name, List<AssemblyDiagnostic> diagnostics)
{
var matches = Regex.Matches(fields, $@"\b{name}\s*:\s*(?<v>[A-Za-z_]\w*(?:\.\w+)*)\s*;?");
diff --git a/Aetheris.Kernel.Firmament/Assembly/AssemblyM0Parser.cs b/Aetheris.Kernel.Firmament/Assembly/AssemblyM0Parser.cs
index e8984871..eb30f3b8 100644
--- a/Aetheris.Kernel.Firmament/Assembly/AssemblyM0Parser.cs
+++ b/Aetheris.Kernel.Firmament/Assembly/AssemblyM0Parser.cs
@@ -92,6 +92,11 @@ public sealed class AssemblyM0Parser
return Path.GetDirectoryName(path)!;
}
+ internal static string? LoadResource(string path, FirmamentProjectSnapshot? project,
+ List<AssemblySourceDependencyIr> dependencies, List<AssemblyDiagnostic> diagnostics)
+ => project is not null ? LoadProjectSource(path, project, [], dependencies, diagnostics)
+ : LoadSourceGraph(Path.GetFullPath(path), FindAllowedSourceRoot(Path.GetFullPath(path)), [], dependencies, diagnostics);
+
public ParseResult Parse(string input, string sourceIdentity = "<memory>", FirmamentProjectSnapshot? project = null)
{
var watch = Stopwatch.StartNew();
@@ -154,7 +159,7 @@ public sealed class AssemblyM0Parser
var anchorMatch = Regex.Match(RemoveBlocks(body, "Mate", @"Assert\s+ToleranceStackup"), @"\bAnchor\s*:\s*(?<path>[A-Za-z_]\w*(?:\.[A-Za-z_]\w*)*)\s*;", RegexOptions.CultureInvariant);
var anchor = anchorMatch.Success ? AssemblyPath.Parse(anchorMatch.Groups["path"].Value) : new AssemblyPath([tree.Name]);
var frames = ParseFrameTransforms(body, sourceIdentity, diagnostics);
- tree = AssemblyDatumAuthoring.Bind(body, tree, layout, interfaces, diagnostics, out var datumFrames);
+ tree = AssemblyDatumAuthoring.Bind(body, tree, layout, interfaces, diagnostics, out var datumFrames, Ports);
frames = frames.Concat(datumFrames).ToArray();
var result = new AssemblySource(assemblyHeader.Groups["name"].Value, tree, interfaces, mates, anchor, relations, asserts, sourceIdentity, definitionSource, assemblyDefinitions, SourceDependencies: portDependencies, FrameTransforms: frames, Patterns: expandedPatterns.Document?.Patterns);
return Done(result);
@@ -390,7 +395,7 @@ public sealed class AssemblyM0Parser
ranges.Add((template.Index, close - template.Index));
var root = ParseTree(body, sourceIdentity, diagnostics, result, interfaces, new Dictionary<string, AssemblyMemberSource>(StringComparer.Ordinal), gearAuthorities, publishedPorts);
if (root is null) continue;
- root = AssemblyDatumAuthoring.Bind(body, root, layout ?? [], interfaces, diagnostics, out var datumFrames);
+ root = AssemblyDatumAuthoring.Bind(body, root, layout ?? [], interfaces, diagnostics, out var datumFrames, publishedPorts);
var exposed = ParseAssemblyExposes(body, root, sourceIdentity, diagnostics);
root = root with { ExposedSemantics = exposed, IsEncapsulatedDefinition = true };
var name = template.Groups["name"].Value;
diff --git a/Aetheris.Kernel.Firmament/Assembly/AssemblyM1Execution.cs b/Aetheris.Kernel.Firmament/Assembly/AssemblyM1Execution.cs
index 410e2988..da3bb602 100644
--- a/Aetheris.Kernel.Firmament/Assembly/AssemblyM1Execution.cs
+++ b/Aetheris.Kernel.Firmament/Assembly/AssemblyM1Execution.cs
@@ -107,6 +107,9 @@ internal static class AssemblyDefinitionMaterializer
}
sectionSource = File.ReadAllText(sectionPath);
}
+ var loaded = AssemblyM0Parser.LoadResource(sectionPath, project, [], diagnostics);
+ if (loaded is null) return null;
+ sectionSource = loaded;
var section = SectionChainAuthoringParser.Compile(AssemblyPublishedPorts.Strip(sectionSource, diagnostics));
if (!section.IsSuccess || section.Materialization?.Body is not { } sectionBody ||
section.Materialization.StructureKind != SectionChainStructureKind.ClosedSolid)
@@ -133,7 +136,9 @@ internal static class AssemblyDefinitionMaterializer
}
var sectionHash = Convert.ToHexString(SHA256.HashData(Encoding.UTF8.GetBytes(sectionStep.Value)));
var sectionStableId = "assembly-definition:" + Convert.ToHexString(SHA256.HashData(Encoding.UTF8.GetBytes(definitionIdentity)))[..16];
- var sectionProvenance = new[] { new SemanticProvenance("section-chain-source", sectionPath, section.Chain!.StableId, SemanticSourceSpan.Generated(sourceIdentity)) };
+ var sectionProvenance = new[] { new SemanticProvenance("section-chain-source", sectionPath, section.Chain!.StableId, SemanticSourceSpan.Generated(sourceIdentity)) }
+ .Concat((section.ProfileDerivations ?? []).Select(d => new SemanticProvenance("concept-boundary-placement",
+ d.ConceptCurve, d.Profile + ":" + d.Transform, SemanticSourceSpan.Generated(sectionPath)))).ToArray();
var ports = AssemblyPublishedPorts.Read(sectionSource,section.Chain.StableId,definitionIdentity,sectionPath,diagnostics,section.Chain);
return new(definitionIdentity, "section-chain:" + sectionHash[..16], sectionImport.Value, ports,
new(sectionStableId, definitionIdentity, "section-chain:" + sectionHash[..16], sectionHash, Metrics(sectionImport.Value), sectionProvenance), sectionStep.Value);
diff --git a/Aetheris.Kernel.Firmament/Assembly/AssemblyPublishedPorts.cs b/Aetheris.Kernel.Firmament/Assembly/AssemblyPublishedPorts.cs
index df644b78..9f1c13a5 100644
--- a/Aetheris.Kernel.Firmament/Assembly/AssemblyPublishedPorts.cs
+++ b/Aetheris.Kernel.Firmament/Assembly/AssemblyPublishedPorts.cs
@@ -38,6 +38,12 @@ internal static class AssemblyPublishedPorts
{ diagnostics.Add(new("assembly-profile-unresolved-resource", $"Port source '{requested}' was not found at '{path}'.")); return []; }
source = File.ReadAllText(path);
}
+ var resourceDependencies = new List<AssemblySourceDependencyIr>();
+ var loaded = AssemblyM0Parser.LoadResource(path, project, resourceDependencies, diagnostics);
+ if (loaded is null) return [];
+ source = loaded;
+ dependencies.AddRange(resourceDependencies.Where(d => !dependencies.Any(existing => existing.Path == d.Path))
+ .Select(d => d with { IsRoot = false }));
if (!dependencies.Any(d => d.Path == path))
dependencies.Add(new(path, Convert.ToHexString(System.Security.Cryptography.SHA256.HashData(System.Text.Encoding.UTF8.GetBytes(source))), false));
if (!Regex.IsMatch(source, @"\bExpose\s*\{\s*Semantic\b")) return [];
diff --git a/Aetheris.Kernel.Firmament/Assembly/FirmamentCompilationSession.cs b/Aetheris.Kernel.Firmament/Assembly/FirmamentCompilationSession.cs
index 323254e5..8e5dab35 100644
--- a/Aetheris.Kernel.Firmament/Assembly/FirmamentCompilationSession.cs
+++ b/Aetheris.Kernel.Firmament/Assembly/FirmamentCompilationSession.cs
@@ -137,6 +137,15 @@ internal sealed class AssemblyDefinitionCache(int capacity)
if (!File.Exists(path)) return null;
inputs = File.ReadAllText(path);
}
+ if (!identity.StartsWith("ExternalStep", StringComparison.Ordinal))
+ {
+ var resourcePath = project is not null ? requested
+ : Path.GetFullPath(Path.Combine(Path.GetDirectoryName(Path.GetFullPath(sourceIdentity))!, requested));
+ var errors = new List<AssemblyDiagnostic>();
+ var loaded = AssemblyM0Parser.LoadResource(resourcePath, project, [], errors);
+ if (loaded is null || errors.Count != 0) return null;
+ inputs = loaded;
+ }
}
else
{
diff --git a/Aetheris.Kernel.Firmament/FirmamentV2/ConceptProfileDerivation.cs b/Aetheris.Kernel.Firmament/FirmamentV2/ConceptProfileDerivation.cs
new file mode 100644
index 00000000..45c05eec
--- /dev/null
+++ b/Aetheris.Kernel.Firmament/FirmamentV2/ConceptProfileDerivation.cs
@@ -0,0 +1,124 @@
+using System.Globalization;
+using System.Text.RegularExpressions;
+using Aetheris.Kernel.Firmament.Materializer;
+
+namespace Aetheris.Kernel.Firmament.FirmamentV2;
+
+/// <summary>Named compile-time boundary values. Geometry transforms preserve the
+/// existing resolved Profile representation, validation and materializer authority.</summary>
+internal static class ConceptProfileDerivation
+{
+ internal static bool TryResolve(string source, string name, HashSet<string> visiting,
+ List<string> diagnostics, out ResolvedProfile2D? result)
+ {
+ result = null;
+ var profile = Regex.Match(source, $@"\bProfile\s+{Regex.Escape(name)}(?:\s+Using\s+(?<owner>\w+))?\s*\{{");
+ if (!profile.Success) return false;
+ var body = Body(source, profile.Index + profile.Length - 1);
+ if (body is null) return false;
+ var trace = Regex.Match(body, @"^\s*Loop\s+Outer\s*\{\s*(?<curve>\w+(?:\.\w+)?)\s*\|>\s*TraceLoop\s*\}\s*$");
+ if (!trace.Success) return false;
+ var reference = trace.Groups["curve"].Value;
+ var qualified = reference.Contains('.') ? reference : profile.Groups["owner"].Value + "." + reference;
+ var parts = qualified.Split('.');
+ if (parts.Length != 2) return false;
+ var layout = Regex.Match(source, $@"\bConcept\s+Struct\s+{Regex.Escape(parts[0])}(?:\s+On\s+\w+)?\s*\{{");
+ if (!layout.Success) return false;
+ var layoutBody = Body(source, layout.Index + layout.Length - 1);
+ if (layoutBody is null) return false;
+ var curves = Regex.Matches(layoutBody, $@"\bCurve2\s+{Regex.Escape(parts[1])}\s*\{{");
+ if (curves.Count == 0) return false;
+ if (curves.Count != 1) { diagnostics.Add($"concept-profile-duplicate-curve:{qualified}"); return true; }
+ var fields = Body(layoutBody, curves[0].Index + curves[0].Length - 1)!;
+ string? Field(string key)
+ {
+ var matches = Regex.Matches(fields, $@"\b{key}\s*:\s*(?<v>\[[^]]*\]|[^;\r\n}}]+)\s*;?");
+ if (matches.Count > 1) diagnostics.Add($"concept-profile-duplicate-field:{qualified}:{key}");
+ return matches.Count == 0 ? null : matches[0].Groups["v"].Value.Trim();
+ }
+ var from = Field("From"); var on = Field("On");
+ var translate = Vector(Field("Translate"), "Translate", [0,0]);
+ var pivot = Vector(Field("Pivot"), "Pivot", [0,0]);
+ var rotate = Number(Field("Rotate"), "deg", "Rotate", 0);
+ var scale = Number(Field("Scale"), "", "Scale", 1);
+ if (scale <= 0) diagnostics.Add($"concept-profile-scale-invalid:{qualified}:positive-uniform-scale-required");
+ var remaining = Regex.Replace(fields, @"\b(?:From|On|Translate|Pivot|Rotate|Scale)\s*:\s*(?:\[[^]]*\]|[^;\r\n}]+)\s*;?", "");
+ if (!string.IsNullOrWhiteSpace(remaining.Replace(";", ""))) diagnostics.Add($"concept-profile-fields-invalid:{qualified}");
+ if (from is null || !Regex.IsMatch(from, @"^\w+$") || on is null || !Regex.IsMatch(on, @"^\w+(?:\.\w+)?$"))
+ { diagnostics.Add($"concept-profile-source-invalid:{qualified}:named-profile-and-plane-required"); return true; }
+ var inherited = ProfileAuthoringParser.ResolveNamedProfileCore(source, from, visiting, out var sourceErrors);
+ diagnostics.AddRange(sourceErrors);
+ if (inherited is null) return true;
+ if (inherited.Loops.Count != 1)
+ { diagnostics.Add($"concept-profile-loop-count-invalid:{qualified}:single-boundary-required"); return true; }
+ var planeName = on == "XY" || on.Contains('.') ? on : parts[0] + "." + on;
+ ConstructionPlane? plane = ConstructionPlane.WorldXY;
+ if (planeName != "XY")
+ {
+ if (!ConceptIrResolver.TryResolvePlane(source, planeName, out var conceptPlane, out var planeError) || conceptPlane is null)
+ { diagnostics.Add(planeError ?? $"concept-profile-plane-unresolved:{planeName}"); return true; }
+ if (!ConstructionPlane.TryTrace("concept-profile:" + name, conceptPlane, $"offset:{profile.Index}", out plane, out var traceError))
+ { diagnostics.Add(traceError!); return true; }
+ }
+ var radians = rotate * Math.PI / 180;
+ (double X, double Y) Point((double X, double Y) p)
+ {
+ var x = (p.X - pivot[0]) * scale; var y = (p.Y - pivot[1]) * scale;
+ return (x*Math.Cos(radians)-y*Math.Sin(radians)+pivot[0]+translate[0],
+ x*Math.Sin(radians)+y*Math.Cos(radians)+pivot[1]+translate[1]);
+ }
+ LineArcProfileCurve2D? Transform(LineArcProfileCurve2D curve) => curve switch
+ {
+ LineArcLineSegment2D line => new LineArcLineSegment2D(Point(line.Start), Point(line.End)),
+ LineArcCubicBezier2D cubic => new LineArcCubicBezier2D(Point(cubic.Start),Point(cubic.Control1),Point(cubic.Control2),Point(cubic.End)),
+ LineArcCircularArc2D arc => new LineArcCircularArc2D(Point(arc.Center),arc.Radius*scale,arc.StartAngleRadians+radians,arc.SweepAngleRadians),
+ LineArcFullCircle2D circle => new LineArcFullCircle2D(Point(circle.Center),circle.Radius*scale),
+ LineArcFullEllipse2D ellipse => new LineArcFullEllipse2D(Point(ellipse.Center),ellipse.MajorRadius*scale,ellipse.MinorRadius*scale,ellipse.RotationRadians+radians),
+ _ => null
+ };
+ var segments = new List<ResolvedProfileSegment2D>();
+ foreach (var segment in inherited.Loops[0].Segments)
+ {
+ var geometry = Transform(segment.Geometry);
+ if (geometry is null) { diagnostics.Add($"concept-profile-curve-unsupported:{qualified}:{segment.Name}"); continue; }
+ segments.Add(new(segment.Name, geometry, segment.Provenance with {
+ StableId = $"profile:{name}:segment:{segment.Name}", ConceptStableId = "concept-curve:" + qualified,
+ SourceSpan = $"offset:{profile.Index}", Derivation = FormattableString.Invariant($"ConceptBoundaryPlacement:source={from};translate={translate[0]:R},{translate[1]:R};rotate={rotate:R};scale={scale:R};pivot={pivot[0]:R},{pivot[1]:R}"),
+ SourceFrame = planeName, TracedFrom = segment.Provenance.StableId }));
+ }
+ result = new(name, planeName, [new("Outer", true, segments)], plane);
+ var validation = ResolvedProfile2DValidator.Validate(result);
+ diagnostics.AddRange(validation.Diagnostics);
+ if (diagnostics.Count != 0) result = null;
+ return true;
+
+ double Number(string? text, string unit, string key, double fallback)
+ {
+ if (text is null) return fallback;
+ if (unit.Length > 0 && !text.EndsWith(unit, StringComparison.Ordinal))
+ { diagnostics.Add($"concept-profile-unit-invalid:{qualified}:{key}:{unit}"); return fallback; }
+ if (unit.Length > 0) text = text[..^unit.Length];
+ if (!double.TryParse(text, NumberStyles.Float, CultureInfo.InvariantCulture, out var value) || !double.IsFinite(value))
+ { diagnostics.Add($"concept-profile-number-invalid:{qualified}:{key}"); return fallback; }
+ return value;
+ }
+ double[] Vector(string? text, string key, double[] fallback)
+ {
+ if (text is null) return fallback;
+ var components = text.Trim('[',']').Split(',', StringSplitOptions.TrimEntries);
+ if (components.Length != 2) { diagnostics.Add($"concept-profile-vector-invalid:{qualified}:{key}"); return fallback; }
+ return components.Select(c => Number(c, "mm", key, 0)).ToArray();
+ }
+ }
+
+ private static string? Body(string source, int open)
+ {
+ var depth = 0;
+ for (var i = open; i < source.Length; i++)
+ {
+ if (source[i] == '{') depth++;
+ if (source[i] == '}' && --depth == 0) return source[(open + 1)..i];
+ }
+ return null;
+ }
+}
diff --git a/Aetheris.Kernel.Firmament/FirmamentV2/ProfileAuthoringParser.cs b/Aetheris.Kernel.Firmament/FirmamentV2/ProfileAuthoringParser.cs
index c89b2d66..40d7b462 100644
--- a/Aetheris.Kernel.Firmament/FirmamentV2/ProfileAuthoringParser.cs
+++ b/Aetheris.Kernel.Firmament/FirmamentV2/ProfileAuthoringParser.cs
@@ -45,13 +45,23 @@ public static class ProfileAuthoringParser
/// <summary>Resolves one named Profile without requiring an Extrude consumer.</summary>
public static ResolvedProfile2D? ResolveNamedProfile(string source, string profileName, out IReadOnlyList<string> reportedDiagnostics)
+ => ResolveNamedProfileCore(source, profileName, new(StringComparer.Ordinal), out reportedDiagnostics);
+
+ internal static ResolvedProfile2D? ResolveNamedProfileCore(string source, string profileName, HashSet<string> visiting, out IReadOnlyList<string> reportedDiagnostics)
{
ArgumentNullException.ThrowIfNull(source);
ArgumentException.ThrowIfNullOrWhiteSpace(profileName);
var diagnostics = new List<string>();
+ if (!visiting.Add(profileName)) { reportedDiagnostics = [$"concept-profile-dependency-cycle:{profileName}"]; return null; }
source = ExpandBuiltInPolygons(source, diagnostics);
var expansion = FirmamentV2TemplateExpansion.Expand(source, diagnostics);
if (expansion is not null) source = expansion.Source;
+ if (ConceptProfileDerivation.TryResolve(source, profileName, visiting, diagnostics, out var derived))
+ {
+ visiting.Remove(profileName);
+ reportedDiagnostics = diagnostics.Distinct(StringComparer.Ordinal).ToArray();
+ return diagnostics.Count == 0 ? derived : null;
+ }
var declaration = FindProfiles(source).FirstOrDefault(profile => profile.Name == profileName);
if (declaration is null) { reportedDiagnostics = [$"profile-source-missing-profile:{profileName}"]; return null; }
var points = new Dictionary<string, (double X, double Y)>(StringComparer.Ordinal);
@@ -68,6 +78,7 @@ public static class ProfileAuthoringParser
if (!validation.IsValid) profile = null;
}
reportedDiagnostics = diagnostics.Distinct(StringComparer.Ordinal).ToArray();
+ visiting.Remove(profileName);
return profile;
}
@@ -164,6 +175,12 @@ public static class ProfileAuthoringParser
if (profile is null)
return (null, 0, ["profile-source-missing-profile"]);
+ if (ConceptProfileDerivation.TryResolve(source, profile.Name, new(StringComparer.Ordinal) { profile.Name }, diagnostics, out var conceptProfile))
+ {
+ var depths = ResolveExtrude(source, profile.Name, diagnostics);
+ return (conceptProfile is null ? null : conceptProfile with { LocalStartDepth = depths.Start, LocalEndDepth = depths.End }, depths.Height, diagnostics);
+ }
+
var points = new Dictionary<string, (double X, double Y)>(StringComparer.Ordinal);
var guides = new Dictionary<string, LineArcProfileCurve2D>(StringComparer.Ordinal);
AddOrdinaryGuides(source, points, guides, diagnostics);
@@ -197,6 +214,11 @@ public static class ProfileAuthoringParser
var profiles = new Dictionary<string, ResolvedProfile2D>(StringComparer.Ordinal);
foreach (var profile in authoredProfiles)
{
+ if (ConceptProfileDerivation.TryResolve(source, profile.Name, new(StringComparer.Ordinal) { profile.Name }, diagnostics, out var derived))
+ {
+ if (derived is not null && !profiles.TryAdd(profile.Name, derived)) diagnostics.Add($"profile-duplicate:{profile.Name}");
+ continue;
+ }
var plane = ResolveConstructionPlane(source, profile.Frame, diagnostics);
var loops = BindProfileLoops(profile, paths, points, guides, diagnostics);
if (plane is null || loops.Count == 0) continue;
diff --git a/Aetheris.Kernel.Firmament/FirmamentV2/SectionChainAuthoringParser.cs b/Aetheris.Kernel.Firmament/FirmamentV2/SectionChainAuthoringParser.cs
index 07f1aaeb..4f5fc48e 100644
--- a/Aetheris.Kernel.Firmament/FirmamentV2/SectionChainAuthoringParser.cs
+++ b/Aetheris.Kernel.Firmament/FirmamentV2/SectionChainAuthoringParser.cs
@@ -9,7 +9,11 @@ public sealed record SectionChainAuthoringResult(
SectionChain? Chain,
SectionChainMaterializationResult? Materialization,
IReadOnlyList<string> Diagnostics,
- LoftAuthoredBinding? LoftBinding = null);
+ LoftAuthoredBinding? LoftBinding = null,
+ IReadOnlyList<SectionChainProfileDerivation>? ProfileDerivations = null);
+
+public sealed record SectionChainProfileDerivation(string Section, string Profile, string ConceptCurve,
+ string SourceSegment, string Transform, string Plane);
public sealed record LoftAuthoredBinding(string Name, string RearProfile, string RearFrame,
string FrontProfile, string FrontFrame, IReadOnlyList<double> Reference, double TwistDegrees,
@@ -22,6 +26,13 @@ public sealed record LoftAuthoredBinding(string Name, string RearProfile, string
/// </summary>
public static class SectionChainAuthoringParser
{
+ public static SectionChainAuthoringResult CompileFile(string path, bool materialize = true)
+ {
+ var errors = new List<Assembly.AssemblyDiagnostic>();
+ var source = Assembly.AssemblyM0Parser.LoadResource(path, null, [], errors);
+ return source is null || errors.Count != 0 ? new(false, null, null, errors.Select(d => d.Code + ":" + d.Message).ToArray())
+ : Compile(source, materialize);
+ }
public static bool IsSectionChainSource(string source) =>
Regex.IsMatch(source, @"\bSectionChain\s+[A-Za-z_]\w*\s*\{", RegexOptions.CultureInvariant)
|| LoftAuthoringParser.IsLoftSource(source);
@@ -56,6 +67,7 @@ public static class SectionChainAuthoringParser
diagnostics.Add($"section-chain-termination-invalid:End:{endText}");
var sections = new List<Section>();
+ var derivations = new List<SectionChainProfileDerivation>();
foreach (var authored in Blocks(declaration.Body, "Section"))
{
var frameName = Field(authored.Body, "Frame");
@@ -74,6 +86,10 @@ public static class SectionChainAuthoringParser
if (frameName is not null && plane is null) diagnostics.Add($"section-chain-frame-unresolved:{authored.Name}:{frameName}");
if (plane is null || profile is null) continue;
var outer = profile.Loops.Single(loop => loop.IsOuter);
+ if (outer.Segments.FirstOrDefault()?.Provenance is { } provenance
+ && provenance.ConceptStableId.StartsWith("concept-curve:", StringComparison.Ordinal))
+ derivations.Add(new(authored.Name, profile.Name, provenance.ConceptStableId,
+ provenance.TracedFrom ?? "", provenance.Derivation, profile.PlaneFrame));
if (profile.Loops.Count != 1) diagnostics.Add($"section-chain-profile-loop-count-invalid:{authored.Name}");
var spans = outer.Segments.Select(segment => Convert(segment, diagnostics, authored.Name)).Where(item => item is not null).Cast<SectionProfileSpan>().ToArray();
var seamId = seam ?? spans.FirstOrDefault()?.SpanId ?? string.Empty;
@@ -99,11 +115,11 @@ public static class SectionChainAuthoringParser
diagnostics.Add("section-chain-normalization-tolerance-invalid:positive-length-required");
if (diagnostics.Count != 0) return Fail(diagnostics);
var chain = new SectionChain(declaration.Name, sections, correspondence, transition, start, end, continuity, ProfileApproximationTolerance: tolerance);
- if (!materialize) return new(true, chain, null, []);
+ if (!materialize) return new(true, chain, null, [], ProfileDerivations: derivations);
var result = SectionChainMaterializer.Materialize(chain);
if (!result.IsSuccess)
diagnostics.AddRange(result.Diagnostics.Select(item => $"{item.Code}:{item.Message}"));
- return new(result.IsSuccess, chain, result, diagnostics);
+ return new(result.IsSuccess, chain, result, diagnostics, ProfileDerivations: derivations);
SectionChainAuthoringResult Fail(IEnumerable<string> items) => new(false, null, null, items.Distinct(StringComparer.Ordinal).ToArray());
}
diff --git a/docs/public/demos/guitar-subassemblies.md b/docs/public/demos/guitar-subassemblies.md
index 0307c198..16523e02 100644
--- a/docs/public/demos/guitar-subassemblies.md
+++ b/docs/public/demos/guitar-subassemblies.md
@@ -14,6 +14,7 @@ guitar.firmasm
├─ hardware-definitions.firmament shared exact part templates and HardwareSite
├─ body-assembly.firmament back, binding and carved top
│ └─ MahoganyBack / IvoryBinding / CarvedMaple.firmament SectionChain sources
+│ └─ body-outline.firmament Shared boundary for nine Concept placements
├─ neck-assembly.firmament neck, board, frets, inlays, nut and headstock
│ ├─ Neck.firmament exact six-section neck and published ports
│ └─ tuners-assembly.firmament keyed tuner posts, washers and buttons
diff --git a/docs/public/firmament/concept-derivation.md b/docs/public/firmament/concept-derivation.md
new file mode 100644
index 00000000..83769bbe
--- /dev/null
+++ b/docs/public/firmament/concept-derivation.md
@@ -0,0 +1,141 @@
+# Derived Concept frames and reusable boundaries
+
+Concept values derive from authored semantic geometry and supply explicit placement
+contracts to material consumers. They create no solids or product occurrences.
+Profile, SectionChain and assembly placement keep their existing geometry owners.
+
+## Published-frame-derived assembly planes
+
+```firmament
+Concept Struct Layout {
+ Plane Deck { From: Test.Base.Top.Frame; Offset: 2mm; Clocking: 90deg }
+ DatumFrame Mount { On: Deck; At: [4mm,0mm]; X: [1,0] }
+}
+```
+
+The source is a published exact DatumFrame on an independently placed direct Part
+in the owning assembly. Explicit transforms and Placement to World are admitted;
+Placement may start at Origin or a published local frame. Offset moves along the
+source normal; Clocking rotates its in-plane axes. Both default to zero and require
+finite mm/deg values. A derived plane cannot also declare Origin/Normal/Up.
+Same-scope Concept planes may derive from one another, with cycles rejected.
+
+The guitar uses a definition-owned publication:
+
+```firmament
+Concept Struct GuitarLayout {
+ Plane HardwareDeck {
+ From: SectionChainFile<"CarvedMaple.firmament">.TopSeat.Frame
+ Offset: 0mm
+ Clocking: 0deg
+ }
+ DatumFrame BridgeSeat { On: HardwareDeck; At: [0mm,-35mm]; X: [1,0] }
+}
+```
+
+SectionChainFile/LoftFile sources bind without materialization through the existing
+publication binder. Definition frames import into the owning assembly's local
+coordinates; they do not follow an occurrence's world transform. CarvedMaple
+publishes TopSeat from its actual S4 section frame, so the 53mm height has one
+authored owner. Existing Fixed seating and material-contact checks remain.
+
+Derivation from the occurrence being placed by the datum is rejected. Arbitrary
+references through moved/private subassemblies, mate-dependent source placement,
+tangent-surface evaluation and directional projection remain outside this lane.
+An offset datum is design geometry; it does not itself prove contact with its source.
+
+## Reusable named profile boundaries
+
+```firmament
+Include "body-outline.firmament";
+Model CarvedMaple {
+ Units: mm
+ Concept Struct SectionLayout {
+ Curve2 Outline {
+ From: BodyOutline
+ On: XY
+ Translate: [0mm,0mm]
+ Rotate: 0deg
+ Scale: 0.72
+ Pivot: [0mm,-25mm]
+ }
+ }
+ Profile Crown Using SectionLayout { Loop Outer { Outline |> TraceLoop } }
+ // Crown can now be consumed by an ordinary Extrude or SectionChain.
+}
+```
+
+From names an existing single-loop Profile value, optionally supplied by a shared
+source module. It never selects an unnamed BRep edge or walks a material part's
+private geometry. On is XY or an authored Concept plane, qualified when necessary.
+Curve references can also be qualified as SectionLayout.Outline.
+
+The transform applies positive uniform Scale about Pivot, then Rotate about Pivot,
+then Translate. Defaults are scale one, zero pivot/translation/rotation. Scaling
+was admitted for the guitar's tapered carve sections; it preserves the supported
+exact curve families. This is placement of local boundary coordinates, not spatial
+projection or a geometric curve offset. Nonuniform scaling is not admitted.
+
+Lines, circular arcs, circles, ellipses and cubic Beziers retain their exact resolved
+representations. Profiles have new identities while retaining segment names, source
+segment provenance and Concept derivation. Closure, winding and supported
+intersection checks remain with ordinary Profile validation; surfacing validity
+remains with SectionChain. This operation does not claim a stronger intersection
+proof. Cyclic derivations, unresolved planes/sources, duplicate fields and invalid
+units fail with diagnostics.
+
+## Files, caching and inspection
+
+SectionChainFile/LoftFile resources use the existing Include source-graph loader for
+both authored ports and materialization. Compilation-session keys include expanded
+transitive source. Missing files and Include cycles cannot reuse cached geometry.
+Snapshot Includes follow existing project-root-relative semantics; filesystem
+Includes resolve relative to their source document.
+
+SectionChainAuthoringParser.CompileFile and CLI section-chain operations use the
+same loader. Compile(source) remains an already-loaded-source API. CLI section-chain
+inspection exposes profileDerivations; assembly definition provenance retains
+concept-boundary-placement, and instance provenance retains concept-datum-derivation.
+
+The guitar has one body-outline module and nine small Concept placements for the
+back, binding and carved top. Editing the shared outline rebuilds those three
+definitions and reuses the other 50. Datum-only edits reuse geometry and recompute
+placement and seating validation. Dependency evaluation is bounded and recursive.
+
+## Guitar qualification
+
+The three body sources plus their shared outline dropped from 901 to 193 lines.
+The actual bound SectionChain comparison preserves section frames, seam identities,
+span identities, degrees and knots. The maximum control-coordinate difference is
+0.000000664mm, from replacing the legacy generator's independently rounded station
+coordinates with shared authored controls. Exact BRep topology counts and reported
+body bounds are unchanged; STEP hashes differ, so byte-identical geometry is not
+claimed across the migration.
+
+The Release solution build, fast core lane (1,004 tests), and full serial solution
+lane (4,077 tests) passed. Sixteen derivation tests passed, including
+published source geometry rotated 90 degrees about Y, offset seating, clocking,
+cache reuse, invalid dependencies, duplicate-datum diagnostics and transitive
+Include failures. Fresh CLI
+inspection reports nine profile derivations and all four material seats passing.
+
+Fresh-process cold compilation measured 11.056 seconds, warm uncached 4.785 seconds,
+and populated-session recompilation 0.868 seconds. The cached run reused all 53
+definitions and produced byte-identical USD to the same-run uncached baseline.
+Display preparation measured 0.411 / 0.314 / 0.227 seconds respectively. Process
+startup and dotnet build are excluded. This is one host run, not a benchmark against
+another CAD product. No browser camera-interaction qualification was repeated.
+
+Evidence and fresh exports are under ignored `artifacts/local/guitar-concept-derivation/`:
+`final-build.log`, `final-fast.log`, `final-full.log`, `final-focused.log`,
+`final-inspection.json`, `final-body-inspection.json`, `geometry-parity.json`,
+`timings.json`, `guitar.step`, `step-export.json`, `guitar.usda`, and `usd-evidence.json`.
+STEP export reports 126 occurrences excluding the root and 60 definitions; USD
+reports 53 mesh definitions and 127 total occurrences including the root.
+
+STEP reimport also succeeded with 53 geometry definitions and 126 occurrences,
+including 35 subassembly occurrences. `step-reimport.json` records the round-trip.
+The refreshed 1,800 by 1,800 Cycles side render was visually inspected and preserves
+bridge contact; it took 66.2 seconds at 64 samples. `deck-side.png`, `render.json`
+and `guitar-studio.blend` are in the same artifact directory. Render coloration is
+downstream; body geometry comes from the Firmament compilation.
diff --git a/docs/public/firmament/datum-seating.md b/docs/public/firmament/datum-seating.md
index 52539610..40e23c6c 100644
--- a/docs/public/firmament/datum-seating.md
+++ b/docs/public/firmament/datum-seating.md
@@ -41,6 +41,10 @@ Each member must be realized once. Members are direct part ports within their
owning assembly; direct traversal through private subassembly children is not
admitted. Concept structures inside part definitions remain part-owned.
+Planes can also derive from published frames with Offset/Clocking; see
+[derived Concept frames and boundaries](concept-derivation.md) for supported
+sources, dependency rules and the guitar's current shared-outline authoring.
+
Reusable subassemblies can share the same layout declaration, with scoped seating
contracts for their own parts. Frames are interpreted in the owning assembly's
coordinates, following the existing local-definition model. The guitar's owning
@@ -66,7 +70,8 @@ or screw engagement. Existing mate residual and solid-interference checks remain
## Guitar migration
[`hardware-layout.firmament`](../../../fixtures/Canonical/AssemblyInterfaces/GuitarX0/hardware-layout.firmament)
-owns the single 53mm HardwareDeck and the body, pickup and bridge target frames.
+owns HardwareDeck and the body, pickup and bridge target frames. HardwareDeck now
+derives from CarvedMaple's published top-section frame, whose authored height is 53mm.
Body, pickup and bridge subassemblies reference that plane through scoped Fixed
contracts. Their seating ports are published by the part definitions.
@@ -89,8 +94,8 @@ passing with zero plane residual. Moving only the Concept deck in the regression
reuses the two part geometry definitions and recomputes their assembly placement.
AP242 export and CLI reimport succeeded with 126 occurrences excluding the root.
-Export reports 60 definitions; reimport reports 53 geometry definitions and seven
-subassemblies.
+Export reports 60 definitions (53 geometry and seven assembly definitions);
+reimport reports 53 geometry definitions and 35 subassembly occurrences.
USD export and Blender Cycles rendering also succeeded. The refreshed hero and
close side image were visually inspected; the side image shows bridge contact
with the body. This change did not repeat browser camera-interaction qualification.
diff --git a/docs/public/firmament/syntax.md b/docs/public/firmament/syntax.md
index 0bb27ac1..390e7571 100644
--- a/docs/public/firmament/syntax.md
+++ b/docs/public/firmament/syntax.md
@@ -216,6 +216,10 @@ For X1, Feature is supported by the `Mechanical` frontend. `WireForm`, `Sweep`,
## Finite Profile and Path composition
+Named single-loop Profiles can be placed through Concept Curve2 values before
+being traced into a new Profile. See [Concept derivation](concept-derivation.md)
+for From/On/Translate/Rotate and bounded uniform Scale/Pivot syntax.
+
`|>` composes compatible semantic geometry in a finite authoring pipeline. In a Profile loop, each source span is traced in authored order and automatically oriented to continue from the preceding endpoint:
```firmament
diff --git a/fixtures/Canonical/AssemblyInterfaces/GuitarX0/CarvedMaple.firmament b/fixtures/Canonical/AssemblyInterfaces/GuitarX0/CarvedMaple.firmament
index 1f38b911..e2ebf7fe 100644
--- a/fixtures/Canonical/AssemblyInterfaces/GuitarX0/CarvedMaple.firmament
+++ b/fixtures/Canonical/AssemblyInterfaces/GuitarX0/CarvedMaple.firmament
@@ -1,3 +1,4 @@
+Include "body-outline.firmament";
Model CarvedMaple {
Units: mm
Concept Struct Frames {
@@ -7,471 +8,23 @@ Model CarvedMaple {
S3: Plane { Origin: [0mm,0mm,52mm]; Normal: [0,0,1]; Up: [0,1,0] }
S4: Plane { Origin: [0mm,0mm,53mm]; Normal: [0,0,1]; Up: [0,1,0] }
}
+ Concept Struct SectionLayout {
+ Curve2 Outline0 { From: BodyOutline; On: XY; Scale: 0.992; Pivot: [0mm,-25mm]; Translate: [0mm,0mm]; Rotate: 0deg }
+ Curve2 Outline1 { From: BodyOutline; On: XY; Scale: 0.955; Pivot: [0mm,-25mm]; Translate: [0mm,0mm]; Rotate: 0deg }
+ Curve2 Outline2 { From: BodyOutline; On: XY; Scale: 0.84; Pivot: [0mm,-25mm]; Translate: [0mm,0mm]; Rotate: 0deg }
+ Curve2 Outline3 { From: BodyOutline; On: XY; Scale: 0.76; Pivot: [0mm,-25mm]; Translate: [0mm,0mm]; Rotate: 0deg }
+ Curve2 Outline4 { From: BodyOutline; On: XY; Scale: 0.72; Pivot: [0mm,-25mm]; Translate: [0mm,0mm]; Rotate: 0deg }
+ }
Construction Plane F0 { Trace: Frames.S0 }
- Point2 P0P0 { Position: [0mm,-218.44mm] }
- Point2 P0A0 { Position: [38.026667mm,-218.44mm] }
- Point2 P0B0 { Position: [-38.026667mm,-218.44mm] }
- Point2 P0P1 { Position: [114.08mm,-193.64mm] }
- Point2 P0A1 { Position: [141.856mm,-176.28mm] }
- Point2 P0B1 { Position: [86.304mm,-211mm] }
- Point2 P0P2 { Position: [166.656mm,-114.28mm] }
- Point2 P0A2 { Position: [172.112mm,-87.826667mm] }
- Point2 P0B2 { Position: [161.2mm,-140.733333mm] }
- Point2 P0P3 { Position: [146.816mm,-34.92mm] }
- Point2 P0A3 { Position: [136.4mm,-11.277333mm] }
- Point2 P0B3 { Position: [157.232mm,-58.562667mm] }
- Point2 P0P4 { Position: [104.16mm,27.576mm] }
- Point2 P0A4 { Position: [99.2mm,49.069333mm] }
- Point2 P0B4 { Position: [109.12mm,6.082667mm] }
- Point2 P0P5 { Position: [117.056mm,94.04mm] }
- Point2 P0A5 { Position: [120.197333mm,112.557333mm] }
- Point2 P0B5 { Position: [113.914667mm,75.522667mm] }
- Point2 P0P6 { Position: [123.008mm,138.68mm] }
- Point2 P0A6 { Position: [122.181333mm,149.426667mm] }
- Point2 P0B6 { Position: [123.834667mm,127.933333mm] }
- Point2 P0P7 { Position: [112.096mm,158.52mm] }
- Point2 P0A7 { Position: [106.64mm,158.850667mm] }
- Point2 P0B7 { Position: [117.552mm,158.189333mm] }
- Point2 P0P8 { Position: [90.272mm,140.664mm] }
- Point2 P0A8 { Position: [79.525333mm,136.861333mm] }
- Point2 P0B8 { Position: [101.018667mm,144.466667mm] }
- Point2 P0P9 { Position: [47.616mm,135.704mm] }
- Point2 P0A9 { Position: [37.2mm,145.954667mm] }
- Point2 P0B9 { Position: [58.032mm,125.453333mm] }
- Point2 P0P10 { Position: [27.776mm,202.168mm] }
- Point2 P0A10 { Position: [12.896mm,213.410667mm] }
- Point2 P0B10 { Position: [42.656mm,190.925333mm] }
- Point2 P0P11 { Position: [-41.664mm,203.16mm] }
- Point2 P0A11 { Position: [-64.645333mm,198.2mm] }
- Point2 P0B11 { Position: [-18.682667mm,208.12mm] }
- Point2 P0P12 { Position: [-110.112mm,172.408mm] }
- Point2 P0A12 { Position: [-122.842667mm,157.528mm] }
- Point2 P0B12 { Position: [-97.381333mm,187.288mm] }
- Point2 P0P13 { Position: [-118.048mm,113.88mm] }
- Point2 P0A13 { Position: [-115.402667mm,91.725333mm] }
- Point2 P0B13 { Position: [-120.693333mm,136.034667mm] }
- Point2 P0P14 { Position: [-94.24mm,39.48mm] }
- Point2 P0A14 { Position: [-97.216mm,15.176mm] }
- Point2 P0B14 { Position: [-91.264mm,63.784mm] }
- Point2 P0P15 { Position: [-135.904mm,-31.944mm] }
- Point2 P0A15 { Position: [-147.973333mm,-57.570667mm] }
- Point2 P0B15 { Position: [-123.834667mm,-6.317333mm] }
- Point2 P0P16 { Position: [-166.656mm,-114.28mm] }
- Point2 P0A16 { Position: [-163.018667mm,-141.229333mm] }
- Point2 P0B16 { Position: [-170.293333mm,-87.330667mm] }
- Point2 P0P17 { Position: [-114.08mm,-193.64mm] }
- Point2 P0A17 { Position: [-86.304mm,-211mm] }
- Point2 P0B17 { Position: [-141.856mm,-176.28mm] }
- CubicBezier2 P0C0 { From: P0P0; Control1: P0A0; Control2: P0B1; To: P0P1 }
- CubicBezier2 P0C1 { From: P0P1; Control1: P0A1; Control2: P0B2; To: P0P2 }
- CubicBezier2 P0C2 { From: P0P2; Control1: P0A2; Control2: P0B3; To: P0P3 }
- CubicBezier2 P0C3 { From: P0P3; Control1: P0A3; Control2: P0B4; To: P0P4 }
- CubicBezier2 P0C4 { From: P0P4; Control1: P0A4; Control2: P0B5; To: P0P5 }
- CubicBezier2 P0C5 { From: P0P5; Control1: P0A5; Control2: P0B6; To: P0P6 }
- CubicBezier2 P0C6 { From: P0P6; Control1: P0A6; Control2: P0B7; To: P0P7 }
- CubicBezier2 P0C7 { From: P0P7; Control1: P0A7; Control2: P0B8; To: P0P8 }
- CubicBezier2 P0C8 { From: P0P8; Control1: P0A8; Control2: P0B9; To: P0P9 }
- CubicBezier2 P0C9 { From: P0P9; Control1: P0A9; Control2: P0B10; To: P0P10 }
- CubicBezier2 P0C10 { From: P0P10; Control1: P0A10; Control2: P0B11; To: P0P11 }
- CubicBezier2 P0C11 { From: P0P11; Control1: P0A11; Control2: P0B12; To: P0P12 }
- CubicBezier2 P0C12 { From: P0P12; Control1: P0A12; Control2: P0B13; To: P0P13 }
- CubicBezier2 P0C13 { From: P0P13; Control1: P0A13; Control2: P0B14; To: P0P14 }
- CubicBezier2 P0C14 { From: P0P14; Control1: P0A14; Control2: P0B15; To: P0P15 }
- CubicBezier2 P0C15 { From: P0P15; Control1: P0A15; Control2: P0B16; To: P0P16 }
- CubicBezier2 P0C16 { From: P0P16; Control1: P0A16; Control2: P0B17; To: P0P17 }
- CubicBezier2 P0C17 { From: P0P17; Control1: P0A17; Control2: P0B0; To: P0P0 }
- Profile P0 { Loop Outer {
- Segment Edge0 { Trace: P0C0; From: P0P0; To: P0P1 }
- Segment Edge1 { Trace: P0C1; From: P0P1; To: P0P2 }
- Segment Edge2 { Trace: P0C2; From: P0P2; To: P0P3 }
- Segment Edge3 { Trace: P0C3; From: P0P3; To: P0P4 }
- Segment Edge4 { Trace: P0C4; From: P0P4; To: P0P5 }
- Segment Edge5 { Trace: P0C5; From: P0P5; To: P0P6 }
- Segment Edge6 { Trace: P0C6; From: P0P6; To: P0P7 }
- Segment Edge7 { Trace: P0C7; From: P0P7; To: P0P8 }
- Segment Edge8 { Trace: P0C8; From: P0P8; To: P0P9 }
- Segment Edge9 { Trace: P0C9; From: P0P9; To: P0P10 }
- Segment Edge10 { Trace: P0C10; From: P0P10; To: P0P11 }
- Segment Edge11 { Trace: P0C11; From: P0P11; To: P0P12 }
- Segment Edge12 { Trace: P0C12; From: P0P12; To: P0P13 }
- Segment Edge13 { Trace: P0C13; From: P0P13; To: P0P14 }
- Segment Edge14 { Trace: P0C14; From: P0P14; To: P0P15 }
- Segment Edge15 { Trace: P0C15; From: P0P15; To: P0P16 }
- Segment Edge16 { Trace: P0C16; From: P0P16; To: P0P17 }
- Segment Edge17 { Trace: P0C17; From: P0P17; To: P0P0 }
- } }
+ Profile P0 Using SectionLayout { Loop Outer { Outline0 |> TraceLoop } }
Construction Plane F1 { Trace: Frames.S1 }
- Point2 P1P0 { Position: [0mm,-211.225mm] }
- Point2 P1A0 { Position: [36.608333mm,-211.225mm] }
- Point2 P1B0 { Position: [-36.608333mm,-211.225mm] }
- Point2 P1P1 { Position: [109.825mm,-187.35mm] }
- Point2 P1A1 { Position: [136.565mm,-170.6375mm] }
- Point2 P1B1 { Position: [83.085mm,-204.0625mm] }
- Point2 P1P2 { Position: [160.44mm,-110.95mm] }
- Point2 P1A2 { Position: [165.6925mm,-85.483333mm] }
- Point2 P1B2 { Position: [155.1875mm,-136.416667mm] }
- Point2 P1P3 { Position: [141.34mm,-34.55mm] }
- Point2 P1A3 { Position: [131.3125mm,-11.789167mm] }
- Point2 P1B3 { Position: [151.3675mm,-57.310833mm] }
- Point2 P1P4 { Position: [100.275mm,25.615mm] }
- Point2 P1A4 { Position: [95.5mm,46.306667mm] }
- Point2 P1B4 { Position: [105.05mm,4.923333mm] }
- Point2 P1P5 { Position: [112.69mm,89.6mm] }
- Point2 P1A5 { Position: [115.714167mm,107.426667mm] }
- Point2 P1B5 { Position: [109.665833mm,71.773333mm] }
- Point2 P1P6 { Position: [118.42mm,132.575mm] }
- Point2 P1A6 { Position: [117.624167mm,142.920833mm] }
- Point2 P1B6 { Position: [119.215833mm,122.229167mm] }
- Point2 P1P7 { Position: [107.915mm,151.675mm] }
- Point2 P1A7 { Position: [102.6625mm,151.993333mm] }
- Point2 P1B7 { Position: [113.1675mm,151.356667mm] }
- Point2 P1P8 { Position: [86.905mm,134.485mm] }
- Point2 P1A8 { Position: [76.559167mm,130.824167mm] }
- Point2 P1B8 { Position: [97.250833mm,138.145833mm] }
- Point2 P1P9 { Position: [45.84mm,129.71mm] }
- Point2 P1A9 { Position: [35.8125mm,139.578333mm] }
- Point2 P1B9 { Position: [55.8675mm,119.841667mm] }
- Point2 P1P10 { Position: [26.74mm,193.695mm] }
- Point2 P1A10 { Position: [12.415mm,204.518333mm] }
- Point2 P1B10 { Position: [41.065mm,182.871667mm] }
- Point2 P1P11 { Position: [-40.11mm,194.65mm] }
- Point2 P1A11 { Position: [-62.234167mm,189.875mm] }
- Point2 P1B11 { Position: [-17.985833mm,199.425mm] }
- Point2 P1P12 { Position: [-106.005mm,165.045mm] }
- Point2 P1A12 { Position: [-118.260833mm,150.72mm] }
- Point2 P1B12 { Position: [-93.749167mm,179.37mm] }
- Point2 P1P13 { Position: [-113.645mm,108.7mm] }
- Point2 P1A13 { Position: [-111.098333mm,87.371667mm] }
- Point2 P1B13 { Position: [-116.191667mm,130.028333mm] }
- Point2 P1P14 { Position: [-90.725mm,37.075mm] }
- Point2 P1A14 { Position: [-93.59mm,13.6775mm] }
- Point2 P1B14 { Position: [-87.86mm,60.4725mm] }
- Point2 P1P15 { Position: [-130.835mm,-31.685mm] }
- Point2 P1A15 { Position: [-142.454167mm,-56.355833mm] }
- Point2 P1B15 { Position: [-119.215833mm,-7.014167mm] }
- Point2 P1P16 { Position: [-160.44mm,-110.95mm] }
- Point2 P1A16 { Position: [-156.938333mm,-136.894167mm] }
- Point2 P1B16 { Position: [-163.941667mm,-85.005833mm] }
- Point2 P1P17 { Position: [-109.825mm,-187.35mm] }
- Point2 P1A17 { Position: [-83.085mm,-204.0625mm] }
- Point2 P1B17 { Position: [-136.565mm,-170.6375mm] }
- CubicBezier2 P1C0 { From: P1P0; Control1: P1A0; Control2: P1B1; To: P1P1 }
- CubicBezier2 P1C1 { From: P1P1; Control1: P1A1; Control2: P1B2; To: P1P2 }
- CubicBezier2 P1C2 { From: P1P2; Control1: P1A2; Control2: P1B3; To: P1P3 }
- CubicBezier2 P1C3 { From: P1P3; Control1: P1A3; Control2: P1B4; To: P1P4 }
- CubicBezier2 P1C4 { From: P1P4; Control1: P1A4; Control2: P1B5; To: P1P5 }
- CubicBezier2 P1C5 { From: P1P5; Control1: P1A5; Control2: P1B6; To: P1P6 }
- CubicBezier2 P1C6 { From: P1P6; Control1: P1A6; Control2: P1B7; To: P1P7 }
- CubicBezier2 P1C7 { From: P1P7; Control1: P1A7; Control2: P1B8; To: P1P8 }
- CubicBezier2 P1C8 { From: P1P8; Control1: P1A8; Control2: P1B9; To: P1P9 }
- CubicBezier2 P1C9 { From: P1P9; Control1: P1A9; Control2: P1B10; To: P1P10 }
- CubicBezier2 P1C10 { From: P1P10; Control1: P1A10; Control2: P1B11; To: P1P11 }
- CubicBezier2 P1C11 { From: P1P11; Control1: P1A11; Control2: P1B12; To: P1P12 }
- CubicBezier2 P1C12 { From: P1P12; Control1: P1A12; Control2: P1B13; To: P1P13 }
- CubicBezier2 P1C13 { From: P1P13; Control1: P1A13; Control2: P1B14; To: P1P14 }
- CubicBezier2 P1C14 { From: P1P14; Control1: P1A14; Control2: P1B15; To: P1P15 }
- CubicBezier2 P1C15 { From: P1P15; Control1: P1A15; Control2: P1B16; To: P1P16 }
- CubicBezier2 P1C16 { From: P1P16; Control1: P1A16; Control2: P1B17; To: P1P17 }
- CubicBezier2 P1C17 { From: P1P17; Control1: P1A17; Control2: P1B0; To: P1P0 }
- Profile P1 { Loop Outer {
- Segment Edge0 { Trace: P1C0; From: P1P0; To: P1P1 }
- Segment Edge1 { Trace: P1C1; From: P1P1; To: P1P2 }
- Segment Edge2 { Trace: P1C2; From: P1P2; To: P1P3 }
- Segment Edge3 { Trace: P1C3; From: P1P3; To: P1P4 }
- Segment Edge4 { Trace: P1C4; From: P1P4; To: P1P5 }
- Segment Edge5 { Trace: P1C5; From: P1P5; To: P1P6 }
- Segment Edge6 { Trace: P1C6; From: P1P6; To: P1P7 }
- Segment Edge7 { Trace: P1C7; From: P1P7; To: P1P8 }
- Segment Edge8 { Trace: P1C8; From: P1P8; To: P1P9 }
- Segment Edge9 { Trace: P1C9; From: P1P9; To: P1P10 }
- Segment Edge10 { Trace: P1C10; From: P1P10; To: P1P11 }
- Segment Edge11 { Trace: P1C11; From: P1P11; To: P1P12 }
- Segment Edge12 { Trace: P1C12; From: P1P12; To: P1P13 }
- Segment Edge13 { Trace: P1C13; From: P1P13; To: P1P14 }
- Segment Edge14 { Trace: P1C14; From: P1P14; To: P1P15 }
- Segment Edge15 { Trace: P1C15; From: P1P15; To: P1P16 }
- Segment Edge16 { Trace: P1C16; From: P1P16; To: P1P17 }
- Segment Edge17 { Trace: P1C17; From: P1P17; To: P1P0 }
- } }
+ Profile P1 Using SectionLayout { Loop Outer { Outline1 |> TraceLoop } }
Construction Plane F2 { Trace: Frames.S2 }
- Point2 P2P0 { Position: [0mm,-188.8mm] }
- Point2 P2A0 { Position: [32.2mm,-188.8mm] }
- Point2 P2B0 { Position: [-32.2mm,-188.8mm] }
- Point2 P2P1 { Position: [96.6mm,-167.8mm] }
- Point2 P2A1 { Position: [120.12mm,-153.1mm] }
- Point2 P2B1 { Position: [73.08mm,-182.5mm] }
- Point2 P2P2 { Position: [141.12mm,-100.6mm] }
- Point2 P2A2 { Position: [145.74mm,-78.2mm] }
- Point2 P2B2 { Position: [136.5mm,-123mm] }
- Point2 P2P3 { Position: [124.32mm,-33.4mm] }
- Point2 P2A3 { Position: [115.5mm,-13.38mm] }
- Point2 P2B3 { Position: [133.14mm,-53.42mm] }
- Point2 P2P4 { Position: [88.2mm,19.52mm] }
- Point2 P2A4 { Position: [84mm,37.72mm] }
- Point2 P2B4 { Position: [92.4mm,1.32mm] }
- Point2 P2P5 { Position: [99.12mm,75.8mm] }
- Point2 P2A5 { Position: [101.78mm,91.48mm] }
- Point2 P2B5 { Position: [96.46mm,60.12mm] }
- Point2 P2P6 { Position: [104.16mm,113.6mm] }
- Point2 P2A6 { Position: [103.46mm,122.7mm] }
- Point2 P2B6 { Position: [104.86mm,104.5mm] }
- Point2 P2P7 { Position: [94.92mm,130.4mm] }
- Point2 P2A7 { Position: [90.3mm,130.68mm] }
- Point2 P2B7 { Position: [99.54mm,130.12mm] }
- Point2 P2P8 { Position: [76.44mm,115.28mm] }
- Point2 P2A8 { Position: [67.34mm,112.06mm] }
- Point2 P2B8 { Position: [85.54mm,118.5mm] }
- Point2 P2P9 { Position: [40.32mm,111.08mm] }
- Point2 P2A9 { Position: [31.5mm,119.76mm] }
- Point2 P2B9 { Position: [49.14mm,102.4mm] }
- Point2 P2P10 { Position: [23.52mm,167.36mm] }
- Point2 P2A10 { Position: [10.92mm,176.88mm] }
- Point2 P2B10 { Position: [36.12mm,157.84mm] }
- Point2 P2P11 { Position: [-35.28mm,168.2mm] }
- Point2 P2A11 { Position: [-54.74mm,164mm] }
- Point2 P2B11 { Position: [-15.82mm,172.4mm] }
- Point2 P2P12 { Position: [-93.24mm,142.16mm] }
- Point2 P2A12 { Position: [-104.02mm,129.56mm] }
- Point2 P2B12 { Position: [-82.46mm,154.76mm] }
- Point2 P2P13 { Position: [-99.96mm,92.6mm] }
- Point2 P2A13 { Position: [-97.72mm,73.84mm] }
- Point2 P2B13 { Position: [-102.2mm,111.36mm] }
- Point2 P2P14 { Position: [-79.8mm,29.6mm] }
- Point2 P2A14 { Position: [-82.32mm,9.02mm] }
- Point2 P2B14 { Position: [-77.28mm,50.18mm] }
- Point2 P2P15 { Position: [-115.08mm,-30.88mm] }
- Point2 P2A15 { Position: [-125.3mm,-52.58mm] }
- Point2 P2B15 { Position: [-104.86mm,-9.18mm] }
- Point2 P2P16 { Position: [-141.12mm,-100.6mm] }
- Point2 P2A16 { Position: [-138.04mm,-123.42mm] }
- Point2 P2B16 { Position: [-144.2mm,-77.78mm] }
- Point2 P2P17 { Position: [-96.6mm,-167.8mm] }
- Point2 P2A17 { Position: [-73.08mm,-182.5mm] }
- Point2 P2B17 { Position: [-120.12mm,-153.1mm] }
- CubicBezier2 P2C0 { From: P2P0; Control1: P2A0; Control2: P2B1; To: P2P1 }
- CubicBezier2 P2C1 { From: P2P1; Control1: P2A1; Control2: P2B2; To: P2P2 }
- CubicBezier2 P2C2 { From: P2P2; Control1: P2A2; Control2: P2B3; To: P2P3 }
- CubicBezier2 P2C3 { From: P2P3; Control1: P2A3; Control2: P2B4; To: P2P4 }
- CubicBezier2 P2C4 { From: P2P4; Control1: P2A4; Control2: P2B5; To: P2P5 }
- CubicBezier2 P2C5 { From: P2P5; Control1: P2A5; Control2: P2B6; To: P2P6 }
- CubicBezier2 P2C6 { From: P2P6; Control1: P2A6; Control2: P2B7; To: P2P7 }
- CubicBezier2 P2C7 { From: P2P7; Control1: P2A7; Control2: P2B8; To: P2P8 }
- CubicBezier2 P2C8 { From: P2P8; Control1: P2A8; Control2: P2B9; To: P2P9 }
- CubicBezier2 P2C9 { From: P2P9; Control1: P2A9; Control2: P2B10; To: P2P10 }
- CubicBezier2 P2C10 { From: P2P10; Control1: P2A10; Control2: P2B11; To: P2P11 }
- CubicBezier2 P2C11 { From: P2P11; Control1: P2A11; Control2: P2B12; To: P2P12 }
- CubicBezier2 P2C12 { From: P2P12; Control1: P2A12; Control2: P2B13; To: P2P13 }
- CubicBezier2 P2C13 { From: P2P13; Control1: P2A13; Control2: P2B14; To: P2P14 }
- CubicBezier2 P2C14 { From: P2P14; Control1: P2A14; Control2: P2B15; To: P2P15 }
- CubicBezier2 P2C15 { From: P2P15; Control1: P2A15; Control2: P2B16; To: P2P16 }
- CubicBezier2 P2C16 { From: P2P16; Control1: P2A16; Control2: P2B17; To: P2P17 }
- CubicBezier2 P2C17 { From: P2P17; Control1: P2A17; Control2: P2B0; To: P2P0 }
- Profile P2 { Loop Outer {
- Segment Edge0 { Trace: P2C0; From: P2P0; To: P2P1 }
- Segment Edge1 { Trace: P2C1; From: P2P1; To: P2P2 }
- Segment Edge2 { Trace: P2C2; From: P2P2; To: P2P3 }
- Segment Edge3 { Trace: P2C3; From: P2P3; To: P2P4 }
- Segment Edge4 { Trace: P2C4; From: P2P4; To: P2P5 }
- Segment Edge5 { Trace: P2C5; From: P2P5; To: P2P6 }
- Segment Edge6 { Trace: P2C6; From: P2P6; To: P2P7 }
- Segment Edge7 { Trace: P2C7; From: P2P7; To: P2P8 }
- Segment Edge8 { Trace: P2C8; From: P2P8; To: P2P9 }
- Segment Edge9 { Trace: P2C9; From: P2P9; To: P2P10 }
- Segment Edge10 { Trace: P2C10; From: P2P10; To: P2P11 }
- Segment Edge11 { Trace: P2C11; From: P2P11; To: P2P12 }
- Segment Edge12 { Trace: P2C12; From: P2P12; To: P2P13 }
- Segment Edge13 { Trace: P2C13; From: P2P13; To: P2P14 }
- Segment Edge14 { Trace: P2C14; From: P2P14; To: P2P15 }
- Segment Edge15 { Trace: P2C15; From: P2P15; To: P2P16 }
- Segment Edge16 { Trace: P2C16; From: P2P16; To: P2P17 }
- Segment Edge17 { Trace: P2C17; From: P2P17; To: P2P0 }
- } }
+ Profile P2 Using SectionLayout { Loop Outer { Outline2 |> TraceLoop } }
Construction Plane F3 { Trace: Frames.S3 }
- Point2 P3P0 { Position: [0mm,-173.2mm] }
- Point2 P3A0 { Position: [29.133333mm,-173.2mm] }
- Point2 P3B0 { Position: [-29.133333mm,-173.2mm] }
- Point2 P3P1 { Position: [87.4mm,-154.2mm] }
- Point2 P3A1 { Position: [108.68mm,-140.9mm] }
- Point2 P3B1 { Position: [66.12mm,-167.5mm] }
- Point2 P3P2 { Position: [127.68mm,-93.4mm] }
- Point2 P3A2 { Position: [131.86mm,-73.133333mm] }
- Point2 P3B2 { Position: [123.5mm,-113.666667mm] }
- Point2 P3P3 { Position: [112.48mm,-32.6mm] }
- Point2 P3A3 { Position: [104.5mm,-14.486667mm] }
- Point2 P3B3 { Position: [120.46mm,-50.713333mm] }
- Point2 P3P4 { Position: [79.8mm,15.28mm] }
- Point2 P3A4 { Position: [76mm,31.746667mm] }
- Point2 P3B4 { Position: [83.6mm,-1.186667mm] }
- Point2 P3P5 { Position: [89.68mm,66.2mm] }
- Point2 P3A5 { Position: [92.086667mm,80.386667mm] }
- Point2 P3B5 { Position: [87.273333mm,52.013333mm] }
- Point2 P3P6 { Position: [94.24mm,100.4mm] }
- Point2 P3A6 { Position: [93.606667mm,108.633333mm] }
- Point2 P3B6 { Position: [94.873333mm,92.166667mm] }
- Point2 P3P7 { Position: [85.88mm,115.6mm] }
- Point2 P3A7 { Position: [81.7mm,115.853333mm] }
- Point2 P3B7 { Position: [90.06mm,115.346667mm] }
- Point2 P3P8 { Position: [69.16mm,101.92mm] }
- Point2 P3A8 { Position: [60.926667mm,99.006667mm] }
- Point2 P3B8 { Position: [77.393333mm,104.833333mm] }
- Point2 P3P9 { Position: [36.48mm,98.12mm] }
- Point2 P3A9 { Position: [28.5mm,105.973333mm] }
- Point2 P3B9 { Position: [44.46mm,90.266667mm] }
- Point2 P3P10 { Position: [21.28mm,149.04mm] }
- Point2 P3A10 { Position: [9.88mm,157.653333mm] }
- Point2 P3B10 { Position: [32.68mm,140.426667mm] }
- Point2 P3P11 { Position: [-31.92mm,149.8mm] }
- Point2 P3A11 { Position: [-49.526667mm,146mm] }
- Point2 P3B11 { Position: [-14.313333mm,153.6mm] }
- Point2 P3P12 { Position: [-84.36mm,126.24mm] }
- Point2 P3A12 { Position: [-94.113333mm,114.84mm] }
- Point2 P3B12 { Position: [-74.606667mm,137.64mm] }
- Point2 P3P13 { Position: [-90.44mm,81.4mm] }
- Point2 P3A13 { Position: [-88.413333mm,64.426667mm] }
- Point2 P3B13 { Position: [-92.466667mm,98.373333mm] }
- Point2 P3P14 { Position: [-72.2mm,24.4mm] }
- Point2 P3A14 { Position: [-74.48mm,5.78mm] }
- Point2 P3B14 { Position: [-69.92mm,43.02mm] }
- Point2 P3P15 { Position: [-104.12mm,-30.32mm] }
- Point2 P3A15 { Position: [-113.366667mm,-49.953333mm] }
- Point2 P3B15 { Position: [-94.873333mm,-10.686667mm] }
- Point2 P3P16 { Position: [-127.68mm,-93.4mm] }
- Point2 P3A16 { Position: [-124.893333mm,-114.046667mm] }
- Point2 P3B16 { Position: [-130.466667mm,-72.753333mm] }
- Point2 P3P17 { Position: [-87.4mm,-154.2mm] }
- Point2 P3A17 { Position: [-66.12mm,-167.5mm] }
- Point2 P3B17 { Position: [-108.68mm,-140.9mm] }
- CubicBezier2 P3C0 { From: P3P0; Control1: P3A0; Control2: P3B1; To: P3P1 }
- CubicBezier2 P3C1 { From: P3P1; Control1: P3A1; Control2: P3B2; To: P3P2 }
- CubicBezier2 P3C2 { From: P3P2; Control1: P3A2; Control2: P3B3; To: P3P3 }
- CubicBezier2 P3C3 { From: P3P3; Control1: P3A3; Control2: P3B4; To: P3P4 }
- CubicBezier2 P3C4 { From: P3P4; Control1: P3A4; Control2: P3B5; To: P3P5 }
- CubicBezier2 P3C5 { From: P3P5; Control1: P3A5; Control2: P3B6; To: P3P6 }
- CubicBezier2 P3C6 { From: P3P6; Control1: P3A6; Control2: P3B7; To: P3P7 }
- CubicBezier2 P3C7 { From: P3P7; Control1: P3A7; Control2: P3B8; To: P3P8 }
- CubicBezier2 P3C8 { From: P3P8; Control1: P3A8; Control2: P3B9; To: P3P9 }
- CubicBezier2 P3C9 { From: P3P9; Control1: P3A9; Control2: P3B10; To: P3P10 }
- CubicBezier2 P3C10 { From: P3P10; Control1: P3A10; Control2: P3B11; To: P3P11 }
- CubicBezier2 P3C11 { From: P3P11; Control1: P3A11; Control2: P3B12; To: P3P12 }
- CubicBezier2 P3C12 { From: P3P12; Control1: P3A12; Control2: P3B13; To: P3P13 }
- CubicBezier2 P3C13 { From: P3P13; Control1: P3A13; Control2: P3B14; To: P3P14 }
- CubicBezier2 P3C14 { From: P3P14; Control1: P3A14; Control2: P3B15; To: P3P15 }
- CubicBezier2 P3C15 { From: P3P15; Control1: P3A15; Control2: P3B16; To: P3P16 }
- CubicBezier2 P3C16 { From: P3P16; Control1: P3A16; Control2: P3B17; To: P3P17 }
- CubicBezier2 P3C17 { From: P3P17; Control1: P3A17; Control2: P3B0; To: P3P0 }
- Profile P3 { Loop Outer {
- Segment Edge0 { Trace: P3C0; From: P3P0; To: P3P1 }
- Segment Edge1 { Trace: P3C1; From: P3P1; To: P3P2 }
- Segment Edge2 { Trace: P3C2; From: P3P2; To: P3P3 }
- Segment Edge3 { Trace: P3C3; From: P3P3; To: P3P4 }
- Segment Edge4 { Trace: P3C4; From: P3P4; To: P3P5 }
- Segment Edge5 { Trace: P3C5; From: P3P5; To: P3P6 }
- Segment Edge6 { Trace: P3C6; From: P3P6; To: P3P7 }
- Segment Edge7 { Trace: P3C7; From: P3P7; To: P3P8 }
- Segment Edge8 { Trace: P3C8; From: P3P8; To: P3P9 }
- Segment Edge9 { Trace: P3C9; From: P3P9; To: P3P10 }
- Segment Edge10 { Trace: P3C10; From: P3P10; To: P3P11 }
- Segment Edge11 { Trace: P3C11; From: P3P11; To: P3P12 }
- Segment Edge12 { Trace: P3C12; From: P3P12; To: P3P13 }
- Segment Edge13 { Trace: P3C13; From: P3P13; To: P3P14 }
- Segment Edge14 { Trace: P3C14; From: P3P14; To: P3P15 }
- Segment Edge15 { Trace: P3C15; From: P3P15; To: P3P16 }
- Segment Edge16 { Trace: P3C16; From: P3P16; To: P3P17 }
- Segment Edge17 { Trace: P3C17; From: P3P17; To: P3P0 }
- } }
+ Profile P3 Using SectionLayout { Loop Outer { Outline3 |> TraceLoop } }
Construction Plane F4 { Trace: Frames.S4 }
- Point2 P4P0 { Position: [0mm,-165.4mm] }
- Point2 P4A0 { Position: [27.6mm,-165.4mm] }
- Point2 P4B0 { Position: [-27.6mm,-165.4mm] }
- Point2 P4P1 { Position: [82.8mm,-147.4mm] }
- Point2 P4A1 { Position: [102.96mm,-134.8mm] }
- Point2 P4B1 { Position: [62.64mm,-160mm] }
- Point2 P4P2 { Position: [120.96mm,-89.8mm] }
- Point2 P4A2 { Position: [124.92mm,-70.6mm] }
- Point2 P4B2 { Position: [117mm,-109mm] }
- Point2 P4P3 { Position: [106.56mm,-32.2mm] }
- Point2 P4A3 { Position: [99mm,-15.04mm] }
- Point2 P4B3 { Position: [114.12mm,-49.36mm] }
- Point2 P4P4 { Position: [75.6mm,13.16mm] }
- Point2 P4A4 { Position: [72mm,28.76mm] }
- Point2 P4B4 { Position: [79.2mm,-2.44mm] }
- Point2 P4P5 { Position: [84.96mm,61.4mm] }
- Point2 P4A5 { Position: [87.24mm,74.84mm] }
- Point2 P4B5 { Position: [82.68mm,47.96mm] }
- Point2 P4P6 { Position: [89.28mm,93.8mm] }
- Point2 P4A6 { Position: [88.68mm,101.6mm] }
- Point2 P4B6 { Position: [89.88mm,86mm] }
- Point2 P4P7 { Position: [81.36mm,108.2mm] }
- Point2 P4A7 { Position: [77.4mm,108.44mm] }
- Point2 P4B7 { Position: [85.32mm,107.96mm] }
- Point2 P4P8 { Position: [65.52mm,95.24mm] }
- Point2 P4A8 { Position: [57.72mm,92.48mm] }
- Point2 P4B8 { Position: [73.32mm,98mm] }
- Point2 P4P9 { Position: [34.56mm,91.64mm] }
- Point2 P4A9 { Position: [27mm,99.08mm] }
- Point2 P4B9 { Position: [42.12mm,84.2mm] }
- Point2 P4P10 { Position: [20.16mm,139.88mm] }
- Point2 P4A10 { Position: [9.36mm,148.04mm] }
- Point2 P4B10 { Position: [30.96mm,131.72mm] }
- Point2 P4P11 { Position: [-30.24mm,140.6mm] }
- Point2 P4A11 { Position: [-46.92mm,137mm] }
- Point2 P4B11 { Position: [-13.56mm,144.2mm] }
- Point2 P4P12 { Position: [-79.92mm,118.28mm] }
- Point2 P4A12 { Position: [-89.16mm,107.48mm] }
- Point2 P4B12 { Position: [-70.68mm,129.08mm] }
- Point2 P4P13 { Position: [-85.68mm,75.8mm] }
- Point2 P4A13 { Position: [-83.76mm,59.72mm] }
- Point2 P4B13 { Position: [-87.6mm,91.88mm] }
- Point2 P4P14 { Position: [-68.4mm,21.8mm] }
- Point2 P4A14 { Position: [-70.56mm,4.16mm] }
- Point2 P4B14 { Position: [-66.24mm,39.44mm] }
- Point2 P4P15 { Position: [-98.64mm,-30.04mm] }
- Point2 P4A15 { Position: [-107.4mm,-48.64mm] }
- Point2 P4B15 { Position: [-89.88mm,-11.44mm] }
- Point2 P4P16 { Position: [-120.96mm,-89.8mm] }
- Point2 P4A16 { Position: [-118.32mm,-109.36mm] }
- Point2 P4B16 { Position: [-123.6mm,-70.24mm] }
- Point2 P4P17 { Position: [-82.8mm,-147.4mm] }
- Point2 P4A17 { Position: [-62.64mm,-160mm] }
- Point2 P4B17 { Position: [-102.96mm,-134.8mm] }
- CubicBezier2 P4C0 { From: P4P0; Control1: P4A0; Control2: P4B1; To: P4P1 }
- CubicBezier2 P4C1 { From: P4P1; Control1: P4A1; Control2: P4B2; To: P4P2 }
- CubicBezier2 P4C2 { From: P4P2; Control1: P4A2; Control2: P4B3; To: P4P3 }
- CubicBezier2 P4C3 { From: P4P3; Control1: P4A3; Control2: P4B4; To: P4P4 }
- CubicBezier2 P4C4 { From: P4P4; Control1: P4A4; Control2: P4B5; To: P4P5 }
- CubicBezier2 P4C5 { From: P4P5; Control1: P4A5; Control2: P4B6; To: P4P6 }
- CubicBezier2 P4C6 { From: P4P6; Control1: P4A6; Control2: P4B7; To: P4P7 }
- CubicBezier2 P4C7 { From: P4P7; Control1: P4A7; Control2: P4B8; To: P4P8 }
- CubicBezier2 P4C8 { From: P4P8; Control1: P4A8; Control2: P4B9; To: P4P9 }
- CubicBezier2 P4C9 { From: P4P9; Control1: P4A9; Control2: P4B10; To: P4P10 }
- CubicBezier2 P4C10 { From: P4P10; Control1: P4A10; Control2: P4B11; To: P4P11 }
- CubicBezier2 P4C11 { From: P4P11; Control1: P4A11; Control2: P4B12; To: P4P12 }
- CubicBezier2 P4C12 { From: P4P12; Control1: P4A12; Control2: P4B13; To: P4P13 }
- CubicBezier2 P4C13 { From: P4P13; Control1: P4A13; Control2: P4B14; To: P4P14 }
- CubicBezier2 P4C14 { From: P4P14; Control1: P4A14; Control2: P4B15; To: P4P15 }
- CubicBezier2 P4C15 { From: P4P15; Control1: P4A15; Control2: P4B16; To: P4P16 }
- CubicBezier2 P4C16 { From: P4P16; Control1: P4A16; Control2: P4B17; To: P4P17 }
- CubicBezier2 P4C17 { From: P4P17; Control1: P4A17; Control2: P4B0; To: P4P0 }
- Profile P4 { Loop Outer {
- Segment Edge0 { Trace: P4C0; From: P4P0; To: P4P1 }
- Segment Edge1 { Trace: P4C1; From: P4P1; To: P4P2 }
- Segment Edge2 { Trace: P4C2; From: P4P2; To: P4P3 }
- Segment Edge3 { Trace: P4C3; From: P4P3; To: P4P4 }
- Segment Edge4 { Trace: P4C4; From: P4P4; To: P4P5 }
- Segment Edge5 { Trace: P4C5; From: P4P5; To: P4P6 }
- Segment Edge6 { Trace: P4C6; From: P4P6; To: P4P7 }
- Segment Edge7 { Trace: P4C7; From: P4P7; To: P4P8 }
- Segment Edge8 { Trace: P4C8; From: P4P8; To: P4P9 }
- Segment Edge9 { Trace: P4C9; From: P4P9; To: P4P10 }
- Segment Edge10 { Trace: P4C10; From: P4P10; To: P4P11 }
- Segment Edge11 { Trace: P4C11; From: P4P11; To: P4P12 }
- Segment Edge12 { Trace: P4C12; From: P4P12; To: P4P13 }
- Segment Edge13 { Trace: P4C13; From: P4P13; To: P4P14 }
- Segment Edge14 { Trace: P4C14; From: P4P14; To: P4P15 }
- Segment Edge15 { Trace: P4C15; From: P4P15; To: P4P16 }
- Segment Edge16 { Trace: P4C16; From: P4P16; To: P4P17 }
- Segment Edge17 { Trace: P4C17; From: P4P17; To: P4P0 }
- } }
+ Profile P4 Using SectionLayout { Loop Outer { Outline4 |> TraceLoop } }
SectionChain CarvedMaple { Continuity: G1
Section S0 { Frame: F0
Profile: P0
@@ -491,5 +44,5 @@ Model CarvedMaple {
Start: Cap
End: Cap
}
- Expose { Semantic TopSeat { DatumFrame Frame = [0mm,0mm,53mm] x [1,0,0] y [0,1,0] z [0,0,1]; } }
+ Expose { Semantic TopSeat { DatumFrame Frame = CarvedMaple.Section.S4.Frame; } }
}
diff --git a/fixtures/Canonical/AssemblyInterfaces/GuitarX0/IvoryBinding.firmament b/fixtures/Canonical/AssemblyInterfaces/GuitarX0/IvoryBinding.firmament
index ce68a192..c0128f13 100644
--- a/fixtures/Canonical/AssemblyInterfaces/GuitarX0/IvoryBinding.firmament
+++ b/fixtures/Canonical/AssemblyInterfaces/GuitarX0/IvoryBinding.firmament
@@ -1,195 +1,18 @@
+Include "body-outline.firmament";
Model IvoryBinding {
Units: mm
Concept Struct Frames {
S0: Plane { Origin: [0mm,0mm,38mm]; Normal: [0,0,1]; Up: [0,1,0] }
S1: Plane { Origin: [0mm,0mm,40mm]; Normal: [0,0,1]; Up: [0,1,0] }
}
+ Concept Struct SectionLayout {
+ Curve2 Outline0 { From: BodyOutline; On: XY; Scale: 1; Pivot: [0mm,-25mm]; Translate: [0mm,0mm]; Rotate: 0deg }
+ Curve2 Outline1 { From: BodyOutline; On: XY; Scale: 1; Pivot: [0mm,-25mm]; Translate: [0mm,0mm]; Rotate: 0deg }
+ }
Construction Plane F0 { Trace: Frames.S0 }
- Point2 P0P0 { Position: [0mm,-220mm] }
- Point2 P0A0 { Position: [38.333333mm,-220mm] }
- Point2 P0B0 { Position: [-38.333333mm,-220mm] }
- Point2 P0P1 { Position: [115mm,-195mm] }
- Point2 P0A1 { Position: [143mm,-177.5mm] }
- Point2 P0B1 { Position: [87mm,-212.5mm] }
- Point2 P0P2 { Position: [168mm,-115mm] }
- Point2 P0A2 { Position: [173.5mm,-88.333333mm] }
- Point2 P0B2 { Position: [162.5mm,-141.666667mm] }
- Point2 P0P3 { Position: [148mm,-35mm] }
- Point2 P0A3 { Position: [137.5mm,-11.166667mm] }
- Point2 P0B3 { Position: [158.5mm,-58.833333mm] }
- Point2 P0P4 { Position: [105mm,28mm] }
- Point2 P0A4 { Position: [100mm,49.666667mm] }
- Point2 P0B4 { Position: [110mm,6.333333mm] }
- Point2 P0P5 { Position: [118mm,95mm] }
- Point2 P0A5 { Position: [121.166667mm,113.666667mm] }
- Point2 P0B5 { Position: [114.833333mm,76.333333mm] }
- Point2 P0P6 { Position: [124mm,140mm] }
- Point2 P0A6 { Position: [123.166667mm,150.833333mm] }
- Point2 P0B6 { Position: [124.833333mm,129.166667mm] }
- Point2 P0P7 { Position: [113mm,160mm] }
- Point2 P0A7 { Position: [107.5mm,160.333333mm] }
- Point2 P0B7 { Position: [118.5mm,159.666667mm] }
- Point2 P0P8 { Position: [91mm,142mm] }
- Point2 P0A8 { Position: [80.166667mm,138.166667mm] }
- Point2 P0B8 { Position: [101.833333mm,145.833333mm] }
- Point2 P0P9 { Position: [48mm,137mm] }
- Point2 P0A9 { Position: [37.5mm,147.333333mm] }
- Point2 P0B9 { Position: [58.5mm,126.666667mm] }
- Point2 P0P10 { Position: [28mm,204mm] }
- Point2 P0A10 { Position: [13mm,215.333333mm] }
- Point2 P0B10 { Position: [43mm,192.666667mm] }
- Point2 P0P11 { Position: [-42mm,205mm] }
- Point2 P0A11 { Position: [-65.166667mm,200mm] }
- Point2 P0B11 { Position: [-18.833333mm,210mm] }
- Point2 P0P12 { Position: [-111mm,174mm] }
- Point2 P0A12 { Position: [-123.833333mm,159mm] }
- Point2 P0B12 { Position: [-98.166667mm,189mm] }
- Point2 P0P13 { Position: [-119mm,115mm] }
- Point2 P0A13 { Position: [-116.333333mm,92.666667mm] }
- Point2 P0B13 { Position: [-121.666667mm,137.333333mm] }
- Point2 P0P14 { Position: [-95mm,40mm] }
- Point2 P0A14 { Position: [-98mm,15.5mm] }
- Point2 P0B14 { Position: [-92mm,64.5mm] }
- Point2 P0P15 { Position: [-137mm,-32mm] }
- Point2 P0A15 { Position: [-149.166667mm,-57.833333mm] }
- Point2 P0B15 { Position: [-124.833333mm,-6.166667mm] }
- Point2 P0P16 { Position: [-168mm,-115mm] }
- Point2 P0A16 { Position: [-164.333333mm,-142.166667mm] }
- Point2 P0B16 { Position: [-171.666667mm,-87.833333mm] }
- Point2 P0P17 { Position: [-115mm,-195mm] }
- Point2 P0A17 { Position: [-87mm,-212.5mm] }
- Point2 P0B17 { Position: [-143mm,-177.5mm] }
- CubicBezier2 P0C0 { From: P0P0; Control1: P0A0; Control2: P0B1; To: P0P1 }
- CubicBezier2 P0C1 { From: P0P1; Control1: P0A1; Control2: P0B2; To: P0P2 }
- CubicBezier2 P0C2 { From: P0P2; Control1: P0A2; Control2: P0B3; To: P0P3 }
- CubicBezier2 P0C3 { From: P0P3; Control1: P0A3; Control2: P0B4; To: P0P4 }
- CubicBezier2 P0C4 { From: P0P4; Control1: P0A4; Control2: P0B5; To: P0P5 }
- CubicBezier2 P0C5 { From: P0P5; Control1: P0A5; Control2: P0B6; To: P0P6 }
- CubicBezier2 P0C6 { From: P0P6; Control1: P0A6; Control2: P0B7; To: P0P7 }
- CubicBezier2 P0C7 { From: P0P7; Control1: P0A7; Control2: P0B8; To: P0P8 }
- CubicBezier2 P0C8 { From: P0P8; Control1: P0A8; Control2: P0B9; To: P0P9 }
- CubicBezier2 P0C9 { From: P0P9; Control1: P0A9; Control2: P0B10; To: P0P10 }
- CubicBezier2 P0C10 { From: P0P10; Control1: P0A10; Control2: P0B11; To: P0P11 }
- CubicBezier2 P0C11 { From: P0P11; Control1: P0A11; Control2: P0B12; To: P0P12 }
- CubicBezier2 P0C12 { From: P0P12; Control1: P0A12; Control2: P0B13; To: P0P13 }
- CubicBezier2 P0C13 { From: P0P13; Control1: P0A13; Control2: P0B14; To: P0P14 }
- CubicBezier2 P0C14 { From: P0P14; Control1: P0A14; Control2: P0B15; To: P0P15 }
- CubicBezier2 P0C15 { From: P0P15; Control1: P0A15; Control2: P0B16; To: P0P16 }
- CubicBezier2 P0C16 { From: P0P16; Control1: P0A16; Control2: P0B17; To: P0P17 }
- CubicBezier2 P0C17 { From: P0P17; Control1: P0A17; Control2: P0B0; To: P0P0 }
- Profile P0 { Loop Outer {
- Segment Edge0 { Trace: P0C0; From: P0P0; To: P0P1 }
- Segment Edge1 { Trace: P0C1; From: P0P1; To: P0P2 }
- Segment Edge2 { Trace: P0C2; From: P0P2; To: P0P3 }
- Segment Edge3 { Trace: P0C3; From: P0P3; To: P0P4 }
- Segment Edge4 { Trace: P0C4; From: P0P4; To: P0P5 }
- Segment Edge5 { Trace: P0C5; From: P0P5; To: P0P6 }
- Segment Edge6 { Trace: P0C6; From: P0P6; To: P0P7 }
- Segment Edge7 { Trace: P0C7; From: P0P7; To: P0P8 }
- Segment Edge8 { Trace: P0C8; From: P0P8; To: P0P9 }
- Segment Edge9 { Trace: P0C9; From: P0P9; To: P0P10 }
- Segment Edge10 { Trace: P0C10; From: P0P10; To: P0P11 }
- Segment Edge11 { Trace: P0C11; From: P0P11; To: P0P12 }
- Segment Edge12 { Trace: P0C12; From: P0P12; To: P0P13 }
- Segment Edge13 { Trace: P0C13; From: P0P13; To: P0P14 }
- Segment Edge14 { Trace: P0C14; From: P0P14; To: P0P15 }
- Segment Edge15 { Trace: P0C15; From: P0P15; To: P0P16 }
- Segment Edge16 { Trace: P0C16; From: P0P16; To: P0P17 }
- Segment Edge17 { Trace: P0C17; From: P0P17; To: P0P0 }
- } }
+ Profile P0 Using SectionLayout { Loop Outer { Outline0 |> TraceLoop } }
Construction Plane F1 { Trace: Frames.S1 }
- Point2 P1P0 { Position: [0mm,-220mm] }
- Point2 P1A0 { Position: [38.333333mm,-220mm] }
- Point2 P1B0 { Position: [-38.333333mm,-220mm] }
- Point2 P1P1 { Position: [115mm,-195mm] }
- Point2 P1A1 { Position: [143mm,-177.5mm] }
- Point2 P1B1 { Position: [87mm,-212.5mm] }
- Point2 P1P2 { Position: [168mm,-115mm] }
- Point2 P1A2 { Position: [173.5mm,-88.333333mm] }
- Point2 P1B2 { Position: [162.5mm,-141.666667mm] }
- Point2 P1P3 { Position: [148mm,-35mm] }
- Point2 P1A3 { Position: [137.5mm,-11.166667mm] }
- Point2 P1B3 { Position: [158.5mm,-58.833333mm] }
- Point2 P1P4 { Position: [105mm,28mm] }
- Point2 P1A4 { Position: [100mm,49.666667mm] }
- Point2 P1B4 { Position: [110mm,6.333333mm] }
- Point2 P1P5 { Position: [118mm,95mm] }
- Point2 P1A5 { Position: [121.166667mm,113.666667mm] }
- Point2 P1B5 { Position: [114.833333mm,76.333333mm] }
- Point2 P1P6 { Position: [124mm,140mm] }
- Point2 P1A6 { Position: [123.166667mm,150.833333mm] }
- Point2 P1B6 { Position: [124.833333mm,129.166667mm] }
- Point2 P1P7 { Position: [113mm,160mm] }
- Point2 P1A7 { Position: [107.5mm,160.333333mm] }
- Point2 P1B7 { Position: [118.5mm,159.666667mm] }
- Point2 P1P8 { Position: [91mm,142mm] }
- Point2 P1A8 { Position: [80.166667mm,138.166667mm] }
- Point2 P1B8 { Position: [101.833333mm,145.833333mm] }
- Point2 P1P9 { Position: [48mm,137mm] }
- Point2 P1A9 { Position: [37.5mm,147.333333mm] }
- Point2 P1B9 { Position: [58.5mm,126.666667mm] }
- Point2 P1P10 { Position: [28mm,204mm] }
- Point2 P1A10 { Position: [13mm,215.333333mm] }
- Point2 P1B10 { Position: [43mm,192.666667mm] }
- Point2 P1P11 { Position: [-42mm,205mm] }
- Point2 P1A11 { Position: [-65.166667mm,200mm] }
- Point2 P1B11 { Position: [-18.833333mm,210mm] }
- Point2 P1P12 { Position: [-111mm,174mm] }
- Point2 P1A12 { Position: [-123.833333mm,159mm] }
- Point2 P1B12 { Position: [-98.166667mm,189mm] }
- Point2 P1P13 { Position: [-119mm,115mm] }
- Point2 P1A13 { Position: [-116.333333mm,92.666667mm] }
- Point2 P1B13 { Position: [-121.666667mm,137.333333mm] }
- Point2 P1P14 { Position: [-95mm,40mm] }
- Point2 P1A14 { Position: [-98mm,15.5mm] }
- Point2 P1B14 { Position: [-92mm,64.5mm] }
- Point2 P1P15 { Position: [-137mm,-32mm] }
- Point2 P1A15 { Position: [-149.166667mm,-57.833333mm] }
- Point2 P1B15 { Position: [-124.833333mm,-6.166667mm] }
- Point2 P1P16 { Position: [-168mm,-115mm] }
- Point2 P1A16 { Position: [-164.333333mm,-142.166667mm] }
- Point2 P1B16 { Position: [-171.666667mm,-87.833333mm] }
- Point2 P1P17 { Position: [-115mm,-195mm] }
- Point2 P1A17 { Position: [-87mm,-212.5mm] }
- Point2 P1B17 { Position: [-143mm,-177.5mm] }
- CubicBezier2 P1C0 { From: P1P0; Control1: P1A0; Control2: P1B1; To: P1P1 }
- CubicBezier2 P1C1 { From: P1P1; Control1: P1A1; Control2: P1B2; To: P1P2 }
- CubicBezier2 P1C2 { From: P1P2; Control1: P1A2; Control2: P1B3; To: P1P3 }
- CubicBezier2 P1C3 { From: P1P3; Control1: P1A3; Control2: P1B4; To: P1P4 }
- CubicBezier2 P1C4 { From: P1P4; Control1: P1A4; Control2: P1B5; To: P1P5 }
- CubicBezier2 P1C5 { From: P1P5; Control1: P1A5; Control2: P1B6; To: P1P6 }
- CubicBezier2 P1C6 { From: P1P6; Control1: P1A6; Control2: P1B7; To: P1P7 }
- CubicBezier2 P1C7 { From: P1P7; Control1: P1A7; Control2: P1B8; To: P1P8 }
- CubicBezier2 P1C8 { From: P1P8; Control1: P1A8; Control2: P1B9; To: P1P9 }
- CubicBezier2 P1C9 { From: P1P9; Control1: P1A9; Control2: P1B10; To: P1P10 }
- CubicBezier2 P1C10 { From: P1P10; Control1: P1A10; Control2: P1B11; To: P1P11 }
- CubicBezier2 P1C11 { From: P1P11; Control1: P1A11; Control2: P1B12; To: P1P12 }
- CubicBezier2 P1C12 { From: P1P12; Control1: P1A12; Control2: P1B13; To: P1P13 }
- CubicBezier2 P1C13 { From: P1P13; Control1: P1A13; Control2: P1B14; To: P1P14 }
- CubicBezier2 P1C14 { From: P1P14; Control1: P1A14; Control2: P1B15; To: P1P15 }
- CubicBezier2 P1C15 { From: P1P15; Control1: P1A15; Control2: P1B16; To: P1P16 }
- CubicBezier2 P1C16 { From: P1P16; Control1: P1A16; Control2: P1B17; To: P1P17 }
- CubicBezier2 P1C17 { From: P1P17; Control1: P1A17; Control2: P1B0; To: P1P0 }
- Profile P1 { Loop Outer {
- Segment Edge0 { Trace: P1C0; From: P1P0; To: P1P1 }
- Segment Edge1 { Trace: P1C1; From: P1P1; To: P1P2 }
- Segment Edge2 { Trace: P1C2; From: P1P2; To: P1P3 }
- Segment Edge3 { Trace: P1C3; From: P1P3; To: P1P4 }
- Segment Edge4 { Trace: P1C4; From: P1P4; To: P1P5 }
- Segment Edge5 { Trace: P1C5; From: P1P5; To: P1P6 }
- Segment Edge6 { Trace: P1C6; From: P1P6; To: P1P7 }
- Segment Edge7 { Trace: P1C7; From: P1P7; To: P1P8 }
- Segment Edge8 { Trace: P1C8; From: P1P8; To: P1P9 }
- Segment Edge9 { Trace: P1C9; From: P1P9; To: P1P10 }
- Segment Edge10 { Trace: P1C10; From: P1P10; To: P1P11 }
- Segment Edge11 { Trace: P1C11; From: P1P11; To: P1P12 }
- Segment Edge12 { Trace: P1C12; From: P1P12; To: P1P13 }
- Segment Edge13 { Trace: P1C13; From: P1P13; To: P1P14 }
- Segment Edge14 { Trace: P1C14; From: P1P14; To: P1P15 }
- Segment Edge15 { Trace: P1C15; From: P1P15; To: P1P16 }
- Segment Edge16 { Trace: P1C16; From: P1P16; To: P1P17 }
- Segment Edge17 { Trace: P1C17; From: P1P17; To: P1P0 }
- } }
+ Profile P1 Using SectionLayout { Loop Outer { Outline1 |> TraceLoop } }
SectionChain IvoryBinding { Continuity: G0
Section S0 { Frame: F0
Profile: P0
diff --git a/fixtures/Canonical/AssemblyInterfaces/GuitarX0/MahoganyBack.firmament b/fixtures/Canonical/AssemblyInterfaces/GuitarX0/MahoganyBack.firmament
index 2d551352..d8bef561 100644
--- a/fixtures/Canonical/AssemblyInterfaces/GuitarX0/MahoganyBack.firmament
+++ b/fixtures/Canonical/AssemblyInterfaces/GuitarX0/MahoganyBack.firmament
@@ -1,195 +1,18 @@
+Include "body-outline.firmament";
Model MahoganyBack {
Units: mm
Concept Struct Frames {
S0: Plane { Origin: [0mm,0mm,0mm]; Normal: [0,0,1]; Up: [0,1,0] }
S1: Plane { Origin: [0mm,0mm,38mm]; Normal: [0,0,1]; Up: [0,1,0] }
}
+ Concept Struct SectionLayout {
+ Curve2 Outline0 { From: BodyOutline; On: XY; Scale: 1; Pivot: [0mm,-25mm]; Translate: [0mm,0mm]; Rotate: 0deg }
+ Curve2 Outline1 { From: BodyOutline; On: XY; Scale: 1; Pivot: [0mm,-25mm]; Translate: [0mm,0mm]; Rotate: 0deg }
+ }
Construction Plane F0 { Trace: Frames.S0 }
- Point2 P0P0 { Position: [0mm,-220mm] }
- Point2 P0A0 { Position: [38.333333mm,-220mm] }
- Point2 P0B0 { Position: [-38.333333mm,-220mm] }
- Point2 P0P1 { Position: [115mm,-195mm] }
- Point2 P0A1 { Position: [143mm,-177.5mm] }
- Point2 P0B1 { Position: [87mm,-212.5mm] }
- Point2 P0P2 { Position: [168mm,-115mm] }
- Point2 P0A2 { Position: [173.5mm,-88.333333mm] }
- Point2 P0B2 { Position: [162.5mm,-141.666667mm] }
- Point2 P0P3 { Position: [148mm,-35mm] }
- Point2 P0A3 { Position: [137.5mm,-11.166667mm] }
- Point2 P0B3 { Position: [158.5mm,-58.833333mm] }
- Point2 P0P4 { Position: [105mm,28mm] }
- Point2 P0A4 { Position: [100mm,49.666667mm] }
- Point2 P0B4 { Position: [110mm,6.333333mm] }
- Point2 P0P5 { Position: [118mm,95mm] }
- Point2 P0A5 { Position: [121.166667mm,113.666667mm] }
- Point2 P0B5 { Position: [114.833333mm,76.333333mm] }
- Point2 P0P6 { Position: [124mm,140mm] }
- Point2 P0A6 { Position: [123.166667mm,150.833333mm] }
- Point2 P0B6 { Position: [124.833333mm,129.166667mm] }
- Point2 P0P7 { Position: [113mm,160mm] }
- Point2 P0A7 { Position: [107.5mm,160.333333mm] }
- Point2 P0B7 { Position: [118.5mm,159.666667mm] }
- Point2 P0P8 { Position: [91mm,142mm] }
- Point2 P0A8 { Position: [80.166667mm,138.166667mm] }
- Point2 P0B8 { Position: [101.833333mm,145.833333mm] }
- Point2 P0P9 { Position: [48mm,137mm] }
- Point2 P0A9 { Position: [37.5mm,147.333333mm] }
- Point2 P0B9 { Position: [58.5mm,126.666667mm] }
- Point2 P0P10 { Position: [28mm,204mm] }
- Point2 P0A10 { Position: [13mm,215.333333mm] }
- Point2 P0B10 { Position: [43mm,192.666667mm] }
- Point2 P0P11 { Position: [-42mm,205mm] }
- Point2 P0A11 { Position: [-65.166667mm,200mm] }
- Point2 P0B11 { Position: [-18.833333mm,210mm] }
- Point2 P0P12 { Position: [-111mm,174mm] }
- Point2 P0A12 { Position: [-123.833333mm,159mm] }
- Point2 P0B12 { Position: [-98.166667mm,189mm] }
- Point2 P0P13 { Position: [-119mm,115mm] }
- Point2 P0A13 { Position: [-116.333333mm,92.666667mm] }
- Point2 P0B13 { Position: [-121.666667mm,137.333333mm] }
- Point2 P0P14 { Position: [-95mm,40mm] }
- Point2 P0A14 { Position: [-98mm,15.5mm] }
- Point2 P0B14 { Position: [-92mm,64.5mm] }
- Point2 P0P15 { Position: [-137mm,-32mm] }
- Point2 P0A15 { Position: [-149.166667mm,-57.833333mm] }
- Point2 P0B15 { Position: [-124.833333mm,-6.166667mm] }
- Point2 P0P16 { Position: [-168mm,-115mm] }
- Point2 P0A16 { Position: [-164.333333mm,-142.166667mm] }
- Point2 P0B16 { Position: [-171.666667mm,-87.833333mm] }
- Point2 P0P17 { Position: [-115mm,-195mm] }
- Point2 P0A17 { Position: [-87mm,-212.5mm] }
- Point2 P0B17 { Position: [-143mm,-177.5mm] }
- CubicBezier2 P0C0 { From: P0P0; Control1: P0A0; Control2: P0B1; To: P0P1 }
- CubicBezier2 P0C1 { From: P0P1; Control1: P0A1; Control2: P0B2; To: P0P2 }
- CubicBezier2 P0C2 { From: P0P2; Control1: P0A2; Control2: P0B3; To: P0P3 }
- CubicBezier2 P0C3 { From: P0P3; Control1: P0A3; Control2: P0B4; To: P0P4 }
- CubicBezier2 P0C4 { From: P0P4; Control1: P0A4; Control2: P0B5; To: P0P5 }
- CubicBezier2 P0C5 { From: P0P5; Control1: P0A5; Control2: P0B6; To: P0P6 }
- CubicBezier2 P0C6 { From: P0P6; Control1: P0A6; Control2: P0B7; To: P0P7 }
- CubicBezier2 P0C7 { From: P0P7; Control1: P0A7; Control2: P0B8; To: P0P8 }
- CubicBezier2 P0C8 { From: P0P8; Control1: P0A8; Control2: P0B9; To: P0P9 }
- CubicBezier2 P0C9 { From: P0P9; Control1: P0A9; Control2: P0B10; To: P0P10 }
- CubicBezier2 P0C10 { From: P0P10; Control1: P0A10; Control2: P0B11; To: P0P11 }
- CubicBezier2 P0C11 { From: P0P11; Control1: P0A11; Control2: P0B12; To: P0P12 }
- CubicBezier2 P0C12 { From: P0P12; Control1: P0A12; Control2: P0B13; To: P0P13 }
- CubicBezier2 P0C13 { From: P0P13; Control1: P0A13; Control2: P0B14; To: P0P14 }
- CubicBezier2 P0C14 { From: P0P14; Control1: P0A14; Control2: P0B15; To: P0P15 }
- CubicBezier2 P0C15 { From: P0P15; Control1: P0A15; Control2: P0B16; To: P0P16 }
- CubicBezier2 P0C16 { From: P0P16; Control1: P0A16; Control2: P0B17; To: P0P17 }
- CubicBezier2 P0C17 { From: P0P17; Control1: P0A17; Control2: P0B0; To: P0P0 }
- Profile P0 { Loop Outer {
- Segment Edge0 { Trace: P0C0; From: P0P0; To: P0P1 }
- Segment Edge1 { Trace: P0C1; From: P0P1; To: P0P2 }
- Segment Edge2 { Trace: P0C2; From: P0P2; To: P0P3 }
- Segment Edge3 { Trace: P0C3; From: P0P3; To: P0P4 }
- Segment Edge4 { Trace: P0C4; From: P0P4; To: P0P5 }
- Segment Edge5 { Trace: P0C5; From: P0P5; To: P0P6 }
- Segment Edge6 { Trace: P0C6; From: P0P6; To: P0P7 }
- Segment Edge7 { Trace: P0C7; From: P0P7; To: P0P8 }
- Segment Edge8 { Trace: P0C8; From: P0P8; To: P0P9 }
- Segment Edge9 { Trace: P0C9; From: P0P9; To: P0P10 }
- Segment Edge10 { Trace: P0C10; From: P0P10; To: P0P11 }
- Segment Edge11 { Trace: P0C11; From: P0P11; To: P0P12 }
- Segment Edge12 { Trace: P0C12; From: P0P12; To: P0P13 }
- Segment Edge13 { Trace: P0C13; From: P0P13; To: P0P14 }
- Segment Edge14 { Trace: P0C14; From: P0P14; To: P0P15 }
- Segment Edge15 { Trace: P0C15; From: P0P15; To: P0P16 }
- Segment Edge16 { Trace: P0C16; From: P0P16; To: P0P17 }
- Segment Edge17 { Trace: P0C17; From: P0P17; To: P0P0 }
- } }
+ Profile P0 Using SectionLayout { Loop Outer { Outline0 |> TraceLoop } }
Construction Plane F1 { Trace: Frames.S1 }
- Point2 P1P0 { Position: [0mm,-220mm] }
- Point2 P1A0 { Position: [38.333333mm,-220mm] }
- Point2 P1B0 { Position: [-38.333333mm,-220mm] }
- Point2 P1P1 { Position: [115mm,-195mm] }
- Point2 P1A1 { Position: [143mm,-177.5mm] }
- Point2 P1B1 { Position: [87mm,-212.5mm] }
- Point2 P1P2 { Position: [168mm,-115mm] }
- Point2 P1A2 { Position: [173.5mm,-88.333333mm] }
- Point2 P1B2 { Position: [162.5mm,-141.666667mm] }
- Point2 P1P3 { Position: [148mm,-35mm] }
- Point2 P1A3 { Position: [137.5mm,-11.166667mm] }
- Point2 P1B3 { Position: [158.5mm,-58.833333mm] }
- Point2 P1P4 { Position: [105mm,28mm] }
- Point2 P1A4 { Position: [100mm,49.666667mm] }
- Point2 P1B4 { Position: [110mm,6.333333mm] }
- Point2 P1P5 { Position: [118mm,95mm] }
- Point2 P1A5 { Position: [121.166667mm,113.666667mm] }
- Point2 P1B5 { Position: [114.833333mm,76.333333mm] }
- Point2 P1P6 { Position: [124mm,140mm] }
- Point2 P1A6 { Position: [123.166667mm,150.833333mm] }
- Point2 P1B6 { Position: [124.833333mm,129.166667mm] }
- Point2 P1P7 { Position: [113mm,160mm] }
- Point2 P1A7 { Position: [107.5mm,160.333333mm] }
- Point2 P1B7 { Position: [118.5mm,159.666667mm] }
- Point2 P1P8 { Position: [91mm,142mm] }
- Point2 P1A8 { Position: [80.166667mm,138.166667mm] }
- Point2 P1B8 { Position: [101.833333mm,145.833333mm] }
- Point2 P1P9 { Position: [48mm,137mm] }
- Point2 P1A9 { Position: [37.5mm,147.333333mm] }
- Point2 P1B9 { Position: [58.5mm,126.666667mm] }
- Point2 P1P10 { Position: [28mm,204mm] }
- Point2 P1A10 { Position: [13mm,215.333333mm] }
- Point2 P1B10 { Position: [43mm,192.666667mm] }
- Point2 P1P11 { Position: [-42mm,205mm] }
- Point2 P1A11 { Position: [-65.166667mm,200mm] }
- Point2 P1B11 { Position: [-18.833333mm,210mm] }
- Point2 P1P12 { Position: [-111mm,174mm] }
- Point2 P1A12 { Position: [-123.833333mm,159mm] }
- Point2 P1B12 { Position: [-98.166667mm,189mm] }
- Point2 P1P13 { Position: [-119mm,115mm] }
- Point2 P1A13 { Position: [-116.333333mm,92.666667mm] }
- Point2 P1B13 { Position: [-121.666667mm,137.333333mm] }
- Point2 P1P14 { Position: [-95mm,40mm] }
- Point2 P1A14 { Position: [-98mm,15.5mm] }
- Point2 P1B14 { Position: [-92mm,64.5mm] }
- Point2 P1P15 { Position: [-137mm,-32mm] }
- Point2 P1A15 { Position: [-149.166667mm,-57.833333mm] }
- Point2 P1B15 { Position: [-124.833333mm,-6.166667mm] }
- Point2 P1P16 { Position: [-168mm,-115mm] }
- Point2 P1A16 { Position: [-164.333333mm,-142.166667mm] }
- Point2 P1B16 { Position: [-171.666667mm,-87.833333mm] }
- Point2 P1P17 { Position: [-115mm,-195mm] }
- Point2 P1A17 { Position: [-87mm,-212.5mm] }
- Point2 P1B17 { Position: [-143mm,-177.5mm] }
- CubicBezier2 P1C0 { From: P1P0; Control1: P1A0; Control2: P1B1; To: P1P1 }
- CubicBezier2 P1C1 { From: P1P1; Control1: P1A1; Control2: P1B2; To: P1P2 }
- CubicBezier2 P1C2 { From: P1P2; Control1: P1A2; Control2: P1B3; To: P1P3 }
- CubicBezier2 P1C3 { From: P1P3; Control1: P1A3; Control2: P1B4; To: P1P4 }
- CubicBezier2 P1C4 { From: P1P4; Control1: P1A4; Control2: P1B5; To: P1P5 }
- CubicBezier2 P1C5 { From: P1P5; Control1: P1A5; Control2: P1B6; To: P1P6 }
- CubicBezier2 P1C6 { From: P1P6; Control1: P1A6; Control2: P1B7; To: P1P7 }
- CubicBezier2 P1C7 { From: P1P7; Control1: P1A7; Control2: P1B8; To: P1P8 }
- CubicBezier2 P1C8 { From: P1P8; Control1: P1A8; Control2: P1B9; To: P1P9 }
- CubicBezier2 P1C9 { From: P1P9; Control1: P1A9; Control2: P1B10; To: P1P10 }
- CubicBezier2 P1C10 { From: P1P10; Control1: P1A10; Control2: P1B11; To: P1P11 }
- CubicBezier2 P1C11 { From: P1P11; Control1: P1A11; Control2: P1B12; To: P1P12 }
- CubicBezier2 P1C12 { From: P1P12; Control1: P1A12; Control2: P1B13; To: P1P13 }
- CubicBezier2 P1C13 { From: P1P13; Control1: P1A13; Control2: P1B14; To: P1P14 }
- CubicBezier2 P1C14 { From: P1P14; Control1: P1A14; Control2: P1B15; To: P1P15 }
- CubicBezier2 P1C15 { From: P1P15; Control1: P1A15; Control2: P1B16; To: P1P16 }
- CubicBezier2 P1C16 { From: P1P16; Control1: P1A16; Control2: P1B17; To: P1P17 }
- CubicBezier2 P1C17 { From: P1P17; Control1: P1A17; Control2: P1B0; To: P1P0 }
- Profile P1 { Loop Outer {
- Segment Edge0 { Trace: P1C0; From: P1P0; To: P1P1 }
- Segment Edge1 { Trace: P1C1; From: P1P1; To: P1P2 }
- Segment Edge2 { Trace: P1C2; From: P1P2; To: P1P3 }
- Segment Edge3 { Trace: P1C3; From: P1P3; To: P1P4 }
- Segment Edge4 { Trace: P1C4; From: P1P4; To: P1P5 }
- Segment Edge5 { Trace: P1C5; From: P1P5; To: P1P6 }
- Segment Edge6 { Trace: P1C6; From: P1P6; To: P1P7 }
- Segment Edge7 { Trace: P1C7; From: P1P7; To: P1P8 }
- Segment Edge8 { Trace: P1C8; From: P1P8; To: P1P9 }
- Segment Edge9 { Trace: P1C9; From: P1P9; To: P1P10 }
- Segment Edge10 { Trace: P1C10; From: P1P10; To: P1P11 }
- Segment Edge11 { Trace: P1C11; From: P1P11; To: P1P12 }
- Segment Edge12 { Trace: P1C12; From: P1P12; To: P1P13 }
- Segment Edge13 { Trace: P1C13; From: P1P13; To: P1P14 }
- Segment Edge14 { Trace: P1C14; From: P1P14; To: P1P15 }
- Segment Edge15 { Trace: P1C15; From: P1P15; To: P1P16 }
- Segment Edge16 { Trace: P1C16; From: P1P16; To: P1P17 }
- Segment Edge17 { Trace: P1C17; From: P1P17; To: P1P0 }
- } }
+ Profile P1 Using SectionLayout { Loop Outer { Outline1 |> TraceLoop } }
SectionChain MahoganyBack { Continuity: G0
Section S0 { Frame: F0
Profile: P0
diff --git a/fixtures/Canonical/AssemblyInterfaces/GuitarX0/body-outline.firmament b/fixtures/Canonical/AssemblyInterfaces/GuitarX0/body-outline.firmament
new file mode 100644
index 00000000..9251d12d
--- /dev/null
+++ b/fixtures/Canonical/AssemblyInterfaces/GuitarX0/body-outline.firmament
@@ -0,0 +1,93 @@
+// Shared authored single-cut boundary; Concept placements derive each section.
+ Point2 BodyOutlineP0 { Position: [0mm,-220mm] }
+ Point2 BodyOutlineA0 { Position: [38.333333mm,-220mm] }
+ Point2 BodyOutlineB0 { Position: [-38.333333mm,-220mm] }
+ Point2 BodyOutlineP1 { Position: [115mm,-195mm] }
+ Point2 BodyOutlineA1 { Position: [143mm,-177.5mm] }
+ Point2 BodyOutlineB1 { Position: [87mm,-212.5mm] }
+ Point2 BodyOutlineP2 { Position: [168mm,-115mm] }
+ Point2 BodyOutlineA2 { Position: [173.5mm,-88.333333mm] }
+ Point2 BodyOutlineB2 { Position: [162.5mm,-141.666667mm] }
+ Point2 BodyOutlineP3 { Position: [148mm,-35mm] }
+ Point2 BodyOutlineA3 { Position: [137.5mm,-11.166667mm] }
+ Point2 BodyOutlineB3 { Position: [158.5mm,-58.833333mm] }
+ Point2 BodyOutlineP4 { Position: [105mm,28mm] }
+ Point2 BodyOutlineA4 { Position: [100mm,49.666667mm] }
+ Point2 BodyOutlineB4 { Position: [110mm,6.333333mm] }
+ Point2 BodyOutlineP5 { Position: [118mm,95mm] }
+ Point2 BodyOutlineA5 { Position: [121.166667mm,113.666667mm] }
+ Point2 BodyOutlineB5 { Position: [114.833333mm,76.333333mm] }
+ Point2 BodyOutlineP6 { Position: [124mm,140mm] }
+ Point2 BodyOutlineA6 { Position: [123.166667mm,150.833333mm] }
+ Point2 BodyOutlineB6 { Position: [124.833333mm,129.166667mm] }
+ Point2 BodyOutlineP7 { Position: [113mm,160mm] }
+ Point2 BodyOutlineA7 { Position: [107.5mm,160.333333mm] }
+ Point2 BodyOutlineB7 { Position: [118.5mm,159.666667mm] }
+ Point2 BodyOutlineP8 { Position: [91mm,142mm] }
+ Point2 BodyOutlineA8 { Position: [80.166667mm,138.166667mm] }
+ Point2 BodyOutlineB8 { Position: [101.833333mm,145.833333mm] }
+ Point2 BodyOutlineP9 { Position: [48mm,137mm] }
+ Point2 BodyOutlineA9 { Position: [37.5mm,147.333333mm] }
+ Point2 BodyOutlineB9 { Position: [58.5mm,126.666667mm] }
+ Point2 BodyOutlineP10 { Position: [28mm,204mm] }
+ Point2 BodyOutlineA10 { Position: [13mm,215.333333mm] }
+ Point2 BodyOutlineB10 { Position: [43mm,192.666667mm] }
+ Point2 BodyOutlineP11 { Position: [-42mm,205mm] }
+ Point2 BodyOutlineA11 { Position: [-65.166667mm,200mm] }
+ Point2 BodyOutlineB11 { Position: [-18.833333mm,210mm] }
+ Point2 BodyOutlineP12 { Position: [-111mm,174mm] }
+ Point2 BodyOutlineA12 { Position: [-123.833333mm,159mm] }
+ Point2 BodyOutlineB12 { Position: [-98.166667mm,189mm] }
+ Point2 BodyOutlineP13 { Position: [-119mm,115mm] }
+ Point2 BodyOutlineA13 { Position: [-116.333333mm,92.666667mm] }
+ Point2 BodyOutlineB13 { Position: [-121.666667mm,137.333333mm] }
+ Point2 BodyOutlineP14 { Position: [-95mm,40mm] }
+ Point2 BodyOutlineA14 { Position: [-98mm,15.5mm] }
+ Point2 BodyOutlineB14 { Position: [-92mm,64.5mm] }
+ Point2 BodyOutlineP15 { Position: [-137mm,-32mm] }
+ Point2 BodyOutlineA15 { Position: [-149.166667mm,-57.833333mm] }
+ Point2 BodyOutlineB15 { Position: [-124.833333mm,-6.166667mm] }
+ Point2 BodyOutlineP16 { Position: [-168mm,-115mm] }
+ Point2 BodyOutlineA16 { Position: [-164.333333mm,-142.166667mm] }
+ Point2 BodyOutlineB16 { Position: [-171.666667mm,-87.833333mm] }
+ Point2 BodyOutlineP17 { Position: [-115mm,-195mm] }
+ Point2 BodyOutlineA17 { Position: [-87mm,-212.5mm] }
+ Point2 BodyOutlineB17 { Position: [-143mm,-177.5mm] }
+ CubicBezier2 BodyOutlineC0 { From: BodyOutlineP0; Control1: BodyOutlineA0; Control2: BodyOutlineB1; To: BodyOutlineP1 }
+ CubicBezier2 BodyOutlineC1 { From: BodyOutlineP1; Control1: BodyOutlineA1; Control2: BodyOutlineB2; To: BodyOutlineP2 }
+ CubicBezier2 BodyOutlineC2 { From: BodyOutlineP2; Control1: BodyOutlineA2; Control2: BodyOutlineB3; To: BodyOutlineP3 }
+ CubicBezier2 BodyOutlineC3 { From: BodyOutlineP3; Control1: BodyOutlineA3; Control2: BodyOutlineB4; To: BodyOutlineP4 }
+ CubicBezier2 BodyOutlineC4 { From: BodyOutlineP4; Control1: BodyOutlineA4; Control2: BodyOutlineB5; To: BodyOutlineP5 }
+ CubicBezier2 BodyOutlineC5 { From: BodyOutlineP5; Control1: BodyOutlineA5; Control2: BodyOutlineB6; To: BodyOutlineP6 }
+ CubicBezier2 BodyOutlineC6 { From: BodyOutlineP6; Control1: BodyOutlineA6; Control2: BodyOutlineB7; To: BodyOutlineP7 }
+ CubicBezier2 BodyOutlineC7 { From: BodyOutlineP7; Control1: BodyOutlineA7; Control2: BodyOutlineB8; To: BodyOutlineP8 }
+ CubicBezier2 BodyOutlineC8 { From: BodyOutlineP8; Control1: BodyOutlineA8; Control2: BodyOutlineB9; To: BodyOutlineP9 }
+ CubicBezier2 BodyOutlineC9 { From: BodyOutlineP9; Control1: BodyOutlineA9; Control2: BodyOutlineB10; To: BodyOutlineP10 }
+ CubicBezier2 BodyOutlineC10 { From: BodyOutlineP10; Control1: BodyOutlineA10; Control2: BodyOutlineB11; To: BodyOutlineP11 }
+ CubicBezier2 BodyOutlineC11 { From: BodyOutlineP11; Control1: BodyOutlineA11; Control2: BodyOutlineB12; To: BodyOutlineP12 }
+ CubicBezier2 BodyOutlineC12 { From: BodyOutlineP12; Control1: BodyOutlineA12; Control2: BodyOutlineB13; To: BodyOutlineP13 }
+ CubicBezier2 BodyOutlineC13 { From: BodyOutlineP13; Control1: BodyOutlineA13; Control2: BodyOutlineB14; To: BodyOutlineP14 }
+ CubicBezier2 BodyOutlineC14 { From: BodyOutlineP14; Control1: BodyOutlineA14; Control2: BodyOutlineB15; To: BodyOutlineP15 }
+ CubicBezier2 BodyOutlineC15 { From: BodyOutlineP15; Control1: BodyOutlineA15; Control2: BodyOutlineB16; To: BodyOutlineP16 }
+ CubicBezier2 BodyOutlineC16 { From: BodyOutlineP16; Control1: BodyOutlineA16; Control2: BodyOutlineB17; To: BodyOutlineP17 }
+ CubicBezier2 BodyOutlineC17 { From: BodyOutlineP17; Control1: BodyOutlineA17; Control2: BodyOutlineB0; To: BodyOutlineP0 }
+ Profile BodyOutline { Loop Outer {
+ Segment Edge0 { Trace: BodyOutlineC0; From: BodyOutlineP0; To: BodyOutlineP1 }
+ Segment Edge1 { Trace: BodyOutlineC1; From: BodyOutlineP1; To: BodyOutlineP2 }
+ Segment Edge2 { Trace: BodyOutlineC2; From: BodyOutlineP2; To: BodyOutlineP3 }
+ Segment Edge3 { Trace: BodyOutlineC3; From: BodyOutlineP3; To: BodyOutlineP4 }
+ Segment Edge4 { Trace: BodyOutlineC4; From: BodyOutlineP4; To: BodyOutlineP5 }
+ Segment Edge5 { Trace: BodyOutlineC5; From: BodyOutlineP5; To: BodyOutlineP6 }
+ Segment Edge6 { Trace: BodyOutlineC6; From: BodyOutlineP6; To: BodyOutlineP7 }
+ Segment Edge7 { Trace: BodyOutlineC7; From: BodyOutlineP7; To: BodyOutlineP8 }
+ Segment Edge8 { Trace: BodyOutlineC8; From: BodyOutlineP8; To: BodyOutlineP9 }
+ Segment Edge9 { Trace: BodyOutlineC9; From: BodyOutlineP9; To: BodyOutlineP10 }
+ Segment Edge10 { Trace: BodyOutlineC10; From: BodyOutlineP10; To: BodyOutlineP11 }
+ Segment Edge11 { Trace: BodyOutlineC11; From: BodyOutlineP11; To: BodyOutlineP12 }
+ Segment Edge12 { Trace: BodyOutlineC12; From: BodyOutlineP12; To: BodyOutlineP13 }
+ Segment Edge13 { Trace: BodyOutlineC13; From: BodyOutlineP13; To: BodyOutlineP14 }
+ Segment Edge14 { Trace: BodyOutlineC14; From: BodyOutlineP14; To: BodyOutlineP15 }
+ Segment Edge15 { Trace: BodyOutlineC15; From: BodyOutlineP15; To: BodyOutlineP16 }
+ Segment Edge16 { Trace: BodyOutlineC16; From: BodyOutlineP16; To: BodyOutlineP17 }
+ Segment Edge17 { Trace: BodyOutlineC17; From: BodyOutlineP17; To: BodyOutlineP0 }
+ } }
diff --git a/fixtures/Canonical/AssemblyInterfaces/GuitarX0/hardware-layout.firmament b/fixtures/Canonical/AssemblyInterfaces/GuitarX0/hardware-layout.firmament
index e7388ddb..4a3f56db 100644
--- a/fixtures/Canonical/AssemblyInterfaces/GuitarX0/hardware-layout.firmament
+++ b/fixtures/Canonical/AssemblyInterfaces/GuitarX0/hardware-layout.firmament
@@ -1,5 +1,5 @@
Concept Struct GuitarLayout {
- Plane HardwareDeck { Origin: [0mm,0mm,53mm]; Normal: [0,0,1]; Up: [0,1,0] }
+ Plane HardwareDeck { From: SectionChainFile<"CarvedMaple.firmament">.TopSeat.Frame; Offset: 0mm; Clocking: 0deg }
DatumFrame BodySeat { On: HardwareDeck; At: [0mm,0mm]; X: [1,0] }
DatumFrame NeckPickupSeat { On: HardwareDeck; At: [0mm,98mm]; X: [1,0] }
DatumFrame BridgePickupSeat { On: HardwareDeck; At: [0mm,0mm]; X: [1,0] }
diff --git a/scripts/create-guitar-x0.py b/scripts/create-guitar-x0.py
index 97324aa7..c0de6630 100644
--- a/scripts/create-guitar-x0.py
+++ b/scripts/create-guitar-x0.py
@@ -40,22 +40,27 @@ def profile(name, pts):
return '\n'.join(rows)
def body_chain(name, stations, continuity):
- rows=[f'Model {name} {{', ' Units: mm', ' Concept Struct Frames {']
+ rows=['Include "body-outline.firmament";', f'Model {name} {{', ' Units: mm', ' Concept Struct Frames {']
for i,(z,scale) in enumerate(stations):
rows.append(f' S{i}: Plane {{ Origin: [0mm,0mm,{z}mm]; Normal: [0,0,1]; Up: [0,1,0] }}')
rows.append(' }')
+ rows.append(' Concept Struct SectionLayout {')
+ for i,(z,scale) in enumerate(stations):
+ rows.append(f' Curve2 Outline{i} {{ From: BodyOutline; On: XY; Scale: {number(scale)}; Pivot: [0mm,-25mm]; Translate: [0mm,0mm]; Rotate: 0deg }}')
+ rows.append(' }')
for i,(z,scale) in enumerate(stations):
rows.append(f' Construction Plane F{i} {{ Trace: Frames.S{i} }}')
- rows.append(profile(f'P{i}',[(x*scale,(y+25)*scale-25) for x,y in OUTLINE]))
+ rows.append(f' Profile P{i} Using SectionLayout {{ Loop Outer {{ Outline{i} |> TraceLoop }} }}')
rows.append(f' SectionChain {name} {{ Continuity: {continuity}')
for i in range(len(stations)):
rows.append(f' Section S{i} {{ Frame: F{i}\n Profile: P{i}\n Seam: Edge0 }}')
rows.extend([' Start: Cap', ' End: Cap', ' }'])
if name == 'CarvedMaple':
- rows.append(' Expose { Semantic TopSeat { DatumFrame Frame = [0mm,0mm,53mm] x [1,0,0] y [0,1,0] z [0,0,1]; } }')
+ rows.append(' Expose { Semantic TopSeat { DatumFrame Frame = CarvedMaple.Section.S4.Frame; } }')
rows.append('}')
(ROOT/f'{name}.firmament').write_text('\n'.join(rows)+'\n')
+(ROOT/'body-outline.firmament').write_text('// Shared authored single-cut boundary; Concept placements derive each section.\n'+profile('BodyOutline',OUTLINE)+'\n')
body_chain('MahoganyBack',[(0,1),(38,1)],'G0')
body_chain('IvoryBinding',[(38,1),(40,1)],'G0')
body_chain('CarvedMaple',[(40,.992),(43,.955),(48,.84),(52,.76),(53,.72)],'G1')
@@ -298,7 +303,7 @@ string_template=templates[:string_end]
(ROOT/'hardware-definitions.firmament').write_text(templates[string_end:]+'\nRecord HardwareSite { X: Length; Y: Length; Z: Length }\n')
# Concept layout is authored once and shared by each owning subassembly.
(ROOT/'hardware-layout.firmament').write_text('''Concept Struct GuitarLayout {
- Plane HardwareDeck { Origin: [0mm,0mm,53mm]; Normal: [0,0,1]; Up: [0,1,0] }
+ Plane HardwareDeck { From: SectionChainFile<"CarvedMaple.firmament">.TopSeat.Frame; Offset: 0mm; Clocking: 0deg }
DatumFrame BodySeat { On: HardwareDeck; At: [0mm,0mm]; X: [1,0] }
DatumFrame NeckPickupSeat { On: HardwareDeck; At: [0mm,98mm]; X: [1,0] }
DatumFrame BridgePickupSeat { On: HardwareDeck; At: [0mm,0mm]; X: [1,0] }