update 2dm tests that had forced scientific notation

This commit is contained in:
uclaros 2025-02-21 01:16:53 +02:00 committed by Nyall Dawson
parent 626efeafe6
commit dc64593b19
4 changed files with 30 additions and 55 deletions

View File

@ -779,7 +779,16 @@ void TestQgsMapToolEditMesh::testDelaunayRefinement()
QVERIFY( layer->commitFrameEditing( transform, false ) );
QGSCOMPARELONGSTR( "edit_no_delaunay_refinement", "not_delaunay.2dm", TestQgsMapToolEditMesh::read2DMFileContent( copyDataPath1 ).toUtf8() );
QCOMPARE( layer->nativeMesh()->face( 0 ), QVector<int>() << 1 << 4 << 0 );
QCOMPARE( layer->nativeMesh()->face( 1 ), QVector<int>() << 1 << 3 << 4 );
QCOMPARE( layer->nativeMesh()->face( 2 ), QVector<int>() << 5 << 2 << 0 << 4 );
QCOMPARE( layer->nativeMesh()->face( 3 ), QVector<int>() << 2 << 6 << 1 );
QCOMPARE( layer->nativeMesh()->face( 4 ), QVector<int>() << 5 << 7 << 2 );
QCOMPARE( layer->nativeMesh()->face( 5 ), QVector<int>() << 6 << 2 << 7 );
QCOMPARE( layer->nativeMesh()->face( 6 ), QVector<int>() << 7 << 8 << 6 );
QCOMPARE( layer->nativeMesh()->face( 7 ), QVector<int>() << 9 << 0 << 2 );
QCOMPARE( layer->nativeMesh()->face( 8 ), QVector<int>() << 9 << 2 << 1 );
QCOMPARE( layer->nativeMesh()->face( 9 ), QVector<int>() << 9 << 1 << 0 );
// editing with delaunay refinement
mEditMeshMapTool->mWidgetActionDigitizing->mCheckBoxRefineNeighboringFaces->setChecked( true );
@ -789,7 +798,6 @@ void TestQgsMapToolEditMesh::testDelaunayRefinement()
layer = std::make_unique<QgsMeshLayer>( copyDataPath2, "not delaunay", "mdal" );
layer->setCrs( crs3857 );
QVERIFY( layer->isValid() );
layer->startFrameEditing( transform, error, false );
QVERIFY( error == QgsMeshEditingError() );
@ -811,7 +819,16 @@ void TestQgsMapToolEditMesh::testDelaunayRefinement()
QVERIFY( layer->commitFrameEditing( transform, false ) );
QGSCOMPARELONGSTR( "edit_delaunay_refinement", "delaunay.2dm", TestQgsMapToolEditMesh::read2DMFileContent( copyDataPath2 ).toUtf8() );
QCOMPARE( layer->nativeMesh()->face( 0 ), QVector<int>() << 5 << 2 << 0 << 4 );
QCOMPARE( layer->nativeMesh()->face( 1 ), QVector<int>() << 5 << 7 << 2 );
QCOMPARE( layer->nativeMesh()->face( 2 ), QVector<int>() << 6 << 2 << 7 );
QCOMPARE( layer->nativeMesh()->face( 3 ), QVector<int>() << 7 << 8 << 6 );
QCOMPARE( layer->nativeMesh()->face( 4 ), QVector<int>() << 9 << 0 << 2 );
QCOMPARE( layer->nativeMesh()->face( 5 ), QVector<int>() << 9 << 1 << 0 );
QCOMPARE( layer->nativeMesh()->face( 6 ), QVector<int>() << 9 << 6 << 1 );
QCOMPARE( layer->nativeMesh()->face( 7 ), QVector<int>() << 6 << 9 << 2 );
QCOMPARE( layer->nativeMesh()->face( 8 ), QVector<int>() << 3 << 0 << 1 );
QCOMPARE( layer->nativeMesh()->face( 9 ), QVector<int>() << 0 << 3 << 4 );
}
QString TestQgsMapToolEditMesh::read2DMFileContent( const QString &filePath )

View File

@ -1,21 +0,0 @@
MESH2D
ND 1 2.50000000e+00 2.00000000e+00 0
ND 2 3.00000000e+00 7.50000000e+00 0
ND 3 8.00000000e+00 2.50000000e+00 0
ND 4 1.50000000e+00 2.50000000e+00 0
ND 5 1.50000000e+00 0.00000000e+00 0
ND 6 8.00000000e+00 0.00000000e+00 0
ND 7 7.50000000e+00 7.50000000e+00 0
ND 8 1.00000000e+01 0.00000000e+00 0
ND 9 9.50000000e+00 3.50000000e+00 0
ND 10 4.49476987e+00 3.49895397e+00 0
E4Q 1 6 3 1 5
E3T 2 6 8 3
E3T 3 7 3 8
E3T 4 8 9 7
E3T 5 10 1 3
E3T 6 10 2 1
E3T 7 10 7 2
E3T 8 7 10 3
E3T 9 4 1 2
E3T 10 1 4 5

View File

@ -1,21 +0,0 @@
MESH2D
ND 1 2.50000000e+00 2.00000000e+00 0
ND 2 3.00000000e+00 7.50000000e+00 0
ND 3 8.00000000e+00 2.50000000e+00 0
ND 4 1.50000000e+00 2.50000000e+00 0
ND 5 1.50000000e+00 0.00000000e+00 0
ND 6 8.00000000e+00 0.00000000e+00 0
ND 7 7.50000000e+00 7.50000000e+00 0
ND 8 1.00000000e+01 0.00000000e+00 0
ND 9 9.50000000e+00 3.50000000e+00 0
ND 10 4.49476987e+00 3.49895397e+00 0
E3T 1 2 5 1
E3T 2 2 4 5
E4Q 3 6 3 1 5
E3T 4 3 7 2
E3T 5 6 8 3
E3T 6 7 3 8
E3T 7 8 9 7
E3T 8 10 1 3
E3T 9 10 3 2
E3T 10 10 2 1

View File

@ -1,14 +1,14 @@
MESH2D
ND 1 2.00000000e+03 2.00000000e+03 200
ND 2 2.50000000e+03 2.50000000e+03 800
ND 3 2.00000000e+03 3.00000000e+03 200
ND 4 1.00000000e+03 3.00000000e+03 200
ND 5 1.50000000e+03 1.50000000e+03 -200
ND 6 7.00000000e+02 1.75000000e+03 -200
ND 7 4.00000000e+03 4.00000000e+03 0
ND 8 4.00000000e+03 4.10000000e+03 0
ND 9 4.10000000e+03 4.00000000e+03 0
ND 10 4.10000000e+03 4.10000000e+03 0
ND 1 2000 2000 200
ND 2 2500 2500 800
ND 3 2000 3000 200
ND 4 1000 3000 200
ND 5 1500 1500 -200
ND 6 700 1750 -200
ND 7 4000 4000 0
ND 8 4000 4100 0
ND 9 4100 4000 0
ND 10 4100 4100 0
E3T 1 1 2 3
E3T 2 4 1 3
E3T 3 1 4 6