/// <summary> /// 根据标贯计算承载力和压缩模量函数 /// </summary> public static void CalcuByNTest(List <StatisticNTest> _nTestStatisticList, string _soilType) { // 没有统计数据时退出 if (_nTestStatisticList == null) { return; } // 初始化标贯/动探结构体 ClearNTestStatisticResult(); // 定义统计指标 double ntestValue = Constants.NullNumber; ZkNTest.ntype ntestType = ZkNTest.ntype.N; // 提取数据库中的试验指标 for (int i = 0; i < _nTestStatisticList.Count; i++) { if (_nTestStatisticList[i].Layer == LayerNumber) { ntestValue = _nTestStatisticList[i].StandardValue == Constants.NullNumber ? _nTestStatisticList[i].Average : _nTestStatisticList[i].StandardValue; ntestType = _nTestStatisticList[i].Type; } } // 按规范和土质类型提取并计算填充指标 if (CurrentStandard == "Hubei") { if (ntestValue != Constants.NullNumber) { if (ntestType == ZkNTest.ntype.N) { StatisticResult.NTestParameter = ntestType.ToString() + "(击)= " + ntestValue.ToString("0.0"); StatisticResult.FrictionByNTest = CalcuFrictionByNTest(CurrentStandard, _soilType, ntestValue) == Constants.NullNumber ? "/" : CalcuFrictionByNTest(CurrentStandard, _soilType, ntestValue).ToString("0.0"); StatisticResult.CohesionByNTest = CalcuCohesionByNTest(CurrentStandard, _soilType, ntestValue) == Constants.NullNumber ? "/" : CalcuCohesionByNTest(CurrentStandard, _soilType, ntestValue).ToString("0.0"); } else { StatisticResult.NTestParameter = "/"; StatisticResult.FrictionByNTest = "/"; StatisticResult.CohesionByNTest = "/"; } } else { StatisticResult.NTestParameter = "/"; StatisticResult.FrictionByNTest = "/"; StatisticResult.CohesionByNTest = "/"; } } }
/// <summary> /// 绘制标贯/动探函数 /// </summary> /// <param name="_depth">标贯/动探深度</param> /// <param name="_maxDepth">最大钻探深度</param> /// <param name="_value">标贯/动探击数</param> /// <param name="_type">标贯/动探类型</param> private void DrawZkNTest(double _depth, double _maxDepth, double _value, ZkNTest.ntype _type) { // 提取绘图区域宽度和高度 double w = this.ZkCanvas.Width; double h = this.ZkCanvas.Height; // 设置地面Y坐标 double dmy = 50; // 计算试验Y坐标 double y = dmy + (h - dmy) * (_depth / _maxDepth); // 计算试验标签 string nTestLabel = _type.ToString() + "=" + _value.ToString(); // 绘图 this.ZkCanvas.DrawText(w / 2 + 30, y - 8, nTestLabel, 14, Brushes.Brown, true, true, true); }