@@ -2653,6 +2653,9 @@ public void Mesh2dGetPropertyNetlinkContourPolygonThroughApi()
26532653 // 3----4------5
26542654 // | | |
26552655 // 0----1------2
2656+ //
2657+ // Left cell: (0-1-4-3) => expected circumcenter (1.0, 1.5)
2658+ // Right cell: (1-2-5-4) => expected circumcenter (3.5, 1.5)
26562659 mesh . NumNodes = 6 ;
26572660 mesh . NumEdges = 7 ;
26582661 mesh . NodeX = new [ ] { 0.0 , 2.0 , 5.0 , 0.0 , 2.0 , 5.0 } ;
@@ -2665,16 +2668,32 @@ public void Mesh2dGetPropertyNetlinkContourPolygonThroughApi()
26652668 // Execute
26662669 Assert . That ( api . Mesh2dGetProperty ( id , PropertyType . NetlinkContourPolygon , LocationType . Edges , out propertyValues ) , Is . EqualTo ( 0 ) ) ;
26672670
2668- // Assert
2671+ // Assert - verifies that for each edge:
2672+ // - A polygon with 4 vertices is returned
2673+ // - The polygon consists of:
2674+ // - the two edge nodes
2675+ // - the circumcenters of the neighboring faces (1 or 2 depending on boundary/internal edge)
26692676 Assert . That ( propertyValues . NumberOfCoordinates , Is . EqualTo ( 28 ) ) ;
2670- Assert . That ( propertyValues . XCoordinates [ 20 ] , Is . EqualTo ( 1.0 ) ) ;
2671- Assert . That ( propertyValues . YCoordinates [ 20 ] , Is . EqualTo ( 3.0 ) ) ;
2672- Assert . That ( propertyValues . XCoordinates [ 21 ] , Is . EqualTo ( 1.0 ) ) ;
2673- Assert . That ( propertyValues . YCoordinates [ 21 ] , Is . EqualTo ( 0.0 ) ) ;
2674- Assert . That ( propertyValues . XCoordinates [ 22 ] , Is . EqualTo ( 3.5 ) ) ;
2675- Assert . That ( propertyValues . YCoordinates [ 22 ] , Is . EqualTo ( 0.0 ) ) ;
2676- Assert . That ( propertyValues . XCoordinates [ 23 ] , Is . EqualTo ( 3.5 ) ) ;
2677- Assert . That ( propertyValues . YCoordinates [ 23 ] , Is . EqualTo ( 3.0 ) ) ;
2677+ Assert . That ( propertyValues . XCoordinates , Is . EqualTo ( new [ ]
2678+ {
2679+ 2.0 , 0.0 , 0.0 , 2.0 , // edge 0-1
2680+ 5.0 , 2.0 , 2.0 , 5.0 , // edge 1-2
2681+ 0.0 , 2.0 , 2.0 , 0.0 , // edge 3-4
2682+ 2.0 , 5.0 , 5.0 , 2.0 , // edge 4-5
2683+ 1.0 , 1.0 , 0.0 , 0.0 , // edge 0-3
2684+ 1.0 , 1.0 , 3.5 , 3.5 , // edge 1-4
2685+ 3.5 , 3.5 , 5.0 , 5.0 // edge 2-5
2686+ } ) ) ;
2687+ Assert . That ( propertyValues . YCoordinates , Is . EqualTo ( new [ ]
2688+ {
2689+ 1.5 , 1.5 , 0.0 , 0.0 , // edge 0-1
2690+ 1.5 , 1.5 , 0.0 , 0.0 , // edge 1-2
2691+ 1.5 , 1.5 , 3.0 , 3.0 , // edge 3-4
2692+ 1.5 , 1.5 , 3.0 , 3.0 , // edge 4-5
2693+ 0.0 , 3.0 , 3.0 , 0.0 , // edge 0-3
2694+ 3.0 , 0.0 , 0.0 , 3.0 , // edge 1-4
2695+ 3.0 , 0.0 , 0.0 , 3.0 // edge 2-5
2696+ } ) ) ;
26782697 }
26792698 finally
26802699 {
0 commit comments