本文整理汇总了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])
示例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;
}