Esempio n. 1
0
        /// <summary>
        /// 生成拱肋节点、单元
        /// </summary>
        /// <returns></returns>
        void GenArchPoints()
        {
            Database db = Application.DocumentManager.MdiActiveDocument.Database;
            DBPoint  Ni, Nj;
            Line     Elem = new Line();
            DBPoint  Node;

            for (int j = 0; j < 2; j++)
            {
                foreach (double x0 in Xlist)
                {
                    double xx = x0 / 1000;
                    double yy = 0.9397 * Math.Sqrt(200 * xx - xx * xx + 7963.93) - 0.9397 * Math.Sqrt(7963.93);
                    double zz = 0;
                    if (j == 0)
                    {
                        zz = 0.3420 * Math.Sqrt(200 * xx - xx * xx + 7963.93) - 0.3420 * Math.Sqrt(7963.93);
                    }
                    else
                    {
                        zz = 0.3420 * Math.Sqrt(200 * xx - xx * xx + 7963.93) - 0.3420 * Math.Sqrt(7963.93);
                        zz = -zz - 35.8;
                    }
                    Point3d pt = new Point3d(xx * 1000, yy * 1000, zz * 1000);
                    Node = new DBPoint(pt);
                    Node.SetNodeId(db, GlobalNodeId);
                    NodeList.Add(Node);
                    GlobalNodeId++;

                    // 单元
                    Nj = Node;
                    if (x0 != Xlist[0])
                    {
                        var previesid = from n in NodeList where n.GetID() == Nj.GetID() - 1 select n;
                        Ni   = previesid.ToList()[0];
                        Elem = new Line(Ni.Position, Nj.Position);
                        int nk = j == 0 ? 9999 : 8888;
                        Elem.SetElemXData(db, Ni.GetID(), Nj.GetID(), nk, GlobalElemId, "拱肋");
                        ElemList.Add(Elem);
                        double dx     = Math.Max(Math.Abs(Nj.Position.X - 100000), Math.Abs(Ni.Position.X - 100000));
                        double height = 3000 + dx / 100000 * 500;
                        ArchHeightList.Add(GlobalElemId, height);
                        if (Math.Abs(x0 - 100000) >= 40000)
                        {
                            ArchThickList.Add(GlobalElemId, 70);
                        }
                        else if (Math.Abs(x0 - 100000) >= 20000)
                        {
                            ArchThickList.Add(GlobalElemId, 60);
                        }
                        else
                        {
                            ArchThickList.Add(GlobalElemId, 50);
                        }
                        GlobalElemId++;
                    }
                }
            }

            return;
        }
Esempio n. 2
0
        /// <summary>
        /// 生成桥面系
        /// </summary>
        void GenBeamPoints()
        {
            Database db = Application.DocumentManager.MdiActiveDocument.Database;
            DBPoint  Ni, Nj;
            Line     Elem = new Line();
            DBPoint  Node;

            foreach (double x0 in Xlist)
            {
                foreach (double z0 in Zlist)
                {
                    if ((x0 == Xlist[0] || x0 == Xlist[Xlist.Length - 1]) && (z0 != Zlist[1]))
                    {
                        continue;
                    }
                    Node = new DBPoint(new Point3d(x0, 0, z0));
                    Node.SetNodeId(db, GlobalNodeId);
                    NodeList.Add(Node);
                    GlobalNodeId++;
                }
            }

            foreach (double x0 in Xlist)
            {
                foreach (double z0 in Zlist)
                {
                    if (z0 == Zlist[0])
                    {
                        continue;
                    }
                    else
                    {
                        var njsel = from nn in NodeList
                                    where nn.Position.X == x0 && nn.Position.Z == z0
                                    select nn;
                        Nj = njsel.ToList()[0];

                        int index = Zlist.ToList().FindIndex(item => item.Equals(z0));
                        var nisel = from nj in NodeList
                                    where nj.Position.X == x0 && nj.Position.Z == Zlist[index - 1]
                                    select nj;
                        Ni   = nisel.ToList()[0];
                        Elem = new Line(Ni.Position, Nj.Position);
                        Elem.SetElemXData(db, Ni.GetID(), Nj.GetID(), 7777, GlobalElemId, "刚臂");
                        ElemList.Add(Elem);
                        GlobalElemId++;
                    }
                }
            }
            foreach (double x0 in Xlist)
            {
                double z0 = -17900;
                if (x0 != Xlist[0])
                {
                    var njsel = from nn in NodeList
                                where nn.Position.X == x0 && nn.Position.Z == z0
                                select nn;
                    Nj = njsel.ToList()[0];
                    int index = Xlist.ToList().FindIndex(item => item.Equals(x0));
                    var nisel = from nj in NodeList
                                where nj.Position.X == Xlist[index - 1] && nj.Position.Z == z0
                                select nj;
                    Ni   = nisel.ToList()[0];
                    Elem = new Line(Ni.Position, Nj.Position);
                    Elem.SetElemXData(db, Ni.GetID(), Nj.GetID(), 7777, GlobalElemId, "主梁");

                    //if (z0==Zlist[2])
                    //{
                    //    Elem.SetElemXData(db, Ni.GetID(), Nj.GetID(),7777, GlobalElemId,"主梁");
                    //}
                    //else
                    //{
                    //    Elem.SetElemXData(db, Ni.GetID(), Nj.GetID(),7777,GlobalElemId, "刚臂");
                    //}

                    ElemList.Add(Elem);
                    GlobalElemId++;
                }
            }
        }