public override PileBase CreateNewPile(IPileProperty pileType, string pilecode, long pileId)
        {
            HCHXCodeQueryErrorCode status = pileQuery.QueryByRay(ref columnLayerInfoArray, pileType.PileTopPoint.Scale(1e4), pileType.PileBottomPoint.Scale(1e4));

            if (status != HCHXCodeQueryErrorCode.Success)
            {
                throw new ArgumentException("创建" + pilecode + "出错" + status.ToString());
            }
            var    resultlayer   = columnLayerInfoArray.GetSortedColumnLayerList();
            var    tempLayerBase = new ObservableCollection <SocketedPileSoilInfo>();
            double temppileLength;
            var    random = new Random();

            for (int i = 0; i < resultlayer.Count; i++)
            {
                if (i == resultlayer.Count - 1)
                {
                    temppileLength = resultlayer[i].TopPosition.Distance(pileType.PileBottomPoint.Scale(1e4));
                }
                else
                {
                    temppileLength = resultlayer[i].TopPosition.Distance(resultlayer[i + 1].TopPosition);
                }
                temppileLength = Math.Round(temppileLength * 1e-4, 2);
                tempLayerBase.Add(new SocketedPileSoilInfo()
                {
                    SoilLayerName = resultlayer[i].IntersectLayerInfo.Category, SoilLayerNum = resultlayer[i].IntersectLayerInfo.UserCode, PileInSoilLayerLength = temppileLength, Qfi = random.Next(), Xii = random.Next(), Xifi = random.NextDouble(), Xifi2 = random.NextDouble()
                });
            }
            return(new SocketedPile()
            {
                PileCode = pilecode, PileId = pileId, PilePropertyInfo = pileType, SocketedPileSoilLayerInfoProp = tempLayerBase, GammaCr = 1.1, GammaCs = 1.2, Frk = 10, Hr = 100, Xip = 100, Xis = 200, GammaTr = 1.2, GammaTs = 1.3, Xis2 = 1.5
            });
        }
