Skip to content

Next Gen STEP AP242 Native-ish BREP Geometric Modeling Kernel

Fix loop coedge wiring after loop normalization

Yuechen Li702ae8a205e2
diff --git a/Aetheris.Kernel.Core.Tests/Step242/Step242UnsupportedSurfaceForHolesRegressionTests.cs b/Aetheris.Kernel.Core.Tests/Step242/Step242UnsupportedSurfaceForHolesRegressionTests.cs
index 68023cb8..17471f7f 100644
--- a/Aetheris.Kernel.Core.Tests/Step242/Step242UnsupportedSurfaceForHolesRegressionTests.cs
+++ b/Aetheris.Kernel.Core.Tests/Step242/Step242UnsupportedSurfaceForHolesRegressionTests.cs
@@ -5,12 +5,18 @@ namespace Aetheris.Kernel.Core.Tests.Step242;
public sealed class Step242UnsupportedSurfaceForHolesRegressionTests
{
[Theory]
+ [InlineData(
+ "testdata/step242/nist/FTC/nist_ftc_08_asme1_ap242-e2.stp",
+ "tessellator",
+ "Topology.GraphValidator",
+ "Viewer.Tessellation.PlanarNonConvexTriangulationFailed",
+ "Face 4 planar loop triangulation failed because the polygon is not simple.")]
[InlineData(
"testdata/step242/nist/FTC/nist_ftc_11_asme1_ap242-e2.stp",
- "importer-topology",
- "Importer.LoopRole.TorusRepeatedSeamProjectionCollapse",
+ "tessellator",
"Topology.GraphValidator",
- "Loop 8 references missing child ID")]
+ "Viewer.Tessellation.CylinderTrimDegenerate",
+ "Cylindrical face tessellation derived a degenerate trim patch.")]
[InlineData(
"testdata/step242/nist/STC/nist_stc_06_asme1_ap242-e3.stp",
"importer-topology",
diff --git a/Aetheris.Kernel.Core/Step242/Step242Importer.cs b/Aetheris.Kernel.Core/Step242/Step242Importer.cs
index 762ed354..cb779feb 100644
--- a/Aetheris.Kernel.Core/Step242/Step242Importer.cs
+++ b/Aetheris.Kernel.Core/Step242/Step242Importer.cs
@@ -386,7 +386,6 @@ public static class Step242Importer
hasDisconnectedCoedgeGap = true;
}
- builder.AddLoop(new Loop(loopId, coedgeIds));
loopData.Add(new LoopBuildData(loopId, loopCoedges, loopSamples, hasDisconnectedCoedgeGap));
}
@@ -398,6 +397,7 @@ public static class Step242Importer
foreach (var loop in classifyResult.Value)
{
+ builder.AddLoop(new Loop(loop.LoopId, loop.Coedges.Select(c => c.Id).ToList()));
coedges.AddRange(loop.Coedges);
}
diff --git a/testdata/step242/manifests/nist.v0.report.json b/testdata/step242/manifests/nist.v0.report.json
index a0abd040..08779f19 100644
--- a/testdata/step242/manifests/nist.v0.report.json
+++ b/testdata/step242/manifests/nist.v0.report.json
@@ -196,18 +196,18 @@
"path": "testdata/step242/nist/FTC/nist_ftc_08_asme1_ap242-e2.stp",
"sizeBytes": 4658022,
"status": "importFail",
- "firstFailureLayer": "importer-topology",
+ "firstFailureLayer": "tessellator",
"firstDiagnostic": {
- "code": "ValidationFailed",
- "source": "Topology.GraphValidator",
- "messagePrefix": "Loop 73 references missing child ID CoedgeId { Value = 342, IsValid = True }."
+ "code": "NotImplemented",
+ "source": "Viewer.Tessellation.PlanarNonConvexTriangulationFailed",
+ "messagePrefix": "Face 4 planar loop triangulation failed because the polygon is not simple."
},
- "diagnosticCount": 20,
+ "diagnosticCount": 1,
"exceptionEscaped": false,
"topologyCounts": {
- "vertices": 0,
- "edges": 0,
- "faces": 0
+ "vertices": 396,
+ "edges": 616,
+ "faces": 247
},
"tessellationCounts": {
"facePatches": 0,
@@ -268,18 +268,18 @@
"path": "testdata/step242/nist/FTC/nist_ftc_11_asme1_ap242-e2.stp",
"sizeBytes": 1920822,
"status": "importFail",
- "firstFailureLayer": "importer-topology",
+ "firstFailureLayer": "tessellator",
"firstDiagnostic": {
- "code": "ValidationFailed",
- "source": "Topology.GraphValidator",
- "messagePrefix": "Loop 8 references missing child ID CoedgeId { Value = 38, IsValid = True }."
+ "code": "InvalidArgument",
+ "source": "Viewer.Tessellation.CylinderTrimDegenerate",
+ "messagePrefix": "Cylindrical face tessellation derived a degenerate trim patch."
},
- "diagnosticCount": 6,
+ "diagnosticCount": 1,
"exceptionEscaped": false,
"topologyCounts": {
- "vertices": 0,
- "edges": 0,
- "faces": 0
+ "vertices": 72,
+ "edges": 104,
+ "faces": 42
},
"tessellationCounts": {
"facePatches": 0,