CPPUNIT_ASSERT_EQUAL( false, aPolyline1->IsCustom() );
CPPUNIT_ASSERT_EQUAL( false, aPolyline2->IsCustom() );
- aPolyline2->SetShape( Wire( QList<double>() << 0 << 0 << 1 << 1 << 2 << 0 ) );
+ aPolyline2->SetShape( Wire( QList<double>() << 0 << 0 << 10 << 10 << 20 << 0 ) );
CPPUNIT_ASSERT_EQUAL( true, aPolyline2->IsCustom() );
HYDROData_PolylineXY::PointsList aPointsList = aPolyline2->GetPoints( 0 );
CPPUNIT_ASSERT_EQUAL( false, aPolyline2->IsCustom() );
- CPPUNIT_ASSERT_EQUAL( 33, aPointsList.Size() );
+ CPPUNIT_ASSERT_EQUAL( 5, aPointsList.Size() );
CPPUNIT_ASSERT_EQUAL( gp_XY( 0, 0 ), aPointsList.Value( 1 ) );
- CPPUNIT_ASSERT_EQUAL( gp_XY( 0.5625, 0.808594 ), aPointsList.Value( 10 ) );
- CPPUNIT_ASSERT_EQUAL( gp_XY( 1.1875, 0.964844 ), aPointsList.Value( 20 ) );
- CPPUNIT_ASSERT_EQUAL( gp_XY( 2, 0 ), aPointsList.Value( 33 ) );
+ CPPUNIT_ASSERT_EQUAL( gp_XY( 5, 7.5 ), aPointsList.Value( 2 ) );
+ CPPUNIT_ASSERT_EQUAL( gp_XY( 10, 10 ), aPointsList.Value( 3 ) );
+ CPPUNIT_ASSERT_EQUAL( gp_XY( 15, 7.5 ), aPointsList.Value( 4 ) );
+ CPPUNIT_ASSERT_EQUAL( gp_XY( 20, 0 ), aPointsList.Value( 5 ) );
CPPUNIT_ASSERT_EQUAL( false, aPolyline3->IsCustom() );
- aPolyline3->SetShape( WireCirc( gp_Pnt(), 1.0 ) );
+ aPolyline3->SetShape( WireCirc( gp_Pnt(), 10.0 ) );
CPPUNIT_ASSERT_EQUAL( true, aPolyline3->IsCustom() );
aPointsList = aPolyline3->GetPoints( 0 );
CPPUNIT_ASSERT_EQUAL( HYDROData_PolylineXY::SECTION_SPLINE, aPolyline3->GetSectionType( 0 ) );
CPPUNIT_ASSERT_EQUAL( true, aPolyline3->IsClosedSection( 0 ) );
- CPPUNIT_ASSERT_EQUAL( 71, aPointsList.Size() );
- CPPUNIT_ASSERT_EQUAL( gp_XY( 1, 0 ), aPointsList.Value( 1 ) );
- CPPUNIT_ASSERT_EQUAL( gp_XY( 0.699242, 0.714885 ), aPointsList.Value( 10 ) );
- CPPUNIT_ASSERT_EQUAL( gp_XY( -0.110394, 0.993888 ), aPointsList.Value( 20 ) );
- CPPUNIT_ASSERT_EQUAL( gp_XY( -0.839072, 0.54402 ), aPointsList.Value( 30 ) );
- CPPUNIT_ASSERT_EQUAL( gp_XY( -0.952415, -0.304806 ), aPointsList.Value( 40 ) );
- CPPUNIT_ASSERT_EQUAL( gp_XY( -0.367302, -0.930102 ), aPointsList.Value( 50 ) );
- CPPUNIT_ASSERT_EQUAL( gp_XY( 0.487173, -0.873306 ), aPointsList.Value( 60 ) );
- CPPUNIT_ASSERT_EQUAL( gp_XY( 0.996087, -0.0883801 ), aPointsList.Value( 71 ) );
+ CPPUNIT_ASSERT_EQUAL( 7, aPointsList.Size() );
+ CPPUNIT_ASSERT_EQUAL( gp_XY( 10, 0 ), aPointsList.Value( 1 ) );
+ CPPUNIT_ASSERT_EQUAL( gp_XY( 6.2349, 7.81831 ), aPointsList.Value( 2 ) );
+ CPPUNIT_ASSERT_EQUAL( gp_XY( -2.225, 9.749 ), aPointsList.Value( 3 ) );
+ CPPUNIT_ASSERT_EQUAL( gp_XY( -9.01, 4.339 ), aPointsList.Value( 4 ) );
+ CPPUNIT_ASSERT_EQUAL( gp_XY( -9.01, -4.339 ), aPointsList.Value( 5 ) );
+ CPPUNIT_ASSERT_EQUAL( gp_XY( -2.225, -9.749 ), aPointsList.Value( 6 ) );
+ CPPUNIT_ASSERT_EQUAL( gp_XY( 6.2349, -7.81831 ), aPointsList.Value( 7 ) );
aDoc->Close();
}