Beispiel #2
0
 public override PileBase CreateNewPile(IPileProperty pileType, string pilecode, long pileId)
 {
     if (!(pileType is SquarePileGeometry) && !(pileType is SquareWithRoundHolePileGeometry) && !(pileType is PolygonPileGeometry))
     {
         throw new ArgumentOutOfRangeException("SoildPile must be one of these pile cross section (square,square with round hole, polygon)");
     }
     HCHXCodeQueryErrorCode status = pileQuery.QueryByRay(ref columnLayerInfoArray, pileType.PileTopPoint.Scale(1e4), pileType.PileBottomPoint.Scale(1e4));
     if (columnLayerInfoArray.m_layers.Count == 0)
         status = HCHXCodeQueryErrorCode.NoIntersection;
     if (status != HCHXCodeQueryErrorCode.Success)
         throw new ArgumentException("创建" + pilecode + "出错:" + status.ToString());
     var resultlayer = columnLayerInfoArray.GetSortedColumnLayerList();
     var tempLayerBase = new ObservableCollection<SoilLayerInfoBase>();
     double temppileLength;
     string soilName, soilNum;
     Regex regex = new Regex(@"\[.*\]");
     for (int i = 0; i < resultlayer.Count; i++)
     {
         if (i == resultlayer.Count - 1)
             temppileLength = resultlayer[i].TopPosition.Distance(pileType.PileBottomPoint.Scale(1e4));
         else
             temppileLength = resultlayer[i].TopPosition.Distance(resultlayer[i + 1].TopPosition);
         //temppileLength = Math.Round(temppileLength*1e-4,2);
         Match mc = regex.Match(resultlayer[i].IntersectLayerInfo.UserCode);
         soilName = soilNum = resultlayer[i].IntersectLayerInfo.UserCode;
         if (mc.Success)
         {
             soilName = mc.Value.Trim(new char[] { '[', ']' });
             soilNum = soilNum.Replace(mc.Value, string.Empty);
         }
         tempLayerBase.Add(new SoilLayerInfoBase() { SoilLayerName = soilName, SoilLayerNum = soilNum, PileInSoilLayerLength = temppileLength*1e-4, PileInSoilLayerTopZ = resultlayer[i].TopPosition.Z*1e-4, Qfi = resultlayer[i].IntersectLayerInfo.Qfi, Xii = resultlayer[i].IntersectLayerInfo.Xii });
     }
     return new SolidPile() { PileCode = pilecode, PileId = pileId, PilePropertyInfo = pileType, SolidPileSoilLayerInfoProp = tempLayerBase, GammaR = m_gammar, Qr = resultlayer.Last().IntersectLayerInfo.Qri };
 }
        public override PileBase CreateNewPile(IPileProperty pileType, string pilecode, long pileId)
        {
            if (!(pileType is AnnularPileGeometry))
            {
                throw new ArgumentOutOfRangeException("SteelAndPercastConcretePile must be Annular cross section!");
            }
            HCHXCodeQueryErrorCode status = pileQuery.QueryByRay(ref columnLayerInfoArray, pileType.PileTopPoint.Scale(1e4), pileType.PileBottomPoint.Scale(1e4));

            if (columnLayerInfoArray.m_layers.Count == 0)
            {
                status = HCHXCodeQueryErrorCode.NoIntersection;
            }
            if (status != HCHXCodeQueryErrorCode.Success)
            {
                throw new ArgumentException("创建" + pilecode + "出错" + status.ToString());
            }
            var    resultlayer   = columnLayerInfoArray.GetSortedColumnLayerList();
            var    tempLayerBase = new ObservableCollection <SoilLayerInfoBase>();
            double temppileLength;
            var    random = new Random();
            string soilName, soilNum;
            Regex  regex = new Regex(@"\[.*\]");

            for (int i = 0; i < resultlayer.Count; i++)
            {
                if (i == resultlayer.Count - 1)
                {
                    temppileLength = resultlayer[i].TopPosition.Distance(pileType.PileBottomPoint.Scale(1e4));
                }
                else
                {
                    temppileLength = resultlayer[i].TopPosition.Distance(resultlayer[i + 1].TopPosition);
                }
                //temppileLength = Math.Round(temppileLength * 1e-4, 2);
                Match mc = regex.Match(resultlayer[i].IntersectLayerInfo.UserCode);
                soilName = soilNum = resultlayer[i].IntersectLayerInfo.UserCode;
                if (mc.Success)
                {
                    soilName = mc.Value.Trim(new char[] { '[', ']' });
                    soilNum  = soilNum.Replace(mc.Value, string.Empty);
                }
                tempLayerBase.Add(new SoilLayerInfoBase()
                {
                    SoilLayerName = soilName, SoilLayerNum = soilNum, PileInSoilLayerLength = temppileLength * 1e-4, PileInSoilLayerTopZ = resultlayer[i].TopPosition.Z * 1e-4, Qfi = resultlayer[i].IntersectLayerInfo.Qfi, Xii = resultlayer[i].IntersectLayerInfo.Xii
                });
            }
            return(new SteelAndPercastConcretePile()
            {
                PileCode = pilecode, PileId = pileId, PilePropertyInfo = pileType, SteelAndPercastConcretPileLayerInfoProp = tempLayerBase, GammaR = m_gammar, Qr = resultlayer.Last().IntersectLayerInfo.Qri, Eta = m_eta                                       /*应该由最后一层土层性质决定,参见规范*/
            });
        }
        void GetPileCacluateInfo(out Dictionary <double, double> pilelengthbearingforce)
        {
            try
            {
                IPileProperty temppropinfo = m_pile.PilePropertyInfo.Clone() as IPileProperty;
                temppropinfo.PileBottomPoint = GetVirtualPileAxisBottomPoint(1.2 * GetActiveModelBoundaryZ() * 1e-4).DPoint3dToPoint3d();
                pilelengthbearingforce       = new Dictionary <double, double>(); //输出参数

                HCHXCodeQueryErrorCode status = pileQuery.QueryByRay(ref columnLayerInfoArray, temppropinfo.PileTopPoint.Scale(1e4), temppropinfo.PileBottomPoint.Scale(1e4));
                if (columnLayerInfoArray.m_layers.Count == 0)
                {
                    status = HCHXCodeQueryErrorCode.NoIntersection;
                }
                if (status != HCHXCodeQueryErrorCode.Success)
                {
                    throw new ArgumentException("创建出错:" + status.ToString());
                }
                var resultlayer = columnLayerInfoArray.GetSortedColumnLayerList();

                #region SoildPile
                if (m_pile is SolidPile)
                {
                    SolidPile solidpile      = m_pile as SolidPile;
                    double[]  qfiliacummlate = new double[resultlayer.Count];
                    double[]  qri            = new double[resultlayer.Count];
                    double    gammar         = solidpile.GammaR;
                    double    perimeter      = solidpile.PilePropertyInfo.GetPilePerimeter();
                    double    area           = solidpile.PilePropertyInfo.GetPileOutLineArea();

                    for (int i = 0; i < resultlayer.Count; i++)
                    {
                        qri[i] = resultlayer[i].IntersectLayerInfo.Qri;
                        if (i == 0)
                        {
                            qfiliacummlate[i] = resultlayer[i].IntersectLayerInfo.Qfi * (resultlayer[i].TopPosition.Distance(resultlayer[i + 1].TopPosition) * 1e-4);
                        }
                        else if (i == resultlayer.Count - 1)
                        {
                            qfiliacummlate[i] = qfiliacummlate[i - 1] + resultlayer[i].IntersectLayerInfo.Qfi * (resultlayer[i].TopPosition.Distance(temppropinfo.PileBottomPoint.Scale(1e4)) * 1e-4);
                        }
                        else
                        {
                            qfiliacummlate[i] = qfiliacummlate[i - 1] + resultlayer[i].IntersectLayerInfo.Qfi * (resultlayer[i].TopPosition.Distance(resultlayer[i + 1].TopPosition) * 1e-4);
                        }
                    }
                    pilelengthbearingforce.Add(resultlayer[0].TopPosition.Distance(temppropinfo.PileTopPoint.Scale(1e4)) * 1e-4, 0);
                    for (int i = 0; i < qfiliacummlate.Length - 1; i++)
                    {
                        pilelengthbearingforce.Add((resultlayer[i + 1].TopPosition.Distance(temppropinfo.PileTopPoint.Scale(1e4)) - 1) * 1e-4, (perimeter * qfiliacummlate[i] + qri[i] * area) / gammar);
                        pilelengthbearingforce.Add((resultlayer[i + 1].TopPosition.Distance(temppropinfo.PileTopPoint.Scale(1e4)) + 1) * 1e-4, (perimeter * qfiliacummlate[i] + qri[i + 1] * area) / gammar);
                    }
                    pilelengthbearingforce.Add(temppropinfo.GetPileLength(), (perimeter * qfiliacummlate.Last() + qri.Last() * area) / gammar);
                }
                if (m_pile is SteelAndPercastConcretePile)
                {
                    SteelAndPercastConcretePile spcpile = m_pile as SteelAndPercastConcretePile;
                    double[] qfiliacummlate             = new double[resultlayer.Count];
                    double[] qriWitheta = new double[resultlayer.Count];
                    double   gammar     = spcpile.GammaR;
                    double   eta        = spcpile.Eta;
                    double   perimeter  = spcpile.PilePropertyInfo.GetPilePerimeter();
                    double   area       = spcpile.PilePropertyInfo.GetPileOutLineArea();

                    for (int i = 0; i < resultlayer.Count; i++)
                    {
                        qriWitheta[i] = resultlayer[i].IntersectLayerInfo.Qri * eta;
                        if (i == 0)
                        {
                            qfiliacummlate[i] = resultlayer[i].IntersectLayerInfo.Qfi * (resultlayer[i].TopPosition.Distance(resultlayer[i + 1].TopPosition) * 1e-4);
                        }
                        else if (i == resultlayer.Count - 1)
                        {
                            qfiliacummlate[i] = qfiliacummlate[i - 1] + resultlayer[i].IntersectLayerInfo.Qfi * (resultlayer[i].TopPosition.Distance(temppropinfo.PileBottomPoint.Scale(1e4)) * 1e-4);
                        }
                        else
                        {
                            qfiliacummlate[i] = qfiliacummlate[i - 1] + resultlayer[i].IntersectLayerInfo.Qfi * (resultlayer[i].TopPosition.Distance(resultlayer[i + 1].TopPosition) * 1e-4);
                        }
                    }
                    pilelengthbearingforce.Add(resultlayer[0].TopPosition.Distance(temppropinfo.PileTopPoint.Scale(1e4)) * 1e-4, 0);
                    for (int i = 0; i < qfiliacummlate.Length - 1; i++)
                    {
                        pilelengthbearingforce.Add((resultlayer[i + 1].TopPosition.Distance(temppropinfo.PileTopPoint.Scale(1e4)) - 1) * 1e-4, (perimeter * qfiliacummlate[i] + qriWitheta[i] * area) / gammar);
                        pilelengthbearingforce.Add((resultlayer[i + 1].TopPosition.Distance(temppropinfo.PileTopPoint.Scale(1e4)) + 1) * 1e-4, (perimeter * qfiliacummlate[i] + qriWitheta[i + 1] * area) / gammar);
                    }
                    pilelengthbearingforce.Add(temppropinfo.GetPileLength(), (perimeter * qfiliacummlate.Last() + qriWitheta.Last() * area) / gammar);
                }
                #endregion
            }
            catch
            {
                throw;
            }
        }