Skip to content

Next Gen STEP AP242 Native-ish BREP Geometric Modeling Kernel

Add Firmament V2 validation report

Yuechen Li72b1f24fbfa5
diff --git a/Aetheris.CLI/CliRunner.cs b/Aetheris.CLI/CliRunner.cs
index f9a9e0e1..9f2ad91a 100644
--- a/Aetheris.CLI/CliRunner.cs
+++ b/Aetheris.CLI/CliRunner.cs
@@ -2,6 +2,7 @@ using System.Text.Json;
using System.Text.Json.Serialization;
using Aetheris.Kernel.Firmament;
using Aetheris.Kernel.Firmament.Assembly;
+using Aetheris.Kernel.Firmament.FirmamentV2;
using Aetheris.Firmament.FrictionLab.CIRLab;
namespace Aetheris.CLI;
@@ -106,8 +107,9 @@ public static class CliRunner
string? Error,
string? Classification = null,
int? RigidRootCount = null);
- private const string TopLevelUsage = "Usage: aetheris <build|analyze|trace|canon|asm|experimental> <path> [options]";
+ private const string TopLevelUsage = "Usage: aetheris <build|validate|analyze|trace|canon|asm|experimental> <path> [options]";
private const string BuildUsage = "Usage: aetheris build <file.firmament> [--out <path>] [--json]";
+ private const string ValidateUsage = "Usage: aetheris validate <file.firmament|file.firmfixture> [--json]";
private const string AnalyzeUsage = "Usage: aetheris analyze <file.step> [--face <id>] [--edge <id>] [--vertex <id>] [--json]";
private const string AnalyzeMapUsage = "Usage: aetheris analyze map <file.step> (--plane <xy|xz|yz> --direction <+x|-x|+y|-y|+z|-z> | --views six --llm) --resolution <NxM> [--point <u,v>] [--rank-probes|--evidence-bundle] --json";
private const string AnalyzeSectionUsage = "Usage: aetheris analyze section <file.step> (--xy|--xz|--yz) --offset <value> --json";
@@ -161,6 +163,7 @@ public static class CliRunner
return args[0] switch
{
"build" => RunBuild(args.Skip(1).ToArray(), stdout, stderr),
+ "validate" => RunValidate(args.Skip(1).ToArray(), stdout, stderr),
"analyze" => RunAnalyze(args.Skip(1).ToArray(), stdout, stderr),
"trace" => RunTrace(args.Skip(1).ToArray(), stdout, stderr),
"canon" => RunCanon(args.Skip(1).ToArray(), stdout, stderr),
@@ -269,6 +272,55 @@ public static class CliRunner
return 0;
}
+
+ private static int RunValidate(string[] args, TextWriter stdout, TextWriter stderr)
+ {
+ if (args.Length == 0)
+ {
+ stderr.WriteLine(ValidateUsage);
+ return 1;
+ }
+
+ if (IsHelpFlag(args[0]))
+ {
+ stdout.WriteLine(ValidateUsage);
+ stdout.WriteLine(" --json Emit Firmament V2 validation report JSON.");
+ return 0;
+ }
+
+ var sourcePath = args[0];
+ var json = false;
+ for (var i = 1; i < args.Length; i++)
+ {
+ switch (args[i])
+ {
+ case "--json":
+ json = true;
+ break;
+ case "-h":
+ case "--help":
+ stdout.WriteLine(ValidateUsage);
+ return 0;
+ default:
+ stderr.WriteLine($"Unknown validate option '{args[i]}'.");
+ stderr.WriteLine(ValidateUsage);
+ return 1;
+ }
+ }
+
+ if (!File.Exists(sourcePath))
+ {
+ stderr.WriteLine($"Validation input was not found: {sourcePath}");
+ return 1;
+ }
+
+ var parse = FirmamentV2Parser.Parse(File.ReadAllText(sourcePath), Path.GetDirectoryName(Path.GetFullPath(sourcePath)));
+ var report = FirmamentV2ValidationReportBuilder.Build(parse, sourcePath);
+ if (json) stdout.WriteLine(JsonSerializer.Serialize(new { firmamentV2Validation = report }, JsonOptions));
+ else stdout.WriteLine($"Firmament V2 validation: {report.Status} ({report.Summary.FatalDiagnosticCount} fatal, {report.Summary.WarningDiagnosticCount} warning)");
+ return report.Status == "invalid" ? 1 : 0;
+ }
+
private static int RunTrace(string[] args, TextWriter stdout, TextWriter stderr)
{
if (args.Length > 0 && IsHelpFlag(args[0]))
@@ -2137,7 +2189,7 @@ public static class CliRunner
private static int UnknownCommand(string command, TextWriter stderr)
{
- stderr.WriteLine($"Unknown command '{command}'. Expected one of: build, analyze, trace, canon, asm, experimental.");
+ stderr.WriteLine($"Unknown command '{command}'. Expected one of: build, validate, analyze, trace, canon, asm, experimental.");
stderr.WriteLine("Run 'aetheris --help' for usage and examples.");
return 1;
}
@@ -2189,6 +2241,7 @@ public static class CliRunner
stdout.WriteLine();
stdout.WriteLine("Commands:");
stdout.WriteLine(" build Build a .firmament source file into STEP.");
+ stdout.WriteLine(" validate Validate Firmament V2 manufacturing intent and emit report JSON.");
stdout.WriteLine(" analyze Analyze STEP topology, geometry, map, and sections.");
stdout.WriteLine(" trace Trace built-in AIR lowering cases through route, BRepPlan, STEP smoke, and CIR mirror.");
stdout.WriteLine(" canon Import and re-export STEP/AP242 as canonical STEP.");
@@ -2201,6 +2254,7 @@ public static class CliRunner
stdout.WriteLine();
stdout.WriteLine("Examples:");
stdout.WriteLine(" aetheris build model.firmament --out model.step");
+ stdout.WriteLine(" aetheris validate fixtures/FirmamentV2/Language/valid/v2-phase1-validation-report.valid.firmfixture --json");
stdout.WriteLine(" aetheris analyze model.step");
stdout.WriteLine(" aetheris analyze model.step --json");
stdout.WriteLine(" aetheris trace --case top-face-loop-chamfer");
diff --git a/Aetheris.Kernel.Firmament.Tests/FirmamentV2ValidationReportTests.cs b/Aetheris.Kernel.Firmament.Tests/FirmamentV2ValidationReportTests.cs
new file mode 100644
index 00000000..d95c984c
--- /dev/null
+++ b/Aetheris.Kernel.Firmament.Tests/FirmamentV2ValidationReportTests.cs
@@ -0,0 +1,83 @@
+using Aetheris.Kernel.Firmament.FirmamentV2;
+
+namespace Aetheris.Kernel.Firmament.Tests;
+
+public sealed class FirmamentV2ValidationReportTests
+{
+ [Fact]
+ public void ValidationReport_ValidAuthoringFixtureSurfacesDeferredExport()
+ {
+ var report = Report("Language/valid/v2-phase1-validation-report.valid.firmfixture");
+
+ Assert.Equal("valid-with-deferred-export", report.Status);
+ Assert.Equal(7, report.Summary.LetCount);
+ Assert.Equal(4, report.Summary.TolerancedLetCount);
+ Assert.Equal(2, report.Summary.ConceptCount);
+ Assert.Equal(2, report.Summary.ValidConceptCount);
+ Assert.Equal(5, report.Summary.PmiRecordCount);
+ Assert.Equal(2, report.Summary.ExportSupportedPmiCount);
+ Assert.Equal(3, report.Summary.ExportDeferredPmiCount);
+ Assert.Equal(0, report.Summary.FatalDiagnosticCount);
+ Assert.Contains(report.Lets, l => l.Name == "MountingPattern.holeDiameter" && l.Tolerance is { Kind: "bilateral" });
+ Assert.Contains(report.Concepts, c => c.Kind == "feature" && c.Name == "mountHole" && c.Status == "valid" && c.Fields.Any(f => f.Name == "diameter" && f.HasTolerance));
+ Assert.Contains(report.Pmi, p => p.Name == "mountHoleDiameter" && p.ExportSupport == "supported" && p.Dimension?.Tolerance is not null);
+ Assert.Contains(report.Pmi, p => p.Name == "baseFlatness" && p.ExportSupport == "deferred");
+ Assert.Contains(report.Pmi, p => p.Name == "topParallel" && p.ExportSupport == "deferred" && p.DatumRefs.Contains("A"));
+ Assert.Contains(report.Diagnostics, d => d.Code == FirmamentV2Parser.ToleranceDroppedThroughArithmetic && d.Severity == "warning");
+ }
+
+ [Fact]
+ public void ValidationReport_ExportableSubsetHasNoDeferredRecords()
+ {
+ var report = Report("Language/valid/v2-phase1-validation-report-exportable.valid.firmfixture");
+
+ Assert.Equal("valid", report.Status);
+ Assert.Equal(2, report.Summary.PmiRecordCount);
+ Assert.Equal(2, report.Summary.ExportSupportedPmiCount);
+ Assert.Equal(0, report.Summary.ExportDeferredPmiCount);
+ Assert.DoesNotContain(report.Diagnostics, d => d.Severity == "fatal");
+ }
+
+ [Fact]
+ public void ValidationReport_MissingToleranceIsFatalPmiDiagnostic()
+ {
+ var report = Report("Language/invalid/v2-phase1-validation-report-missing-tolerance.invalid.firmfixture");
+
+ Assert.Equal("invalid", report.Status);
+ Assert.True(report.Summary.FatalDiagnosticCount > 0);
+ Assert.Contains(report.Diagnostics, d => d.Code == FirmamentV2Parser.PmiDimensionMissingTolerance && d.Severity == "fatal");
+ Assert.Contains(report.Pmi, p => p.Name == "d1" && p.Status == "invalid" && p.Diagnostics.Any(d => d.Code == FirmamentV2Parser.PmiDimensionMissingTolerance));
+ }
+
+ [Fact]
+ public void ValidationReport_ForgeMissingFieldIsFatalConceptDiagnostic()
+ {
+ var report = Report("Language/invalid/v2-phase1-validation-report-forge-missing-field.invalid.firmfixture");
+
+ Assert.Equal("invalid", report.Status);
+ Assert.Contains(report.Diagnostics, d => d.Code == FirmamentV2Parser.ConceptMissingRequiredField && d.Message.Contains("required", StringComparison.OrdinalIgnoreCase));
+ }
+
+ [Fact]
+ public void ValidationReport_UnknownDatumIsFatalPmiDiagnostic()
+ {
+ var report = Report("Language/invalid/v2-phase1-validation-report-unknown-datum.invalid.firmfixture");
+
+ Assert.Equal("invalid", report.Status);
+ Assert.Contains(report.Diagnostics, d => d.Code == FirmamentV2Parser.PmiUnknownDatum && d.Severity == "fatal");
+ }
+
+ private static FirmamentV2ValidationReport Report(string relative)
+ {
+ var path = Path.Combine(FindRepoRoot(), "fixtures/FirmamentV2", relative);
+ var parse = FirmamentV2Parser.Parse(File.ReadAllText(path), Path.GetDirectoryName(path));
+ return FirmamentV2ValidationReportBuilder.Build(parse, path);
+ }
+
+ private static string FindRepoRoot()
+ {
+ var dir = AppContext.BaseDirectory;
+ while (dir is not null && !File.Exists(Path.Combine(dir, "Aetheris.slnx"))) dir = Directory.GetParent(dir)?.FullName;
+ return dir ?? throw new DirectoryNotFoundException("Could not find Aetheris.slnx");
+ }
+}
diff --git a/Aetheris.Kernel.Firmament/FirmamentV2/FirmamentV2Parser.cs b/Aetheris.Kernel.Firmament/FirmamentV2/FirmamentV2Parser.cs
index dfbc58ab..dd25e31d 100644
--- a/Aetheris.Kernel.Firmament/FirmamentV2/FirmamentV2Parser.cs
+++ b/Aetheris.Kernel.Firmament/FirmamentV2/FirmamentV2Parser.cs
@@ -269,12 +269,13 @@ public static class FirmamentV2Parser
var (manufacturingConcepts, featureConcepts) = ParseConceptApplications(source, boundLets, boundLetRecords, diagnostics);
FirmamentV2Document? document = null;
- if (modelMatch.Success && unitsMatch.Success && solids.Count > 0 && !diagnostics.Any(IsFatalDiagnostic))
+ if (modelMatch.Success && unitsMatch.Success && solids.Count > 0)
document = new FirmamentV2Document(modelMatch.Groups["name"].Value, unitsMatch.Groups["units"].Value, solids, modifyBlocks, templates, pmi, recognizedRegions, replacements, lets, boundLets, letRecords, boundLetRecords, manufacturingConcepts, featureConcepts, pmiBlock, boundPmi);
- diagnostics.Add(document is null ? "firmament-v2-parse-failed" : "firmament-v2-parse-succeeded");
+ var hasFatalDiagnostics = diagnostics.Any(IsFatalDiagnosticCode);
+ diagnostics.Add(document is null || hasFatalDiagnostics ? "firmament-v2-parse-failed" : "firmament-v2-parse-succeeded");
diagnostics.Sort(StringComparer.Ordinal);
- return document is null ? FirmamentV2ParseResult.Failure(diagnostics) : FirmamentV2ParseResult.Success(document, diagnostics);
+ return document is null ? FirmamentV2ParseResult.Failure(diagnostics) : new FirmamentV2ParseResult(!hasFatalDiagnostics, document, diagnostics);
}
private static IReadOnlyList<FirmamentV2LetRecordDeclaration> ParseLetRecords(string source, IEnumerable<string> topLevelNames, List<string> diagnostics)
@@ -692,7 +693,7 @@ public static class FirmamentV2Parser
return new(name, "Box", new FirmamentV2BoxRecord(values, []), baseName, new Dictionary<string, IReadOnlyList<double>>(StringComparer.Ordinal) { ["size"] = values });
}
- private static bool IsFatalDiagnostic(string code) => code is 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 LetTypeMismatch 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;
+ public static bool IsFatalDiagnosticCode(string code) => code is 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 LetTypeMismatch 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;
private static IReadOnlyList<FirmamentV2Exposure> ParseExposures(string body, List<string> diagnostics)
{
@@ -833,7 +834,7 @@ public static class FirmamentV2Parser
if (route.Diagnostic is SideHoleRouteUnsupported && (attach.Kind == "Alias" || cut.Tool.Through.Kind == "Alias")) diagnostics.Add(SideHoleAliasResolvesToUnsupportedFace);
diagnostics.Add(SideHoleOnlyPlusXMinusXSupported);
}
- return diagnostics.Any(IsFatalDiagnostic) ? null : new(rm.Groups["name"].Value, "FaceAttachedRegion", attach, cut);
+ return diagnostics.Any(IsFatalDiagnosticCode) ? null : new(rm.Groups["name"].Value, "FaceAttachedRegion", attach, cut);
}
private static IReadOnlyList<FirmamentV2SemanticHoleDecl> ParseSemanticHoles(string body, FirmamentV2SolidBinding solid, List<string> diagnostics)
@@ -869,7 +870,7 @@ public static class FirmamentV2Parser
if (!(ReadPositive(hb, ["countersinkDiameter"], out var d) || (ReadPositive(hb, ["countersinkRadius"], out var r) && (d = r * 2d) > 0)) || d <= shaftDia) diagnostics.Add(HoleCountersinkInvalid); else csDia = d;
if (!ReadPositive(hb, ["countersinkAngle"], out var angle) || angle <= 0 || angle >= 180) diagnostics.Add(HoleCountersinkInvalid); else csAngle = angle;
}
- if (face is not null && center is not null && shaft && end is not null && !diagnostics.Any(IsFatalDiagnostic))
+ if (face is not null && center is not null && shaft && end is not null && !diagnostics.Any(IsFatalDiagnosticCode))
holes.Add(new(hm.Groups["name"].Value, variant, face, center with { Convention = FirmamentV2FaceLocalPoint2D.ConventionFor(face.Axis) }, shaftDia, end, cbDia, cbDepth, csDia, csAngle));
}
return holes;
diff --git a/Aetheris.Kernel.Firmament/FirmamentV2/FirmamentV2ValidationReport.cs b/Aetheris.Kernel.Firmament/FirmamentV2/FirmamentV2ValidationReport.cs
new file mode 100644
index 00000000..e2161eef
--- /dev/null
+++ b/Aetheris.Kernel.Firmament/FirmamentV2/FirmamentV2ValidationReport.cs
@@ -0,0 +1,102 @@
+using System.Globalization;
+
+namespace Aetheris.Kernel.Firmament.FirmamentV2;
+
+public sealed record FirmamentV2ValidationReport(
+ string Source,
+ string Status,
+ IReadOnlyList<FirmamentV2ValidationLet> Lets,
+ IReadOnlyList<FirmamentV2ValidationConcept> Concepts,
+ IReadOnlyList<FirmamentV2ValidationPmiRecord> Pmi,
+ FirmamentV2ValidationExportSupport ExportSupport,
+ IReadOnlyList<FirmamentV2ValidationDiagnostic> Diagnostics,
+ FirmamentV2ValidationSummary Summary);
+
+public sealed record FirmamentV2ValidationSummary(int LetCount, int TolerancedLetCount, int ConceptCount, int ValidConceptCount, int PmiRecordCount, int ExportSupportedPmiCount, int ExportDeferredPmiCount, int FatalDiagnosticCount, int WarningDiagnosticCount);
+public sealed record FirmamentV2ValidationDiagnostic(string Code, string Severity, string Message);
+public sealed record FirmamentV2ValidationExportSupport(int SupportedPmiCount, int DeferredPmiCount, IReadOnlyDictionary<string, string> Matrix);
+public sealed record FirmamentV2ValidationLet(string Name, string Type, string Nominal, FirmamentV2ValidationTolerance? Tolerance, string Source, IReadOnlyList<string> Dependencies, IReadOnlyList<FirmamentV2ValidationDiagnostic> Diagnostics);
+public sealed record FirmamentV2ValidationTolerance(string Kind, string Plus, string Minus);
+public sealed record FirmamentV2ValidationConcept(string Kind, string? Name, string Family, string Concept, string Status, string DfmStatus, IReadOnlyList<FirmamentV2ValidationConceptField> Fields, IReadOnlyList<FirmamentV2ValidationDiagnostic> Diagnostics);
+public sealed record FirmamentV2ValidationConceptField(string Name, string Type, bool HasTolerance, string Source);
+public sealed record FirmamentV2ValidationPmiRecord(string Kind, string Name, string Status, string ExportSupport, string? Target, IReadOnlyList<string> Targets, IReadOnlyList<string> DatumRefs, FirmamentV2ValidationDimension? Dimension, string? Reason, IReadOnlyList<FirmamentV2ValidationDiagnostic> Diagnostics);
+public sealed record FirmamentV2ValidationDimension(string Nominal, FirmamentV2ValidationTolerance? Tolerance);
+
+public static class FirmamentV2ValidationReportBuilder
+{
+ public static FirmamentV2ValidationReport Build(FirmamentV2ParseResult parse, string source = "inline")
+ {
+ var diagnostics = parse.Diagnostics.Distinct(StringComparer.Ordinal).Select(ToDiagnostic).ToArray();
+ var fatalCount = diagnostics.Count(d => d.Severity == "fatal");
+ var warningCount = diagnostics.Length - fatalCount;
+ var document = parse.Document;
+ var lets = document is null ? [] : BuildLets(document);
+ var concepts = document is null ? [] : BuildConcepts(document);
+ var pmi = document is null ? [] : BuildPmi(document, diagnostics);
+ var supported = pmi.Count(p => p.ExportSupport is "supported" or "supported-when-target-resolves");
+ var deferred = pmi.Count(p => p.ExportSupport == "deferred");
+ var status = fatalCount > 0 ? "invalid" : deferred > 0 ? "valid-with-deferred-export" : "valid";
+ var summary = new FirmamentV2ValidationSummary(lets.Count, lets.Count(l => l.Tolerance is not null), concepts.Count, concepts.Count(c => c.Status == "valid"), pmi.Count, supported, deferred, fatalCount, warningCount);
+ return new(source, status, lets, concepts, pmi, new(supported, deferred, ExportMatrix), diagnostics, summary);
+ }
+
+ private static IReadOnlyList<FirmamentV2ValidationLet> BuildLets(FirmamentV2Document d)
+ {
+ var rows = new List<FirmamentV2ValidationLet>();
+ foreach (var l in d.BoundLets ?? []) rows.Add(Let(l.Name, l, "let"));
+ foreach (var r in d.BoundLetRecords ?? []) foreach (var f in r.Fields.Values) rows.Add(Let($"{r.Name}.{f.Name}", f, "let-record"));
+ return rows.OrderBy(l => l.Name, StringComparer.Ordinal).ToArray();
+ }
+
+ private static IReadOnlyList<string> Dependencies(FirmamentV2BoundLet l) => l.Dependencies is null ? [] : l.Dependencies.Order(StringComparer.Ordinal).ToArray();
+
+ private static FirmamentV2ValidationLet Let(string name, FirmamentV2BoundLet l, string source) => new(name, TypeName(l.Type), FormatValue(l.Value), ToTolerance(l.Tolerance), source, Dependencies(l), []);
+
+ private static IReadOnlyList<FirmamentV2ValidationConcept> BuildConcepts(FirmamentV2Document d)
+ {
+ var rows = new List<FirmamentV2ValidationConcept>();
+ foreach (var c in d.ManufacturingConcepts ?? []) rows.Add(Concept("manufacturing", null, c.Application, c.BoundFields ?? []));
+ foreach (var c in d.FeatureConcepts ?? []) rows.Add(Concept("feature", c.Name, c.Application, c.BoundFields ?? []));
+ return rows;
+ }
+
+ private static FirmamentV2ValidationConcept Concept(string kind, string? name, FirmamentV2ConceptApplication app, IReadOnlyList<FirmamentV2BoundConceptField> fields)
+ {
+ var reportFields = fields.Select(f => new FirmamentV2ValidationConceptField(f.Name, f.TargetSource is not null ? "target" : f.BoundValue is null ? "unknown" : TypeName(f.BoundValue.InferredType), f.BoundValue?.AliasTolerance is not null, f.TargetSource ?? f.Field.Source)).ToArray();
+ var valid = FirmamentV2ForgeConceptRegistry.TryGet(app.FamilyName, app.ConceptName, out var descriptor) && descriptor.Fields.Values.Where(f => f.Required).All(f => reportFields.Any(r => r.Name == f.Name)) && reportFields.All(f => f.Type != "unknown");
+ return new(kind, name, app.FamilyName, app.ConceptName, valid ? "valid" : "invalid", "not-run", reportFields, []);
+ }
+
+ private static IReadOnlyList<FirmamentV2ValidationPmiRecord> BuildPmi(FirmamentV2Document d, IReadOnlyList<FirmamentV2ValidationDiagnostic> diagnostics)
+ {
+ var bound = (d.BoundPmi?.Datums ?? []).Concat(d.BoundPmi?.Dimensions ?? []).Concat(d.BoundPmi?.Controls ?? []).ToDictionary(r => r.Name, StringComparer.Ordinal);
+ return (d.PmiBlock?.Records ?? []).Select(r =>
+ {
+ bound.TryGetValue(r.Name, out var b);
+ var export = ExportSupport(r.Kind, b);
+ var itemDiagnostics = b is null ? diagnostics.Where(x => x.Code.StartsWith("firmament-v2-pmi-", StringComparison.Ordinal)).ToArray() : [];
+ var status = itemDiagnostics.Any(x => x.Severity == "fatal") ? "invalid" : export == "deferred" ? "export-deferred" : "valid";
+ return new FirmamentV2ValidationPmiRecord(KindName(r.Kind), r.Name, status, export, b?.Targets.FirstOrDefault() ?? Field(r, "target"), b?.Targets ?? [], b?.DatumRefs ?? [], Dimension(b), export == "deferred" ? DeferredReason(r.Kind) : null, itemDiagnostics);
+ }).ToArray();
+ }
+
+ private static FirmamentV2ValidationDimension? Dimension(FirmamentV2BoundPmiRecord? b)
+ {
+ if (b is null) return null;
+ if (b.DimensionValue is not null) return new(FormatValue(b.DimensionValue), ToTolerance(b.DimensionTolerance));
+ if (b.ControlTolerance is not null) return new(FormatValue(b.ControlTolerance), null);
+ return null;
+ }
+
+ private static FirmamentV2ValidationDiagnostic ToDiagnostic(string code) => new(code, FirmamentV2Parser.IsFatalDiagnosticCode(code) ? "fatal" : "warning", Message(code));
+ private static string Message(string code) => code switch { FirmamentV2Parser.PmiDimensionMissingTolerance => "PMI dimension resolves to a value without tolerance evidence.", FirmamentV2Parser.ConceptMissingRequiredField => "Forge concept application is missing a required descriptor field.", FirmamentV2Parser.PmiUnknownDatum => "PMI relation references an unknown datum.", FirmamentV2Parser.ToleranceDroppedThroughArithmetic => "A toleranced value was used in arithmetic and only the nominal value was preserved.", _ => code };
+ private static FirmamentV2ValidationTolerance? ToTolerance(FirmamentV2Tolerance? t) => t is null ? null : new(t.Kind == FirmamentV2ToleranceKind.Bilateral ? "bilateral" : "asymmetric", FormatNumber(t.Plus) + t.Unit, FormatNumber(t.Minus) + t.Unit);
+ private static string FormatValue(FirmamentV2LiteralValue v) => v.Unit is null ? Convert.ToString(v.Value, CultureInfo.InvariantCulture) ?? string.Empty : FormatNumber(v.NumericValue ?? 0) + v.Unit;
+ private static string FormatNumber(double value) => value.ToString("0.############", CultureInfo.InvariantCulture);
+ private static string TypeName(FirmamentV2PrimitiveType t) => t.ToString().ToLowerInvariant();
+ private static string KindName(FirmamentV2PmiKind k) => k switch { FirmamentV2PmiKind.HoleDiameter => "diameter", FirmamentV2PmiKind.DatumPlane => "datum", _ => k.ToString().ToLowerInvariant() };
+ private static string? Field(FirmamentV2PmiRecord r, string name) => r.Fields.TryGetValue(name, out var f) ? f.Source : null;
+ private static string ExportSupport(FirmamentV2PmiKind kind, FirmamentV2BoundPmiRecord? bound) => kind switch { FirmamentV2PmiKind.DatumPlane or FirmamentV2PmiKind.HoleDiameter => bound is null ? "supported-when-target-resolves" : "supported", _ => "deferred" };
+ private static string DeferredReason(FirmamentV2PmiKind kind) => $"AP242 lowering for {KindName(kind)} is not implemented in Phase 1 P1.";
+ private static readonly IReadOnlyDictionary<string, string> ExportMatrix = new Dictionary<string, string>(StringComparer.Ordinal) { ["datum"] = "supported-when-target-resolves", ["diameter"] = "supported-when-target-resolves", ["distance"] = "deferred", ["flatness"] = "deferred", ["parallel"] = "deferred", ["perpendicular"] = "deferred", ["coplanar"] = "deferred" };
+}
diff --git a/docs/implementation/v2-phase1-r1-validation-report.md b/docs/implementation/v2-phase1-r1-validation-report.md
new file mode 100644
index 00000000..d30f669b
--- /dev/null
+++ b/docs/implementation/v2-phase1-r1-validation-report.md
@@ -0,0 +1,114 @@
+# V2 Phase 1 R1 validation report
+
+R1 adds a structured validation/report integration layer for the Firmament V2 Phase 1 manufacturing-intent stack. It does not add authoring syntax, geometry behavior, DFM execution, graphical PMI, or new AP242 lowering.
+
+## Purpose
+
+The report makes the existing parser/binder output visible and auditable for humans, LLMs, demo packets, and future AP242 export verification. Given a parser-backed Firmament V2 file or fixture, it answers:
+
+- what scalar and record-field `let` values are declared;
+- which values carry explicit tolerance evidence;
+- which Forge concept applications bind against descriptors;
+- which PMI records bind;
+- which PMI dimensions are toleranced;
+- which PMI records are currently export-supported versus export-deferred;
+- which diagnostics are fatal and which are warnings.
+
+## CLI exposure
+
+The report is exposed through:
+
+```bash
+dotnet run --project Aetheris.CLI -- validate <firmament-or-firmfixture> --json
+```
+
+The JSON root is `firmamentV2Validation`.
+
+## Schema summary
+
+The top-level report shape is:
+
+```text
+firmamentV2Validation
+ source
+ status
+ lets[]
+ concepts[]
+ pmi[]
+ exportSupport
+ diagnostics[]
+ summary
+```
+
+Each `let` row includes a dotted name for record fields, declared type, evaluated nominal value, optional tolerance, source (`let` or `let-record`), dependency names when available, and item diagnostics.
+
+Each concept row includes kind (`manufacturing` or `feature`), optional feature name, family, concept, status, `dfmStatus: not-run`, bound fields, field type/kind, tolerance presence, field source, and diagnostics.
+
+Each PMI row includes kind, name, status, export support, targets, datum refs, optional dimension/tolerance, deferred-export reason where applicable, and diagnostics.
+
+## Status semantics
+
+Report status is deterministic:
+
+- `invalid`: at least one fatal diagnostic is present.
+- `valid-with-deferred-export`: no fatal diagnostics are present, but one or more authoring-valid PMI records have deferred AP242 export support.
+- `valid`: no fatal diagnostics and no deferred PMI records.
+
+Per-item status values are:
+
+- `valid`: item binds and is not export-deferred;
+- `invalid`: item has fatal diagnostics;
+- `export-deferred`: item is valid authoring data but AP242 lowering is deferred.
+
+Warnings do not make the report invalid. The L4 tolerance-dropped-through-arithmetic warning remains visible as a non-fatal diagnostic so nominal-only arithmetic cannot silently erase tolerance evidence.
+
+## Export support matrix
+
+R1 reports the current P1 state without adding AP242 export behavior:
+
+| PMI kind | R1 export support |
+| --- | --- |
+| `datum` | `supported` when the existing semantic datum export path has a bound target; otherwise `supported-when-target-resolves` |
+| `diameter` | `supported` when the existing semantic diameter export path has a bound target and dimension; otherwise `supported-when-target-resolves` |
+| `distance` | `deferred` |
+| `flatness` | `deferred` |
+| `parallel` | `deferred` |
+| `perpendicular` | `deferred` |
+| `coplanar` | `deferred` |
+
+Deferred export is explicit in both per-record rows and the summary; records are not silently ignored.
+
+## Example excerpt
+
+```json
+{
+ "firmamentV2Validation": {
+ "status": "valid-with-deferred-export",
+ "summary": {
+ "letCount": 7,
+ "tolerancedLetCount": 4,
+ "conceptCount": 2,
+ "validConceptCount": 2,
+ "pmiRecordCount": 5,
+ "exportSupportedPmiCount": 2,
+ "exportDeferredPmiCount": 3,
+ "fatalDiagnosticCount": 0,
+ "warningDiagnosticCount": 2
+ }
+ }
+}
+```
+
+## Diagnostics policy
+
+The report reuses Firmament V2 parser diagnostic codes and classifies them through the parser fatal-diagnostic table. Fatal diagnostics make the report `invalid`; warnings remain visible but non-blocking. Concept, PMI, tolerance, expression, and let-binding diagnostics are not hidden.
+
+## Non-scope
+
+R1 intentionally does not add:
+
+- new Firmament syntax;
+- new AP242 lowering or export behavior;
+- broad DFM execution (`dfmStatus` is `not-run`);
+- geometry/modeling behavior;
+- graphical PMI/layout behavior.
diff --git a/docs/v2/aetheris-v2-phase1-scope-contract.md b/docs/v2/aetheris-v2-phase1-scope-contract.md
index 3aeef329..0150cd74 100644
--- a/docs/v2/aetheris-v2-phase1-scope-contract.md
+++ b/docs/v2/aetheris-v2-phase1-scope-contract.md
@@ -429,7 +429,7 @@ L3: arithmetic expression graph + acyclic validation
L4: tolerance syntax and tolerant dimension values
F1: Forge concept-family application syntax — implemented for descriptor-validated `manufacturing process<CNC>` and `feature name: hole<Concept>` declarations; validation only, with no DFM execution, PMI lowering, or geometry/modeling behavior.
P1: pmi block v2 record-shaped dimensions/datums/basic controls — implemented for `datum`, `diameter`, `distance`, `flatness`, `parallel`, `perpendicular`, and `coplanar` authoring/binding. Datum and diameter can lower through existing semantic AP242 paths when targets resolve; distance/flatness/relation controls are preserved with export deferred.
-R1: validation/report integration
+R1: validation/report integration — implemented as a structured `firmamentV2Validation` report exposed by `aetheris validate <file-or-fixture> --json`, covering bound lets, tolerances, Forge concepts, PMI records, export-supported/deferred status, and fatal/non-fatal diagnostics without adding syntax or AP242 lowering. See [`../implementation/v2-phase1-r1-validation-report.md`](../implementation/v2-phase1-r1-validation-report.md).
D1: demo/update packet for V2.0 Phase 1 workflow
```
diff --git a/docs/v2/firmament-v2-concept-template-syntax-reconciliation.md b/docs/v2/firmament-v2-concept-template-syntax-reconciliation.md
index 74f9b84a..a90b184e 100644
--- a/docs/v2/firmament-v2-concept-template-syntax-reconciliation.md
+++ b/docs/v2/firmament-v2-concept-template-syntax-reconciliation.md
@@ -149,3 +149,7 @@ Phase 1 defers:
- PMI lowering for export-deferred controls;
- graphical PMI;
- full GD&T/Y14.5 coverage.
+
+## R1 validation report link
+
+The V2 Phase 1 R1 validation/report layer preserves this syntax doctrine while exposing bound lets, Forge concept applications, PMI records, tolerances, export-supported/deferred status, and diagnostics. See [`../implementation/v2-phase1-r1-validation-report.md`](../implementation/v2-phase1-r1-validation-report.md).
diff --git a/fixtures/FirmamentV2/Language/invalid/v2-phase1-validation-report-forge-missing-field.invalid.firmfixture b/fixtures/FirmamentV2/Language/invalid/v2-phase1-validation-report-forge-missing-field.invalid.firmfixture
new file mode 100644
index 00000000..13f6b6d9
--- /dev/null
+++ b/fixtures/FirmamentV2/Language/invalid/v2-phase1-validation-report-forge-missing-field.invalid.firmfixture
@@ -0,0 +1,18 @@
+// fixture-id: v2-phase1-validation-report-forge-missing-field
+// case: firmament-v2-phase1-validation-report-forge-missing-field
+// category: Language
+// syntax-version: FirmamentV2
+// validity: invalid
+// implementation: parser-backed
+// expected: invalid
+// expected-stage: validation-report
+// expected-parser: FirmamentV2Parser
+// notes: R1 validation report fixture for Forge required-field diagnostics.
+
+model ForgeMissingFieldProbe {
+ units mm
+ solid part: Box { size: [20, 20, 6] }
+ manufacturing process<CNC> {
+ material: "Aluminum6061"
+ }
+}
diff --git a/fixtures/FirmamentV2/Language/invalid/v2-phase1-validation-report-missing-tolerance.invalid.firmfixture b/fixtures/FirmamentV2/Language/invalid/v2-phase1-validation-report-missing-tolerance.invalid.firmfixture
new file mode 100644
index 00000000..bdd07b30
--- /dev/null
+++ b/fixtures/FirmamentV2/Language/invalid/v2-phase1-validation-report-missing-tolerance.invalid.firmfixture
@@ -0,0 +1,19 @@
+// fixture-id: v2-phase1-validation-report-missing-tolerance
+// case: firmament-v2-phase1-validation-report-missing-tolerance
+// category: Language
+// syntax-version: FirmamentV2
+// validity: invalid
+// implementation: parser-backed
+// expected: invalid
+// expected-stage: validation-report
+// expected-parser: FirmamentV2Parser
+// notes: R1 validation report fixture for missing PMI dimension tolerance.
+
+model MissingToleranceProbe {
+ units mm
+ let holeDiameter: length = 6.0mm
+ solid part: Box { size: [20, 20, 6] }
+ pmi {
+ diameter d1 { target: part.region("holeA") dimension: holeDiameter }
+ }
+}
diff --git a/fixtures/FirmamentV2/Language/invalid/v2-phase1-validation-report-unknown-datum.invalid.firmfixture b/fixtures/FirmamentV2/Language/invalid/v2-phase1-validation-report-unknown-datum.invalid.firmfixture
new file mode 100644
index 00000000..019eb691
--- /dev/null
+++ b/fixtures/FirmamentV2/Language/invalid/v2-phase1-validation-report-unknown-datum.invalid.firmfixture
@@ -0,0 +1,18 @@
+// fixture-id: v2-phase1-validation-report-unknown-datum
+// case: firmament-v2-phase1-validation-report-unknown-datum
+// category: Language
+// syntax-version: FirmamentV2
+// validity: invalid
+// implementation: parser-backed
+// expected: invalid
+// expected-stage: validation-report
+// expected-parser: FirmamentV2Parser
+// notes: R1 validation report fixture for unknown datum reference.
+
+model UnknownDatumProbe {
+ units mm
+ solid part: Box { size: [20, 20, 6] expose { face(+Z) => top } }
+ pmi {
+ parallel topParallel { target: top datum: A tolerance: 0.05mm }
+ }
+}
diff --git a/fixtures/FirmamentV2/Language/valid/v2-phase1-validation-report-exportable.valid.firmfixture b/fixtures/FirmamentV2/Language/valid/v2-phase1-validation-report-exportable.valid.firmfixture
new file mode 100644
index 00000000..2ee1979c
--- /dev/null
+++ b/fixtures/FirmamentV2/Language/valid/v2-phase1-validation-report-exportable.valid.firmfixture
@@ -0,0 +1,20 @@
+// fixture-id: v2-phase1-validation-report-exportable
+// case: firmament-v2-phase1-validation-report-exportable
+// category: Language
+// syntax-version: FirmamentV2
+// validity: valid
+// implementation: parser-backed
+// expected: valid
+// expected-stage: validation-report
+// expected-parser: FirmamentV2Parser
+// notes: R1 validation report fixture with only currently export-supported PMI authoring forms.
+
+model ValidationReportExportableProbe {
+ units mm
+ let holeDiameter: length = 6.0mm tol 0.05mm
+ solid part: Box { size: [20, 20, 6] expose { face(+Z) => top } }
+ pmi {
+ datum A { target: top }
+ diameter mountHoleDiameter { target: part.region("mountHoleA") dimension: holeDiameter }
+ }
+}
diff --git a/fixtures/FirmamentV2/Language/valid/v2-phase1-validation-report.valid.firmfixture b/fixtures/FirmamentV2/Language/valid/v2-phase1-validation-report.valid.firmfixture
new file mode 100644
index 00000000..b1b8393a
--- /dev/null
+++ b/fixtures/FirmamentV2/Language/valid/v2-phase1-validation-report.valid.firmfixture
@@ -0,0 +1,55 @@
+// fixture-id: v2-phase1-validation-report
+// case: firmament-v2-phase1-validation-report
+// category: Language
+// syntax-version: FirmamentV2
+// validity: valid
+// implementation: parser-backed
+// expected: valid
+// expected-stage: validation-report
+// expected-parser: FirmamentV2Parser
+// notes: R1 validation report fixture with lets, tolerances, Forge concepts, supported PMI, and export-deferred PMI.
+
+model ValidationReportProbe {
+ units mm
+
+ let Process {
+ minimumToolRadius: length = 1.5mm
+ materialName: string = "Aluminum6061"
+ }
+
+ let MountingPattern {
+ holeDiameter: length = 6.0mm tol 0.05mm
+ countersinkDiameter: length = 10.0mm tol 0.10mm
+ countersinkAngle: angle = 90deg tol 0.5deg
+ spacing: length = 12.0mm tol +0.10mm -0.05mm
+ }
+
+ let nominalRadius: length = MountingPattern.holeDiameter / 2
+
+ solid part: Box {
+ size: [30, 20, 8]
+ expose {
+ face(+Z) => top
+ }
+ }
+
+ manufacturing process<CNC> {
+ material: Process.materialName
+ minimumToolRadius: Process.minimumToolRadius
+ }
+
+ feature mountHole: hole<Countersink> {
+ target: part.region("mountHoleA")
+ diameter: MountingPattern.holeDiameter
+ countersinkDiameter: MountingPattern.countersinkDiameter
+ angle: MountingPattern.countersinkAngle
+ }
+
+ pmi {
+ datum A { target: top }
+ diameter mountHoleDiameter { target: part.region("mountHoleA") dimension: MountingPattern.holeDiameter }
+ distance holeSpacing { targetA: part.region("mountHoleA") targetB: part.region("mountHoleB") dimension: MountingPattern.spacing }
+ flatness baseFlatness { target: top tolerance: 0.03mm }
+ parallel topParallel { target: top datum: A tolerance: 0.05mm }
+ }
+}