当前位置: 首页>>代码示例>>C#>>正文


C# Section.GetPermanentElementsInCampaign方法代码示例

本文整理汇总了C#中Section.GetPermanentElementsInCampaign方法的典型用法代码示例。如果您正苦于以下问题:C# Section.GetPermanentElementsInCampaign方法的具体用法?C# Section.GetPermanentElementsInCampaign怎么用?C# Section.GetPermanentElementsInCampaign使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Section的用法示例。


在下文中一共展示了Section.GetPermanentElementsInCampaign方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreateSketch


//.........这里部分代码省略.........
                        {
                            continue;
                        }

                        List<SteelThicknessGaugingPoint> gaugingPointsBySketch = new List<SteelThicknessGaugingPoint>();
                        if (sectionGaugingPointsBySketch != null && sectionGaugingPointsBySketch.Count > 0)
                        {
                            gaugingPointsBySketch.AddRange(sectionGaugingPointsBySketch);
                        }
                        if (symmetricGaugingPointsBySketch != null && symmetricGaugingPointsBySketch.Count > 0)
                        {
                            gaugingPointsBySketch.AddRange(symmetricGaugingPointsBySketch);
                        }

                        pointsPerSketch.Add(index, gaugingPointsBySketch);
                        index++;

                        #region Compute gauging points in symmetric section

                        List<SteelThicknessGaugingPoint> pointsToBeDeleted = new List<SteelThicknessGaugingPoint>();

                        if (symmetricGaugingPointsBySketch != null && symmetricGaugingPointsBySketch.Count > 0)
                        {
                            #region Clone gauging points only in SB side, to PS side to be renderized in sketch

                            #region Find center plane parallel to X and Z axis

                            BoundingBox sectionBoundingBox = new BoundingBox();
                            BoundingBox symmetricBoundingBox = new BoundingBox();

                            List<Campaign> originalCampaigns = vessel.GetOriginalCampaigns();
                            foreach (Campaign campaign in originalCampaigns)
                            {
                                IList platesInCampaign = section.GetPermanentElementsInCampaign(campaign, true, "Plate");
                                if (platesInCampaign != null && platesInCampaign.Count > 0)
                                {
                                    foreach (Plate plate in platesInCampaign)
                                    {
                                        sectionBoundingBox.Union(plate.Design.Geometry.BoundingBox);
                                    }
                                }

                                platesInCampaign = symmetricSection.GetPermanentElementsInCampaign(campaign, true, "Plate");
                                if (platesInCampaign != null && platesInCampaign.Count > 0)
                                {
                                    foreach (Plate plate in platesInCampaign)
                                    {
                                        symmetricBoundingBox.Union(plate.Design.Geometry.BoundingBox);
                                    }
                                }
                            }

                            BoundingBox boundingBox = new BoundingBox(sectionBoundingBox);
                            boundingBox.Union(symmetricBoundingBox);

                            Plane plane = new Plane(new Vector3D(0, 1, 0), boundingBox.Center);

                            #endregion

                            SortedList<int, List<SteelThicknessGaugingPoint>> sectionOrganizedGaugingPoints = this.OrganizeIACSGaugingPointsByID(sectionGaugingPointsBySketch);
                            foreach (SteelThicknessGaugingPoint symmetricGaugingPoint in symmetricGaugingPointsBySketch)
                            {
                                if (sectionOrganizedGaugingPoints.ContainsKey((int)symmetricGaugingPoint.IACSReportLocationData.ID))
                                {
                                    bool haveSymmetricPoint = false;
                                    foreach (SteelThicknessGaugingPoint symmetricOrganizedGaugingPoint in sectionOrganizedGaugingPoints[(int)symmetricGaugingPoint.IACSReportLocationData.ID])
开发者ID:phdsoft,项目名称:Teste_de_Codigo,代码行数:67,代码来源:CampaignConverter.cs

示例2: DefineInitialIACSID

        private int DefineInitialIACSID(Section section)
        {
            int initialID = 0;

            IList steelThicknessGaugingPointsInCampaign = null;
            //section.GetPermanentElementsInCampaign(this.iacsCampaign, false, "SteelThicknessGaugingPoint");
            section.GetPermanentElementsInCampaign(this.averageCampaign, false, "SteelThicknessGaugingPoint");

            if (steelThicknessGaugingPointsInCampaign != null && steelThicknessGaugingPointsInCampaign.Count > 0)
            {
                foreach (SteelThicknessGaugingPoint steelThicknessGaugingPoint in steelThicknessGaugingPointsInCampaign)
                {
                    if (!steelThicknessGaugingPoint.IACSReportLocationData.IsIDNull && steelThicknessGaugingPoint.IACSReportLocationData.ID > initialID)
                    {
                        initialID = steelThicknessGaugingPoint.IACSReportLocationData.ID;
                    }
                }
            }

            return initialID;
        }
开发者ID:phdsoft,项目名称:Teste_de_Codigo,代码行数:21,代码来源:CampaignConverter.cs


注:本文中的Section.GetPermanentElementsInCampaign方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。