Skip to content

Next Gen STEP AP242 Native-ish BREP Geometric Modeling Kernel

Materialize external Modify features in profile compositions

Yuechen Li24c265c3403f
diff --git a/Aetheris.Kernel.Firmament.Tests/FirmamentV2CanonicalAdvancedGrammarTests.cs b/Aetheris.Kernel.Firmament.Tests/FirmamentV2CanonicalAdvancedGrammarTests.cs
index 82756bac..05580bdf 100644
--- a/Aetheris.Kernel.Firmament.Tests/FirmamentV2CanonicalAdvancedGrammarTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/FirmamentV2CanonicalAdvancedGrammarTests.cs
@@ -345,6 +345,44 @@ public sealed class FirmamentV2CanonicalAdvancedGrammarTests
}
}
+ [Fact]
+ public void CanonicalExternalModifyFeatures_AreMaterializedIntoStep()
+ {
+ var path = Path.GetFullPath(Path.Combine(AppContext.BaseDirectory, "../../../../fixtures/FirmamentV2/Canonical/valid/profile-compose-l-bracket-external-modify-counterbore.firmament"));
+ var output = Path.Combine(Path.GetTempPath(), "aetheris-external-modify-" + Guid.NewGuid().ToString("N") + ".step");
+ try
+ {
+ var build = FirmamentBuildAndExport.Run(path, output);
+ Assert.True(build.IsSuccess, string.Join(Environment.NewLine, build.Diagnostics.Select(diagnostic => diagnostic.Message)));
+
+ var imported = Step242Importer.ImportBody(File.ReadAllText(output));
+ Assert.True(imported.IsSuccess, string.Join(Environment.NewLine, imported.Diagnostics.Select(diagnostic => diagnostic.Message)));
+ var cylinders = imported.Value.Geometry.Surfaces
+ .Select(entry => entry.Value)
+ .Where(surface => surface.Kind == Aetheris.Kernel.Core.Geometry.SurfaceGeometryKind.Cylinder)
+ .Select(surface => surface.Cylinder!.Value.Radius)
+ .Order()
+ .ToArray();
+ Assert.Contains(cylinders, radius => Math.Abs(radius - 3d) < 1e-9);
+ Assert.Contains(cylinders, radius => Math.Abs(radius - 4d) < 1e-9);
+ Assert.Contains(cylinders, radius => Math.Abs(radius - 7d) < 1e-9);
+ }
+ finally
+ {
+ if (File.Exists(output)) File.Delete(output);
+ }
+ }
+
+ [Fact]
+ public void CanonicalExternalModifyFeatures_WithUnboundTarget_AreFatal()
+ {
+ var path = Path.GetFullPath(Path.Combine(AppContext.BaseDirectory, "../../../../fixtures/FirmamentV2/Canonical/valid/profile-compose-l-bracket-external-modify-counterbore.firmament"));
+ var parse = FirmamentV2Parser.Parse(File.ReadAllText(path).Replace("Modify BracketBody", "Modify OtherBody", StringComparison.Ordinal));
+
+ Assert.False(parse.IsSuccess);
+ Assert.Contains(parse.Diagnostics, diagnostic => diagnostic.StartsWith(FirmamentV2Parser.ModifyTargetNotBoundToActiveCompose, StringComparison.Ordinal));
+ }
+
[Fact]
public void ProfileComposePolygonEdgeFinish_ReportsHostAdmissionInsteadOfMissingSemanticSource()
{
diff --git a/Aetheris.Kernel.Firmament/FirmamentV2/FirmamentV2Parser.cs b/Aetheris.Kernel.Firmament/FirmamentV2/FirmamentV2Parser.cs
index d9e03795..9e67ec0f 100644
--- a/Aetheris.Kernel.Firmament/FirmamentV2/FirmamentV2Parser.cs
+++ b/Aetheris.Kernel.Firmament/FirmamentV2/FirmamentV2Parser.cs
@@ -134,6 +134,7 @@ public static class FirmamentV2Parser
public const string ModifyTargetUnresolved = "firmament-v2-modify-target-unresolved";
public const string ModifyTargetNotSolid = "firmament-v2-modify-target-not-solid";
+ public const string ModifyTargetNotBoundToActiveCompose = "ModifyTargetNotBoundToActiveCompose";
public const string RegionUnsupported = "firmament-v2-region-unsupported";
public const string RegionAttachmentSelectorUnsupported = "firmament-v2-region-attachment-selector-unsupported";
public const string CutUnsupported = "firmament-v2-cut-unsupported";
@@ -1858,7 +1859,7 @@ public static class FirmamentV2Parser
|| code.StartsWith(ConceptIrResolver.PointProjectionUnsupported, StringComparison.Ordinal)
|| code.StartsWith("firmament-static-", StringComparison.Ordinal);
- public static bool IsFatalDiagnosticCode(string code) => code.StartsWith("firmament-v2-assert-volume-", StringComparison.Ordinal) || code.StartsWith(SemanticConstraintMalformed, StringComparison.Ordinal) || code.StartsWith(SemanticConstraintUnsupported, StringComparison.Ordinal) || code.StartsWith(SemanticConstraintDimensionMismatch, StringComparison.Ordinal) || code.StartsWith(SemanticConstraintValidationFailed, StringComparison.Ordinal) || code.StartsWith(PmiProjectionUnknownRequire, StringComparison.Ordinal) || code.StartsWith(PmiProjectionUnsupportedKind, StringComparison.Ordinal) || code.StartsWith(PmiProjectedFieldMustNotOverrideSourceConstraint, StringComparison.Ordinal) || code.StartsWith(AssertVolumeKindUnsupported, StringComparison.Ordinal) || code.StartsWith(CanonicalDeclarationUnknown + ":", StringComparison.Ordinal) || code.StartsWith(CanonicalConstructNotYetSupported + ":", StringComparison.Ordinal) || code.StartsWith(EdgeFinishProfileComposeBoundaryUnsupported, StringComparison.Ordinal) || IsConceptFatalDiagnostic(code) || code is UnknownConstructionPolicy or PrimitiveDoesNotSatisfyHollowConstructible or WallThicknessRequired or WallThicknessMustBePositive or UnsupportedOpening or MultipleOpeningsNotSupported or Phase3EdgeFinishSyntaxInvalid or PrimitiveFieldMissing or PrimitiveFieldUnknown or PrimitiveFieldInvalid or MissingModel or MissingUnits or MissingSolid or UnsupportedConstruct or UnknownRecordType or BoxMissingSize or BoxSizeArity or DegenerateDimension or NameUnresolved or DuplicateName or WithRequiresRecord or WithRequiresBoxRecord or WithFieldNotFound or WithFieldTypeMismatch or WithForwardReference or WithDerivedRecordInvalid or ExposeBlockUnsupported or ExposeRequiresBoxRecord or ExposeAliasDuplicate or ExposeAliasInvalid or SelectorUnsupported or SelectorAxisInvalid or SelectorSubselectorUnsupported or FatArrowOutsideExpose or RawBackendIdReferenceForbidden or ModifyTargetUnresolved or ModifyTargetNotSolid or RegionUnsupported or RegionAttachmentSelectorUnsupported or CutUnsupported or CutToolUnsupported or CylinderRadiusMissing or CylinderRadiusInvalid or CylinderRadiusNotFinite or ThroughSelectorUnsupported or AliasUnresolved or AliasRefTypeUnsupported or SideHoleAliasMustResolveToFace or SideHoleAliasResolvesToUnsupportedFace or SideHoleOnlyPlusXMinusXSupported or SideHoleRouteUnsupported or SideHoleSameFaceUnsupported or SideHoleAxisNotYetSupported or SideHoleRadiusExceedsClearance or CylinderCenterInvalid or CylinderCenterArityInvalid or CylinderCenterNotFinite or SideHoleCenterExceedsClearance or HoleVariantUnknown or HoleEntryFaceMissing or HoleCenterMissing or HoleShaftMissing or HoleEndMissing or HoleDiameterInvalid or HoleDepthInvalid or HoleCounterboreInvalid or HoleCountersinkInvalid or PmiKindUnknown or PmiTargetMissing or PmiTargetUnresolved or PmiDiameterInvalid or PmiDuplicateName or InlineStepUnknownBody or InlineStepUnknownFace or PmiImportedTargetNotFace or PmiImportedTargetRequiresCanonicalStep or PmiInvalidImportedTarget or InlineStepPathMissing or InlineStepPathInvalid or InlineStepFileMissing or InlineStepRequiresCanonical or UnknownRecognitionBody or UnknownRecognitionFace or DuplicateRegion or UnknownRecognitionRegion or InvalidRecognitionKind or InvalidRecognitionConfidence or PmiRecognizedRegionKindMismatch or UnknownReplacementBody or UnknownReplacementRegion or ReplacementKindMismatch or ReplacementFaceUnresolved or ReplacementUnsupportedKind or ReplacementVerificationFailed or ReplacementRadiusInvalid or ReplacementEndUnsupported or LetDuplicateName or LetUnknownType or LetMismatch or LetInvalidLiteral or LetUnitMismatch or LetLiteralOnly or LetRecordDuplicateName or LetRecordDuplicateField or LetReferenceUnknownRecord or LetReferenceUnknownField or LetReferenceNonRecord or LetReferenceRecordUsedAsValue or ExpressionUnknownSymbol or ExpressionUnknownRecord or ExpressionUnknownField or ExpressionRecordUsedAsValue or ExpressionScalarUsedAsRecord or ExpressionTypeMismatch or ExpressionInvalidOperator or ExpressionDivisionByZero or ExpressionCycle or ExpressionUnsupported or ToleranceInvalidType or ToleranceUnitMismatch or ToleranceInvalidLiteral or ToleranceNegativeBilateral or ToleranceMissingMinus or ToleranceMissingPlus or ToleranceUnsupported or RecognitionEvidenceRadiusInvalid or RecognitionEvidenceSurfaceFamilyUnknown or RecognitionEvidenceAxisInvalid or SemanticProposalKindMismatch or SemanticProposalRadiusInvalid or SemanticProposalTargetUnresolved or SemanticProposalEndUnsupported or ConceptUnknownFamily or ConceptUnknownConcept or ConceptMissingRequiredField or ConceptUnknownField or ConceptDuplicateField or ConceptFieldTypeMismatch or ConceptInvalidTarget or ConceptDescriptorUnavailable or PmiDuplicateBlock or PmiDuplicateRecord or PmiDuplicateDatum or PmiUnknownRecordKind or PmiMissingRequiredField or PmiUnknownField or PmiDuplicateField or PmiInvalidTarget or PmiUnknownDatum or PmiDimensionTypeMismatch or PmiDimensionMissingTolerance or PmiToleranceTypeMismatch or StandaloneFillRegionRequired or UnsupportedStandaloneFillPattern or InvalidCellCount or CellSizeMustBePositive or StrutRadiusMustBePositive or NodeRadiusMustBePositive or MaterialBoundsMismatch or StandaloneFillMultipleUnsupported;
+ public static bool IsFatalDiagnosticCode(string code) => code.StartsWith(ModifyTargetNotBoundToActiveCompose, StringComparison.Ordinal) || code.StartsWith("firmament-v2-assert-volume-", StringComparison.Ordinal) || code.StartsWith(SemanticConstraintMalformed, StringComparison.Ordinal) || code.StartsWith(SemanticConstraintUnsupported, StringComparison.Ordinal) || code.StartsWith(SemanticConstraintDimensionMismatch, StringComparison.Ordinal) || code.StartsWith(SemanticConstraintValidationFailed, StringComparison.Ordinal) || code.StartsWith(PmiProjectionUnknownRequire, StringComparison.Ordinal) || code.StartsWith(PmiProjectionUnsupportedKind, StringComparison.Ordinal) || code.StartsWith(PmiProjectedFieldMustNotOverrideSourceConstraint, StringComparison.Ordinal) || code.StartsWith(AssertVolumeKindUnsupported, StringComparison.Ordinal) || code.StartsWith(CanonicalDeclarationUnknown + ":", StringComparison.Ordinal) || code.StartsWith(CanonicalConstructNotYetSupported + ":", StringComparison.Ordinal) || code.StartsWith(EdgeFinishProfileComposeBoundaryUnsupported, StringComparison.Ordinal) || IsConceptFatalDiagnostic(code) || code is UnknownConstructionPolicy or PrimitiveDoesNotSatisfyHollowConstructible or WallThicknessRequired or WallThicknessMustBePositive or UnsupportedOpening or MultipleOpeningsNotSupported or Phase3EdgeFinishSyntaxInvalid or PrimitiveFieldMissing or PrimitiveFieldUnknown or PrimitiveFieldInvalid or MissingModel or MissingUnits or MissingSolid or UnsupportedConstruct or UnknownRecordType or BoxMissingSize or BoxSizeArity or DegenerateDimension or NameUnresolved or DuplicateName or WithRequiresRecord or WithRequiresBoxRecord or WithFieldNotFound or WithFieldTypeMismatch or WithForwardReference or WithDerivedRecordInvalid or ExposeBlockUnsupported or ExposeRequiresBoxRecord or ExposeAliasDuplicate or ExposeAliasInvalid or SelectorUnsupported or SelectorAxisInvalid or SelectorSubselectorUnsupported or FatArrowOutsideExpose or RawBackendIdReferenceForbidden or ModifyTargetUnresolved or ModifyTargetNotSolid or RegionUnsupported or RegionAttachmentSelectorUnsupported or CutUnsupported or CutToolUnsupported or CylinderRadiusMissing or CylinderRadiusInvalid or CylinderRadiusNotFinite or ThroughSelectorUnsupported or AliasUnresolved or AliasRefTypeUnsupported or SideHoleAliasMustResolveToFace or SideHoleAliasResolvesToUnsupportedFace or SideHoleOnlyPlusXMinusXSupported or SideHoleRouteUnsupported or SideHoleSameFaceUnsupported or SideHoleAxisNotYetSupported or SideHoleRadiusExceedsClearance or CylinderCenterInvalid or CylinderCenterArityInvalid or CylinderCenterNotFinite or SideHoleCenterExceedsClearance or HoleVariantUnknown or HoleEntryFaceMissing or HoleCenterMissing or HoleShaftMissing or HoleEndMissing or HoleDiameterInvalid or HoleDepthInvalid or HoleCounterboreInvalid or HoleCountersinkInvalid or PmiKindUnknown or PmiTargetMissing or PmiTargetUnresolved or PmiDiameterInvalid or PmiDuplicateName or InlineStepUnknownBody or InlineStepUnknownFace or PmiImportedTargetNotFace or PmiImportedTargetRequiresCanonicalStep or PmiInvalidImportedTarget or InlineStepPathMissing or InlineStepPathInvalid or InlineStepFileMissing or InlineStepRequiresCanonical or UnknownRecognitionBody or UnknownRecognitionFace or DuplicateRegion or UnknownRecognitionRegion or InvalidRecognitionKind or InvalidRecognitionConfidence or PmiRecognizedRegionKindMismatch or UnknownReplacementBody or UnknownReplacementRegion or ReplacementKindMismatch or ReplacementFaceUnresolved or ReplacementUnsupportedKind or ReplacementVerificationFailed or ReplacementRadiusInvalid or ReplacementEndUnsupported or LetDuplicateName or LetUnknownType or LetMismatch or LetInvalidLiteral or LetUnitMismatch or LetLiteralOnly or LetRecordDuplicateName or LetRecordDuplicateField or LetReferenceUnknownRecord or LetReferenceUnknownField or LetReferenceNonRecord or LetReferenceRecordUsedAsValue or ExpressionUnknownSymbol or ExpressionUnknownRecord or ExpressionUnknownField or ExpressionRecordUsedAsValue or ExpressionScalarUsedAsRecord or ExpressionTypeMismatch or ExpressionInvalidOperator or ExpressionDivisionByZero or ExpressionCycle or ExpressionUnsupported or ToleranceInvalidType or ToleranceUnitMismatch or ToleranceInvalidLiteral or ToleranceNegativeBilateral or ToleranceMissingMinus or ToleranceMissingPlus or ToleranceUnsupported or RecognitionEvidenceRadiusInvalid or RecognitionEvidenceSurfaceFamilyUnknown or RecognitionEvidenceAxisInvalid or SemanticProposalKindMismatch or SemanticProposalRadiusInvalid or SemanticProposalTargetUnresolved or SemanticProposalEndUnsupported or ConceptUnknownFamily or ConceptUnknownConcept or ConceptMissingRequiredField or ConceptUnknownField or ConceptDuplicateField or ConceptFieldTypeMismatch or ConceptInvalidTarget or ConceptDescriptorUnavailable or PmiDuplicateBlock or PmiDuplicateRecord or PmiDuplicateDatum or PmiUnknownRecordKind or PmiMissingRequiredField or PmiUnknownField or PmiDuplicateField or PmiInvalidTarget or PmiUnknownDatum or PmiDimensionTypeMismatch or PmiDimensionMissingTolerance or PmiToleranceTypeMismatch or StandaloneFillRegionRequired or UnsupportedStandaloneFillPattern or InvalidCellCount or CellSizeMustBePositive or StrutRadiusMustBePositive or NodeRadiusMustBePositive or MaterialBoundsMismatch or StandaloneFillMultipleUnsupported;
private static IReadOnlyList<FirmamentV2Exposure> ParseExposures(string body, List<string> diagnostics)
{
diff --git a/Aetheris.Kernel.Firmament/Materializer/PrismaticProfileComposition.cs b/Aetheris.Kernel.Firmament/Materializer/PrismaticProfileComposition.cs
index 334ecd1c..a26394fd 100644
--- a/Aetheris.Kernel.Firmament/Materializer/PrismaticProfileComposition.cs
+++ b/Aetheris.Kernel.Firmament/Materializer/PrismaticProfileComposition.cs
@@ -90,6 +90,7 @@ public static class PrismaticProfileCompositionParser
private static readonly Regex ProfileHead = new(@"\bProfile\s+(?<n>\w+)\s+Using\s+(?<layout>\w+)\s*\{", RegexOptions.CultureInvariant);
private static readonly Regex Segment = new(@"\bSegment\s+(?<n>\w+)\s*\{\s*Trace\s*:\s*(?<trace>[\w.]+)\s*;?\s*From\s*:\s*(?<from>[\w.]+)\s*;?\s*To\s*:\s*(?<to>[\w.]+)(?:\s*;?\s*Sweep\s*:\s*(?<sweep>Clockwise|CounterClockwise))?", RegexOptions.Singleline | RegexOptions.CultureInvariant);
private static readonly Regex ComposeHead = new(@"\bCompose\s+(?<n>\w+)\s*\{", RegexOptions.CultureInvariant);
+ private static readonly Regex ModifyHead = new(@"\bModify\s+(?<target>\w+)\s*\{", RegexOptions.CultureInvariant);
private static readonly Regex Placement = new(@"\bPlacement\s+(?<n>\w+)\s*\{\s*Anchor\s*:\s*\[(?<x>[-+.\d]+)mm\s*,\s*(?<y>[-+.\d]+)mm\s*,\s*(?<z>[-+.\d]+)mm\]\s*;?\s*ProfilePlane\s*:\s*(?<plane>\w+)\s*;?\s*Axis\s*:\s*(?<axis>[+-][XYZ])\s*;?\s*ReferenceDirection\s*:\s*(?<reference>[+-][XYZ])", RegexOptions.Singleline | RegexOptions.CultureInvariant);
private static readonly Regex Operation = new(@"\b(?<intent>Base|Add|Remove)\s+(?<n>\w+)\s*\{\s*Profile\s*:\s*(?<profile>\w+)\s*;?\s*From\s*:\s*(?<from>[-+.\d]+)mm\s*;?\s*To\s*:\s*(?<to>[-+.\d]+)mm(?:\s*;?\s*Role\s*:\s*(?<role>\w+))?", RegexOptions.Singleline | RegexOptions.CultureInvariant);
private static readonly Regex HoleHeader = new(@"\bHole\s*<\s*(?<variant>\w+)\s*>\s+(?<n>\w+)\s*\{", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
@@ -183,6 +184,7 @@ public static class PrismaticProfileCompositionParser
if (!compose.Success) return new(null, profiles, diagnostics.Append("compose-source-missing-compose").ToArray());
var composeBody = Block(source, compose.Index + compose.Length - 1);
if (composeBody is null) return new(null, profiles, diagnostics.Append("compose-source-unclosed-compose").ToArray());
+ composeBody = BindExternalModifyFeatures(source, compose.Groups["n"].Value, composeBody, diagnostics);
var placementMatch = Placement.Match(composeBody);
var placement = new PrismaticProfilePlacement("LegacyImplicitWorldXY", 0d, 0d, 0d, "XY", "+Z", "+X", false);
if (placementMatch.Success)
@@ -340,6 +342,26 @@ public static class PrismaticProfileCompositionParser
return new(feature, profiles, diagnostics.Distinct().ToArray(), expansion.Evidence);
}
+ // The canonical Modify form is body-level syntax. Bind feature declarations
+ // targeting this Compose body into the existing section-stack feature path so
+ // they cannot be admitted and then silently omitted from exported geometry.
+ private static string BindExternalModifyFeatures(string source, string composeName, string composeBody, List<string> diagnostics)
+ {
+ var boundFeatures = new List<string>();
+ foreach (Match modify in ModifyHead.Matches(source))
+ {
+ var body = Block(source, source.IndexOf('{', modify.Index));
+ if (body is null || !Regex.IsMatch(body, @"\b(?:Hole\s*<|Slot\s*<|Pattern\s+)", RegexOptions.CultureInvariant)) continue;
+ if (!string.Equals(modify.Groups["target"].Value, composeName, StringComparison.Ordinal))
+ {
+ diagnostics.Add($"{FirmamentV2Parser.ModifyTargetNotBoundToActiveCompose}:target={modify.Groups["target"].Value}:compose={composeName}:features must target the active Compose body.");
+ continue;
+ }
+ boundFeatures.Add(body);
+ }
+ return boundFeatures.Count == 0 ? composeBody : composeBody + Environment.NewLine + string.Join(Environment.NewLine, boundFeatures);
+ }
+
private static ResolvedProfile2D CircleProfile(string profileName, double x, double y, double radius, string holeStableId, string sourceSpan)
{
var names = new[] { "EastToNorth", "NorthToWest", "WestToSouth", "SouthToEast" };
diff --git a/artifacts/release/preview1-capabilities.json b/artifacts/release/preview1-capabilities.json
index e43ee432..c91e76d7 100644
--- a/artifacts/release/preview1-capabilities.json
+++ b/artifacts/release/preview1-capabilities.json
@@ -21,7 +21,7 @@
"features": [
{"id":"primitives", "status":"Supported", "scope":"Exact Box, Cylinder, RoundedBox, Frustum.", "fixturePaths":["fixtures/FirmamentV2/Canonical/valid/bare-box.firmament", "fixtures/FirmamentV2/Canonical/valid/bare-cylinder.firmament", "fixtures/FirmamentV2/Canonical/valid/bare-rounded-box.firmament", "fixtures/FirmamentV2/Canonical/valid/bare-frustum.firmament"], "diagnostics":["firmament-v2-canonical-primitive-malformed"]},
{"id":"concept-struct-construction-plane", "status":"SupportedBounded", "scope":"Concept/Struct semantics and immutable traced frames; Box shaft ThroughAll on admitted signed-permutation frame.", "fixturePaths":["fixtures/FirmamentV2/Hole/valid/construction-plane-through-hole.firmament"], "diagnostics":["HoleConstructionPlaneHostUnsupported", "HoleConstructionPlaneOrientationUnsupported", "HoleConstructionPlaneExtentUnsupported"]},
- {"id":"concept-path-profile-compose", "status":"SupportedBounded", "scope":"Named line/arc paths, source-bound profiles, prismatic Compose, local-frame Top/Bottom.", "fixturePaths":["fixtures/FirmamentV2/Canonical/valid/concept-path-rectangle.firmament", "fixtures/FirmamentV2/Canonical/valid/concept-path-low-level-mixed.firmament", "fixtures/FirmamentV2/Canonical/valid/concept-path-inner-cutout.firmament", "fixtures/FirmamentV2/Canonical/valid/profile-compose-l-bracket.firmament"], "diagnostics":["concept-path-open-profile", "concept-path-wrong-winding", "concept-path-zero-radius-arc"]},
+ {"id":"concept-path-profile-compose", "status":"SupportedBounded", "scope":"Named line/arc paths lower to Profiles for Extrude. Compose supports low-level Profile Using/Layout Segment sources only; Concept Path-derived Profiles are not admitted by Compose.", "fixturePaths":["fixtures/FirmamentV2/Canonical/valid/concept-path-rectangle.firmament", "fixtures/FirmamentV2/Canonical/valid/concept-path-low-level-mixed.firmament", "fixtures/FirmamentV2/Canonical/valid/concept-path-inner-cutout.firmament", "fixtures/FirmamentV2/Canonical/valid/profile-compose-l-bracket.firmament"], "diagnostics":["concept-path-open-profile", "concept-path-wrong-winding", "concept-path-zero-radius-arc", "compose-operation-unresolved-profile"]},
{"id":"hole-shaft", "status":"SupportedBounded", "scope":"Face-local ThroughAll and documented blind/drill-point forms; Pattern generation and bounded construction-plane route.", "fixturePaths":["fixtures/FirmamentV2/Canonical/valid/box-through-hole.firmament", "fixtures/FirmamentV2/Hole/valid/feature-v2-shaft-hole-blind-step-verified.valid.firmfixture", "fixtures/FirmamentV2/Hole/valid/construction-plane-through-hole.firmament"], "diagnostics":["HoleConstructionPlaneExtentUnsupported", "hole-x4-unknown"]},
{"id":"hole-counterbore", "status":"SupportedBounded", "scope":"Required counterbore fields; primitive and +Z ThroughAll disjoint Profile/Compose host.", "fixturePaths":["fixtures/FirmamentV2/Canonical/valid/counterbore-hole.firmament", "fixtures/FirmamentV2/Canonical/valid/profile-compose-l-bracket-counterbore-pmi.firmament"], "diagnostics":["hole-x4-bad-counterbore", "ProfileBoundaryChamferIntersectsCounterbore"]},
{"id":"hole-countersink", "status":"SupportedBounded", "scope":"Required diameter and degree-angle fields on admitted simple host.", "fixturePaths":["fixtures/FirmamentV2/Canonical/valid/countersink-hole.firmament", "fixtures/FirmamentV2/Hole/valid/feature-v2-countersink-step-verified.valid.firmfixture"], "diagnostics":["firmament-v2-canonical-modify-malformed"]},
@@ -55,6 +55,7 @@
{"fixturePath":"fixtures/FirmamentV2/Canonical/invalid/pmi-projection-override-value.firmament", "diagnostic":"firmament-v2-pmi-projected-field-must-not-override-source-constraint"},
{"fixturePath":"fixtures/FirmamentV2/Canonical/invalid/pmi-projection-failed-require.firmament", "diagnostic":"Require validation gate"},
{"fixturePath":"fixtures/FirmamentV2/Canonical/invalid/concept-path-open-profile.firmament", "diagnostic":"open profile"},
+ {"fixturePath":"fixtures/FirmamentV2/Canonical/invalid/concept-path-compose-unresolved-profile.firmament", "diagnostic":"compose-operation-unresolved-profile"},
{"fixturePath":"fixtures/FirmamentV2/Canonical/invalid/profile-compose-l-bracket-edgefinish-unsupported.firmament", "diagnostic":"unsupported EdgeFinish route"},
{"fixturePath":"fixtures/FirmamentV2/Canonical/invalid/profile-compose-reflex-chamfer-shaft-collision.firmament", "diagnostic":"ProfileBoundaryChamferIntersectsShaft"},
{"fixturePath":"fixtures/FirmamentV2/Canonical/invalid/profile-compose-reflex-chamfer-counterbore-collision.firmament", "diagnostic":"ProfileBoundaryChamferIntersectsCounterbore"}
diff --git a/docs/firmament/v2-canonical-authoring.md b/docs/firmament/v2-canonical-authoring.md
index c85ca613..5eb26dc7 100644
--- a/docs/firmament/v2-canonical-authoring.md
+++ b/docs/firmament/v2-canonical-authoring.md
@@ -23,7 +23,7 @@ Firmament V2 is one language. Backend specialization is not an author-facing dia
### Concept Path
-For ordinary connected line/arc scaffolds, use `Concept Path`: its ordered entries emit named guides and endpoints and can be consumed directly with `Profile Name From PathName`, or with explicit `Loop Outer From` / `Loop Inner From` declarations. It does not replace low-level `Segment` authoring or validate a material boundary. See [Concept Path M1](v2-concept-path.md) and the [canonical fixtures](../../fixtures/FirmamentV2/Canonical/valid/concept-path-rectangle.firmament).
+For ordinary connected line/arc scaffolds, use `Concept Path`: its ordered entries emit named guides and endpoints and can be consumed directly with `Profile Name From PathName`, or with explicit `Loop Outer From` / `Loop Inner From` declarations. In Preview 1 those Profile forms are admitted by `Extrude`; `Compose` currently requires the low-level `Profile ... Using ... { Loop ... Segment ... }` form. It does not replace low-level `Segment` authoring or validate a material boundary. See [Concept Path M1](v2-concept-path.md) and the [canonical fixtures](../../fixtures/FirmamentV2/Canonical/valid/concept-path-rectangle.firmament).
Use this form for ordinary parts:
diff --git a/docs/release/preview1-docs-claudefooding.md b/docs/release/preview1-docs-claudefooding.md
index 9cc56ab1..15a150dd 100644
--- a/docs/release/preview1-docs-claudefooding.md
+++ b/docs/release/preview1-docs-claudefooding.md
@@ -11,7 +11,7 @@ sources so the review remains tied to executable release truth.
| --- | --- | --- | ---: | --- | --- |
| Rectangular plate | `fixtures/FirmamentV2/Canonical/valid/bare-box.firmament` | Success | 0 | Getting started; Language tour | None |
| Four patterned shaft holes | `fixtures/FirmamentV2/Canonical/valid/docs-four-hole-pattern.firmament` | Success | 0 | Static authoring; Slots and patterns; Holes | None |
-| Concept Path L-bracket | `fixtures/FirmamentV2/Canonical/valid/profile-compose-l-bracket.firmament` | Success | 0 | Concept Path; Profiles/Compose | None |
+| Low-level Profile/Compose L-bracket | `fixtures/FirmamentV2/Canonical/valid/profile-compose-l-bracket.firmament` | Success | 0 | Low-level Profiles/Compose | `Concept Path`-derived Profiles are Extrude-only in Preview 1. |
| Counterbored plate | `fixtures/FirmamentV2/Canonical/valid/counterbore-hole.firmament` | Success | 0 | Holes; Language reference | None |
| Supported Profile chamfer | `fixtures/FirmamentV2/Canonical/valid/profile-chamfer-mixed-convex-reflex-loop-top.firmament` | Success | 0 | Edge finishes | None |
| Supported bounded fillet | `fixtures/FirmamentV2/Canonical/valid/profile-fillet-reflex-two-segment-top.firmament` | Success | 0 | Edge finishes | None |
diff --git a/docs/release/preview1-feature-freeze.md b/docs/release/preview1-feature-freeze.md
index 9de9e74c..54e6d9dd 100644
--- a/docs/release/preview1-feature-freeze.md
+++ b/docs/release/preview1-feature-freeze.md
@@ -35,7 +35,7 @@ in the manifest.
| Box / Cylinder / RoundedBox / Frustum | Supported | Exact primitive declarations and their documented fields. |
| Concept, `Concept Struct`, Struct | SupportedBounded | Typed semantic scaffolds and material bodies; no general runtime language. |
| Construction Plane | SupportedBounded | Immutable traced frame; source hole route is Box + signed-permutation frame + shaft ThroughAll. |
-| Concept Path / Profile / Compose | SupportedBounded | Ordered line/arc paths and source-bound profile extrusion/composition. |
+| Concept Path / Profile / Compose | SupportedBounded | Concept Path-derived Profiles are admitted by Extrude; Compose currently requires low-level `Profile ... Using ... { Loop ... Segment ... }` source. |
| Modify / Selection | SupportedBounded | Modify admitted bodies; Selection is source-grounded, never anonymous B-rep inference. |
| Hole<Shaft>, Hole<Counterbore>, Hole<Countersink> | SupportedBounded | Exact combinations below. |
| Slot<Capsule>, Slot<RoundedRectangle> | SupportedBounded | Through-all semantic removals in admitted Compose bodies. |
@@ -68,7 +68,7 @@ means executable evidence exists but it is not promoted to the frozen matrix.
| --- | --- |
| Root and primitives | `Model N { Units: mm }`; `Box N { Size: [...] }`; `Cylinder N { Radius; Height }`; `RoundedBox N { Size; CornerRadius }`; `Frustum N { BottomRadius; TopRadius; Height }` |
| Semantic construction | `Concept`, `Concept Struct`, `Struct`; `Construction Plane N { Trace: ConceptPlane }`; use PascalCase field names. |
-| Paths and bodies | `Concept Path N { Start; Heading; Line/Arc; Close }`; `Profile N From Path`; `Profile N { Loop Outer { Segment ... } }`; `Compose N { Base ... }`; `Modify Body { ... }`. |
+| Paths and bodies | `Concept Path N { Start; Heading; Line/Arc; Close }`; `Profile N From Path` + `Extrude`; `Compose` requires `Profile N Using Layout { Loop Outer { Segment ... } }`; `Modify Body { ... }`. |
| Holes and slots | `Hole<Variant> N { On|From; Center; Diameter; End }`; Counterbore adds `CounterboreDiameter`, `CounterboreDepth`; Countersink adds `CountersinkDiameter`, `CountersinkAngle`; slots use `Center`, `Direction`, `Length`, `Width`, `Extent` and RoundedRectangle adds `CornerRadius`. |
| Edge finish and selection | `EdgeFinish N { Target; On; Kind; Distance|Radius }`; `Selection N { Target; Source; Require }`. |
| Static | `Record T { Field: Type }`; `Static N: T[] = [...]`; `Template N(T x) { ... }`; `Pattern N Over Values { Template(Current) }`; `Require N => comparison`. |
diff --git a/fixtures/FirmamentV2/Canonical/invalid/concept-path-compose-unresolved-profile.firmament b/fixtures/FirmamentV2/Canonical/invalid/concept-path-compose-unresolved-profile.firmament
new file mode 100644
index 00000000..c910a2ee
--- /dev/null
+++ b/fixtures/FirmamentV2/Canonical/invalid/concept-path-compose-unresolved-profile.firmament
@@ -0,0 +1,19 @@
+Model ConceptPathComposeUnresolvedProfile {
+ Units: mm
+
+ Concept Path PlateOutline {
+ Start: Point2(-20mm, -10mm)
+ Heading: 0deg
+ Line South { Length: 40mm }
+ Line East { Turn: 90deg; Length: 20mm }
+ Line North { Turn: 90deg; Length: 40mm }
+ Close West
+ }
+ Profile PlateProfile From PlateOutline
+
+ Struct PlateBody {
+ Compose PlateBody {
+ Base Stock { Profile: PlateProfile; From: 0mm; To: 10mm; Role: Stock }
+ }
+ }
+}
diff --git a/fixtures/FirmamentV2/Canonical/valid/profile-compose-l-bracket-external-modify-counterbore.firmament b/fixtures/FirmamentV2/Canonical/valid/profile-compose-l-bracket-external-modify-counterbore.firmament
new file mode 100644
index 00000000..7a852b87
--- /dev/null
+++ b/fixtures/FirmamentV2/Canonical/valid/profile-compose-l-bracket-external-modify-counterbore.firmament
@@ -0,0 +1,50 @@
+Model ProfileComposeLBracketExternalModifyCounterbore {
+ Units: mm
+
+ Record MountSpec { Center: Point2 Diameter: Length }
+ Static Mounts: MountSpec[] = [
+ MountSpec { Center: Point2(20mm, -10mm) Diameter: 6mm }
+ MountSpec { Center: Point2(-30mm, 20mm) Diameter: 6mm }
+ ]
+ Template BoltHole(MountSpec spec) {
+ Hole<Shaft> Mount {
+ On: +Z
+ Center: spec.Center
+ Diameter: spec.Diameter
+ End: ThroughAll
+ }
+ }
+
+ Concept Struct Layout On XY {
+ Rect2 Horizontal { Center: [0mm, -10mm]; Size: [80mm, 20mm] }
+ Rect2 Vertical { Center: [-30mm, 10mm]; Size: [20mm, 60mm] }
+ Point2 Notch { Position: [-20mm, 0mm] }
+ }
+
+ Profile Bracket Using Layout { Loop Outer {
+ Segment South { Trace: Horizontal.Bottom; From: Horizontal.BottomLeft; To: Horizontal.BottomRight }
+ Segment East { Trace: Horizontal.Right; From: Horizontal.BottomRight; To: Horizontal.TopRight }
+ Segment Inner { Trace: Horizontal.Top; From: Horizontal.TopRight; To: Notch }
+ Segment Upright { Trace: Vertical.Right; From: Notch; To: Vertical.TopRight }
+ Segment North { Trace: Vertical.Top; From: Vertical.TopRight; To: Vertical.TopLeft }
+ Segment West { Trace: Vertical.Left; From: Vertical.TopLeft; To: Horizontal.BottomLeft }
+ } }
+
+ Struct BracketBody {
+ Compose BracketBody {
+ Base Stock { Profile: Bracket; From: 0mm; To: 12mm; Role: Stock }
+ }
+ }
+
+ Modify BracketBody {
+ Pattern BoltPattern Over Mounts { BoltHole(Current) }
+ Hole<Counterbore> LocatingPin {
+ On: +Z
+ Center: Point2(-30mm, -10mm)
+ Diameter: 8mm
+ CounterboreDiameter: 14mm
+ CounterboreDepth: 4mm
+ End: ThroughAll
+ }
+ }
+}