Exemplo n.º 1
0
        public double DobivanjeDuljineLinka(string ime, double station)
        {
            double          ukupnaDuljina = 0;
            Baseline        bl            = corridors.SingleOrDefault(x => x.Name == _Naziv).Baselines[0] as Baseline;
            AppliedAssembly applied       = bl.GetAppliedAssemblyAtStation(station);


            CalculatedLinkCollection clLinks = applied.GetLinksByCode(ime);

            if (clLinks == null)
            {
                return(0);
            }

            foreach (CalculatedLink link in clLinks)
            {
                CalculatedPointCollection clPoints = link.CalculatedPoints;
                Point3d point1     = new Point3d(clPoints[0].StationOffsetElevationToBaseline.X, clPoints[0].StationOffsetElevationToBaseline.Y, clPoints[0].StationOffsetElevationToBaseline.Z);
                Point3d point2     = new Point3d(clPoints[1].StationOffsetElevationToBaseline.X, clPoints[1].StationOffsetElevationToBaseline.Y, clPoints[1].StationOffsetElevationToBaseline.Z);
                double  udaljenost = point1.DistanceTo(point2);
                ukupnaDuljina = ukupnaDuljina + udaljenost;
            }

            return(ukupnaDuljina);
        }
Exemplo n.º 2
0
        public Point3d PocetnaTockaNaStacionaziD(Corridor plovniPut)
        {
            Corridor corr = plovniPut;
            Baseline bl   = corr.Baselines[0];


            AppliedAssembly           appliedassy = bl.GetAppliedAssemblyAtStation(stacionaza);
            CalculatedPointCollection pts         = appliedassy.Points;


            CalculatedPointCollection ptsbycode = appliedassy.GetPointsByCode("UglavljeDesno");
            Point3d pt3     = ptsbycode[0].StationOffsetElevationToBaseline;
            Point3d ptWorld = bl.StationOffsetElevationToXYZ(pt3);


            return(ptWorld);
        }
Exemplo n.º 3
0
        protected Point3d TockaNaStacionazi(string kodTocke)
        {
            using (Transaction tr = doc.TransactionManager.StartTransaction())
            {
                Corridor corr = PlovniPutMetoda();
                Baseline bl   = corr.Baselines[0] as Baseline;

                bl.UpdateStation(stacionaza);
                AppliedAssembly appliedassy = bl.GetAppliedAssemblyAtStation(stacionaza);

                CalculatedPointCollection ptsbycode = appliedassy.GetPointsByCode(kodTocke);

                Point3d pt3     = ptsbycode[0].StationOffsetElevationToBaseline;
                Point3d ptWorld = bl.StationOffsetElevationToXYZ(pt3);

                tr.Commit();
                return(ptWorld);
            }
        }
Exemplo n.º 4
0
        public double DobivanjePovrsineShape(string ime, double station)
        {
            double                    ukupnaPovrsina = 0;
            Baseline                  bl             = corridors.SingleOrDefault(x => x.Name == _Naziv).Baselines[0] as Baseline;
            AppliedAssembly           applied        = bl.GetAppliedAssemblyAtStation(station);
            CalculatedShapeCollection clShape        = applied.GetShapesByCode(ime);

            if (clShape == null)
            {
                return(0);
            }

            foreach (CalculatedShape shape in clShape)
            {
                ukupnaPovrsina = ukupnaPovrsina + shape.Area;
            }

            return(ukupnaPovrsina);
        }