Index: src/Deltares.DSoilModel.Forms/DrawingCPT.cs =================================================================== diff -u -r383 -r590 --- src/Deltares.DSoilModel.Forms/DrawingCPT.cs (.../DrawingCPT.cs) (revision 383) +++ src/Deltares.DSoilModel.Forms/DrawingCPT.cs (.../DrawingCPT.cs) (revision 590) @@ -31,7 +31,8 @@ private List waterPressurePoints = new List(); private double width = 10; // default display width private double zLocal = 0; - + private const double Kpa2Mpa = 0.001; + /// /// Maximum Friction value used for scaling the CPT graph /// @@ -237,24 +238,23 @@ double dataQcMax = 0, dataFrictionMax = 0, dataWaterPressureMax = 0; - // auto scale the axes ? foreach (var row in conePenetrationTestData.CPTDatarows) { // note: sometimes the void values are inconsistent ! - if (row.qc != qcVoid && row.qc != frictionVoid) + if (!double.IsNaN(row.qc) && row.qc != qcVoid && row.qc != frictionVoid) { - qcPoints.Add(new Point3D(row.qc, 0d, row.Level)); - dataQcMax = Math.Max(dataQcMax, row.qc); + qcPoints.Add(new Point3D(row.qc * Kpa2Mpa, 0d, row.Level)); + dataQcMax = Math.Max(dataQcMax, row.qc * Kpa2Mpa); } - if (row.friction != frictionVoid && row.friction != qcVoid && conePenetrationTestData.ConeType != ConeType.Ball) + if (!double.IsNaN(row.friction) && row.friction != frictionVoid && row.friction != qcVoid && conePenetrationTestData.ConeType != ConeType.Ball) { - frictionPoints.Add(new Point3D(row.friction, 0d, row.Level)); - dataFrictionMax = Math.Max(dataFrictionMax, row.friction); + frictionPoints.Add(new Point3D(row.friction * Kpa2Mpa, 0d, row.Level)); + dataFrictionMax = Math.Max(dataFrictionMax, row.friction * Kpa2Mpa); } - if (row.WaterPressureSpecified && row.WaterPressure != waterPressureVoid && conePenetrationTestData.ConeType != ConeType.Ball) + if (!double.IsNaN(row.WaterPressure) && row.WaterPressureSpecified && row.WaterPressure != waterPressureVoid && conePenetrationTestData.ConeType != ConeType.Ball) { - waterPressurePoints.Add(new Point3D(row.WaterPressure, 0d, row.Level)); - dataWaterPressureMax = Math.Max(dataWaterPressureMax, row.WaterPressure); + waterPressurePoints.Add(new Point3D(row.WaterPressure * Kpa2Mpa, 0d, row.Level)); + dataWaterPressureMax = Math.Max(dataWaterPressureMax, row.WaterPressure * Kpa2Mpa); } } qcMax = (qcMax == 0) ? dataQcMax : qcMax;