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


C# Section.PointOverDomainEntity方法代码示例

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


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

示例1: CreateSketch


//.........这里部分代码省略.........
                            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])
                                    {
                                        if (symmetricOrganizedGaugingPoint.IACSReportLocationData.IsForward == symmetricGaugingPoint.IACSReportLocationData.IsForward)
                                        {
                                            haveSymmetricPoint = true;
                                            break;
                                        }
                                    }

                                    if (haveSymmetricPoint)
                                    {
                                        continue;
                                    }
                                }

                                Point3D pointPosition = new Point3D(symmetricGaugingPoint.PointGeometry.Position);
                                pointPosition = (Point3D)pointPosition.Mirror(plane);
                                Vector3D pointNormal = new Vector3D(symmetricGaugingPoint.PointGeometry.Normal * -1);

                                int geometryID, geometryPartID;
                                List<string> elementTypeNames = new List<string>();
                                elementTypeNames.Add(symmetricGaugingPoint.TargetElement.GetBaseType().Name);
                                Point3D closestPoint;
                                SectionElement sectionElement = section.PointOverDomainEntity(pointPosition, elementTypeNames, 0.01, out closestPoint, out geometryID, out geometryPartID) as SectionElement;
                                if (sectionElement == null)
                                {
                                    continue;
                                }

                                AverageSteelThicknessGaugingPoint averageSteelThicknessGaugingPoint = new AverageSteelThicknessGaugingPoint();

                                averageSteelThicknessGaugingPoint.PointGeometry.Position = pointPosition;
                                averageSteelThicknessGaugingPoint.PointGeometry.Normal = pointNormal;

                                averageSteelThicknessGaugingPoint.Section = section;
                                averageSteelThicknessGaugingPoint.Campaign = campaignReport.Campaign;
                                averageSteelThicknessGaugingPoint.CampaignReport = campaignReport;
                                averageSteelThicknessGaugingPoint.TargetElement = sectionElement as IWorkableElement;
                                averageSteelThicknessGaugingPoint.TargetElementGeometryID = geometryID;
                                averageSteelThicknessGaugingPoint.TargetElementGeometrySegmentID = geometryPartID;
                                averageSteelThicknessGaugingPoint.TargetElementPart = symmetricGaugingPoint.TargetElementPart;
                                averageSteelThicknessGaugingPoint.Active = true;

                                averageSteelThicknessGaugingPoint.IACSReportLocationData.ID = symmetricGaugingPoint.IACSReportLocationData.ID;
                                averageSteelThicknessGaugingPoint.IACSReportLocationData.SetColumnNull();
                                averageSteelThicknessGaugingPoint.IACSReportLocationData.Strake = symmetricGaugingPoint.IACSReportLocationData.Strake;
                                averageSteelThicknessGaugingPoint.IACSReportLocationData.IsForward = (bool)symmetricGaugingPoint.IACSReportLocationData.IsForward;
                                averageSteelThicknessGaugingPoint.IACSReportLocationData.IsPortSide = !(bool)symmetricGaugingPoint.IACSReportLocationData.IsPortSide;

                                //#if (DEBUG)
                                //newFrontGaugingPoint.Name = ((bool)newFrontGaugingPoint.IACSReportLocationData.IsForward) ? "F " : "B ";
                                //newFrontGaugingPoint.Name += newFrontGaugingPoint.IACSReportLocationData.ID.ToString();
                                //newFrontGaugingPoint.Name += ((bool)newFrontGaugingPoint.IACSReportLocationData.IsPortSide) ? " P " : " S ";
                                //#else
                                averageSteelThicknessGaugingPoint.Name = averageSteelThicknessGaugingPoint.IACSReportLocationData.ID.ToString();
                                //#endif
开发者ID:phdsoft,项目名称:Teste_de_Codigo,代码行数:67,代码来源:CampaignConverter.cs


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