Esempio n. 1
0
        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
            });
        }
Esempio n. 2
0
        public static void TestPileQuery()
        {
            HCHXCodeQuery clr1 = new HCHXCodeQuery();

            ColumnLayerInfoArray columnLayerInfo = new ColumnLayerInfoArray();
            Point3d startPoint = new Point3d();
            Point3d endPoint   = new Point3d();

            startPoint.X = -1342015;
            startPoint.Y = 681099;
            startPoint.Z = 789160;

            endPoint.X = -1342015;
            endPoint.Y = 681099;
            endPoint.Z = -1264281;
            HCHXCodeQueryErrorCode status = clr1.QueryByRay(ref columnLayerInfo, startPoint, endPoint);

            OutputResult("D:\\Longe.txt", columnLayerInfo);


            ColumnLayerInfoArray columnLayerInfo1 = new ColumnLayerInfoArray();
            Point3d startPoint1 = new Point3d();
            Point3d endPoint1   = new Point3d();

            startPoint1.X = -942187;
            startPoint1.Y = 681099;
            startPoint1.Z = 789160;

            endPoint1.X = -942187;
            endPoint1.Y = 681099;
            endPoint1.Z = -588254;
            status      = clr1.QueryByRay(ref columnLayerInfo1, startPoint1, endPoint1);

            OutputResult("D:\\Small.txt", columnLayerInfo1);
        }
Esempio n. 3
0
        public static void TestHCHXQueryLib()
        {
            HCHXCodeQuery clr1 = new HCHXCodeQuery();

            AllLayerInfo           idInfo = new AllLayerInfo();
            HCHXCodeQueryErrorCode status = clr1.QueryById(ref idInfo, "6782");

            OutputResult("D:\\QueryAllResult6782.txt", idInfo);


            status = clr1.QueryById(ref idInfo, "4358");
            OutputResult("D:\\QueryAllResult4358.txt", idInfo);

            ColumnLayerInfoArray columnLayerInfo = new ColumnLayerInfoArray();
            Point3d startPoint = new Point3d();
            Point3d endPoint   = new Point3d();

            startPoint.X = 173928.573996;
            startPoint.Y = 46617.477392;
            startPoint.Z = 36875.226081;

            endPoint.X = 28714.044367;
            endPoint.Y = 130457.125163;
            endPoint.Z = -801521.251635;
            status     = clr1.QueryByRay(ref columnLayerInfo, startPoint, endPoint);

            OutputResult("D:\\QueryAllResultRay.txt", columnLayerInfo);

            System.Windows.MessageBox.Show("Finished");
        }
Esempio n. 4
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                                       /*应该由最后一层土层性质决定,参见规范*/
            });
        }
Esempio n. 6
0
        public void SearchByRay()
        {
            Info = "";
            Point3d startPoint = ParseStringToPoint3d(StartPoint);
            Point3d endPoint   = ParseStringToPoint3d(EndPoint);
            ColumnLayerInfoArray   columnLayerInfo = new ColumnLayerInfoArray();
            HCHXCodeQueryErrorCode status          = PileQuery.QueryByRay(ref columnLayerInfo, startPoint, endPoint);

            if (status != HCHXCodeQueryErrorCode.Success)
            {
                System.Windows.MessageBox.Show($"查找出现错误!\n{status}", "查找出现错误", System.Windows.MessageBoxButton.OK, System.Windows.MessageBoxImage.Error);
                return;
            }
            var columnLayerList = columnLayerInfo.GetSortedColumnLayerList();

            Pile              = new PileInfoClass();
            Pile.SoilInfo     = new ObservableCollection <SoilInfoClass>();
            Pile.PileId       = -1;
            Pile.PileCode     = $"此为虚拟桩\n顶部坐标为:{StartPoint}\r\n底部坐标为:{EndPoint}\n";
            Pile.PileDiameter = 1000;
            Pile.PileLength   = GetLengthByVertex(startPoint, endPoint);
            Pile.CalParameter = new CalculateParameter {
                GammaR = 1.2
            };

            var random = new Random(); //测试

            for (int i = 0; i < columnLayerList.Count; i++)
            {
                double pileinsoilLenght;
                if (i == columnLayerList.Count - 1)
                {
                    pileinsoilLenght = GetLengthByVertex(columnLayerList[i].TopPosition, ParseStringToPoint3d(EndPoint));
                }
                else
                {
                    pileinsoilLenght = GetLengthByVertex(columnLayerList[i].TopPosition, columnLayerList[i + 1].TopPosition);
                }

                Pile.SoilInfo.Add(new SoilInfoClass(columnLayerList[i].IntersectLayerInfo.Category, columnLayerList[i].IntersectLayerInfo.UserCode, pileinsoilLenght * 1e-4, random.NextDouble() * 10 + 100, random.NextDouble() * 10 * +100));
            }
            //foreach (var columnInfo in columnLayerInfo.m_layers)
            //{
            //    Pile.SoilInfo.Add(new SoilInfoClass(columnInfo.IntersectLayerInfo.Category, columnInfo.IntersectLayerInfo.UserCode, columnInfo.TopPosition, columnInfo.BasePosition));
            //}
            Info = "查找完成";
        }
Esempio n. 7
0
        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;
            }
        }