本文整理汇总了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