Next Gen STEP AP242 Native-ish BREP Geometric Modeling Kernel
Update NIST snapshot after ctc_05 VERTEX_LOOP progression
Yuechen Li0e3d51b2c5f8
diff --git a/Aetheris.Kernel.Core.Tests/Step242/Step242LoopRoleNormalizationRegressionTests.cs b/Aetheris.Kernel.Core.Tests/Step242/Step242LoopRoleNormalizationRegressionTests.csindex 07b8411f..badad2c4 100644--- a/Aetheris.Kernel.Core.Tests/Step242/Step242LoopRoleNormalizationRegressionTests.cs+++ b/Aetheris.Kernel.Core.Tests/Step242/Step242LoopRoleNormalizationRegressionTests.cs@@ -6,7 +6,7 @@ public sealed class Step242LoopRoleNormalizationRegressionTests{[Theory][InlineData("testdata/step242/nist/CTC/nist_ctc_04_asme1_ap242-e1.stp", null, null)]- [InlineData("testdata/step242/nist/CTC/nist_ctc_05_asme1_ap242-e1.stp", "Entity:1234", "FACE_BOUND loop type 'VERTEX_LOOP' is unsupported")]+ [InlineData("testdata/step242/nist/CTC/nist_ctc_05_asme1_ap242-e1.stp", null, null)][InlineData("testdata/step242/nist/FTC/nist_ftc_07_asme1_ap242-e2.stp", null, null)][InlineData("testdata/step242/nist/FTC/nist_ftc_10_asme1_ap242-e2.stp", null, null)][InlineData("testdata/step242/nist/FTC/nist_ftc_11_asme1_ap242-e2.stp", null, null)]diff --git a/Aetheris.Kernel.Core/Step242/Step242Importer.cs b/Aetheris.Kernel.Core/Step242/Step242Importer.csindex abd566eb..26e7a762 100644--- a/Aetheris.Kernel.Core/Step242/Step242Importer.cs+++ b/Aetheris.Kernel.Core/Step242/Step242Importer.cs@@ -167,6 +167,7 @@ public static class Step242Importer}var isSphericalFace = string.Equals(surfaceName, "SPHERICAL_SURFACE", StringComparison.OrdinalIgnoreCase);+ var isConicalFace = string.Equals(surfaceName, "CONICAL_SURFACE", StringComparison.OrdinalIgnoreCase);var boundRefsResult = Step242SubsetDecoder.ReadAdvancedFaceBounds(faceEntity, advancedFaceOffset, "ADVANCED_FACE bounds");if (!boundRefsResult.IsSuccess)@@ -230,11 +231,6 @@ public static class Step242Importerif (string.Equals(loopEntityResult.Value.Name, "VERTEX_LOOP", StringComparison.OrdinalIgnoreCase)){- if (!isSphericalFace)- {- return Failure("FACE_BOUND loop type 'VERTEX_LOOP' is unsupported for non-spherical faces in M23 import subset.", $"Entity:{loopEntityResult.Value.Id}");- }-var vertexLoopRefResult = Step242SubsetDecoder.ReadReference(loopEntityResult.Value, 1, "VERTEX_LOOP vertex");if (!vertexLoopRefResult.IsSuccess){@@ -247,9 +243,23 @@ public static class Step242Importerreturn KernelResult<BrepBody>.Failure(vertexPointResult.Diagnostics);}- // Singular spherical bounds can be represented with VERTEX_LOOP. They do not map- // to edge/coedge topology in the current subset, so they are treated as degenerate trims.- continue;+ if (isSphericalFace)+ {+ // Singular spherical bounds can be represented with VERTEX_LOOP. They do not map+ // to edge/coedge topology in the current subset, so they are treated as degenerate trims.+ continue;+ }++ if (isConicalFace+ && bindSurfaceResult.Value.SurfaceGeometry.Cone is ConeSurface cone+ && (vertexPointResult.Value - cone.Apex).Length <= PointOnSurfaceEps)+ {+ // Narrow non-spherical support: singular conical apex trims represented as VERTEX_LOOP.+ // These are topologically degenerate and intentionally omitted from edge/coedge topology.+ continue;+ }++ return Failure("FACE_BOUND loop type 'VERTEX_LOOP' is unsupported for this face in M23 import subset.", $"Entity:{loopEntityResult.Value.Id}");}if (!string.Equals(loopEntityResult.Value.Name, "EDGE_LOOP", StringComparison.OrdinalIgnoreCase))diff --git a/testdata/step242/manifests/nist.v0.report.json b/testdata/step242/manifests/nist.v0.report.jsonindex 5acdce1b..d8adaa22 100644--- a/testdata/step242/manifests/nist.v0.report.json+++ b/testdata/step242/manifests/nist.v0.report.json@@ -102,9 +102,9 @@"status": "importFail","firstFailureLayer": "importer-topology","firstDiagnostic": {- "code": "NotImplemented",- "source": "Entity:1234",- "messagePrefix": "FACE_BOUND loop type \u0027VERTEX_LOOP\u0027 is unsupported for non-spherical faces in M23 import subset."+ "code": "ValidationFailed",+ "source": "Importer.LoopRole.UnsupportedSurfaceForHoles.Cone",+ "messagePrefix": "Multi-loop hole classification is unsupported for surface type \u0027Cone\u0027."},"diagnosticCount": 1,"exceptionEscaped": false,