protected override void AddAnalysisToXMLOutput(CAD.AssemblyType cadassembly) { base.AddAnalysisToXMLOutput(cadassembly); CAD.AnalysesType cadanalysis = GetCADAnalysis(cadassembly); CAD.BlastType blastanalysis = new CAD.BlastType(); blastanalysis._id = UtilityHelpers.MakeUdmID(); blastanalysis.AnalysisID = blastConfig.analysis.ID; if (referencePlaneType != Survivability.ReferencePlaneTypeEnum.None) { CAD.ReferencePlaneType refplane = new CAD.ReferencePlaneType(); refplane._id = UtilityHelpers.MakeUdmID(); refplane.Type = referencePlaneType.ToString(); blastanalysis.ReferencePlane = new CAD.ReferencePlaneType[1]; // cardinality should be changed to have 0..1 in CAD_Uml.xme blastanalysis.ReferencePlane[0] = refplane; } List <CAD.MetricType> metrics = MetricsToCADXMLOutput(Computations, cadassembly.ConfigurationID); if (metrics.Count > 0) { blastanalysis.Metrics = new CAD.MetricsType(); blastanalysis.Metrics._id = UtilityHelpers.MakeUdmID(); blastanalysis.Metrics.Metric = metrics.ToArray(); } if (blastanalysis.ReferencePlane != null || blastanalysis.Metrics != null) { cadanalysis.Blast = new CAD.BlastType[] { blastanalysis }; } }
protected override void AddAnalysisToXMLOutput(CAD.AssemblyType cadassembly) { base.AddAnalysisToXMLOutput(cadassembly); CAD.AnalysesType cadanalysis = GetCADAnalysis(cadassembly); CAD.BallisticType ballisticanalysis = new CAD.BallisticType(); ballisticanalysis._id = UtilityHelpers.MakeUdmID(); ballisticanalysis.AnalysisID = AnalysisID; if (referencePlaneType != Survivability.ReferencePlaneTypeEnum.None) { CAD.ReferencePlaneType refplane = new CAD.ReferencePlaneType(); refplane._id = UtilityHelpers.MakeUdmID(); refplane.Type = referencePlaneType.ToString(); ballisticanalysis.ReferencePlane = refplane; } if (customShotlineList.Any()) { CAD.ShotlinesType cadshotlinesuite = new CAD.ShotlinesType(); cadshotlinesuite._id = UtilityHelpers.MakeUdmID(); List <CAD.ShotlineType> shotlineList = new List <CAD.ShotlineType>(); foreach (var shotline in customShotlineList) { CAD.ShotlineType cadshotline = new CAD.ShotlineType(); cadshotline._id = UtilityHelpers.MakeUdmID(); cadshotline.Azimuth = shotline.Azimuth; cadshotline.Elevation = shotline.Elevation; cadshotline.BallisticThreatRef = shotline.BallisticThreatRef; cadshotline.ComponentID = shotline.ComponentID; cadshotline.DatumPoint = shotline.DatumPoint; cadshotline.ShotlineName = shotline.ShotlineName; shotlineList.Add(cadshotline); } cadshotlinesuite.Shotline = shotlineList.ToArray(); ballisticanalysis.Shotlines = cadshotlinesuite; } List <CAD.MetricType> metrics = MetricsToCADXMLOutput(Computations, cadassembly.ConfigurationID); if (metrics.Count > 0) { ballisticanalysis.Metrics = new CAD.MetricsType(); ballisticanalysis.Metrics._id = UtilityHelpers.MakeUdmID(); ballisticanalysis.Metrics.Metric = metrics.ToArray(); } if (ballisticanalysis.Metrics != null || ballisticanalysis.ReferencePlane != null || ballisticanalysis.Shotlines != null) { cadanalysis.Ballistic = new CAD.BallisticType[] { ballisticanalysis }; } }
protected override void AddAnalysisToXMLOutput(CAD.AssemblyType cadassembly) { base.AddAnalysisToXMLOutput(cadassembly); CAD.AnalysesType cadanalysis = GetCADAnalysis(cadassembly); CAD.BallisticType ballisticanalysis = new CAD.BallisticType(); ballisticanalysis._id = UtilityHelpers.MakeUdmID(); ballisticanalysis.AnalysisID = AnalysisID; if (referencePlaneType != Survivability.ReferencePlaneTypeEnum.None) { CAD.ReferencePlaneType refplane = new CAD.ReferencePlaneType(); refplane._id = UtilityHelpers.MakeUdmID(); refplane.Type = referencePlaneType.ToString(); ballisticanalysis.ReferencePlane = refplane; } if (customShotlineList.Any()) { CAD.ShotlinesType cadshotlinesuite = new CAD.ShotlinesType(); cadshotlinesuite._id = UtilityHelpers.MakeUdmID(); List<CAD.ShotlineType> shotlineList = new List<CAD.ShotlineType>(); foreach (var shotline in customShotlineList) { CAD.ShotlineType cadshotline = new CAD.ShotlineType(); cadshotline._id = UtilityHelpers.MakeUdmID(); cadshotline.Azimuth = shotline.Azimuth; cadshotline.Elevation = shotline.Elevation; cadshotline.BallisticThreatRef = shotline.BallisticThreatRef; cadshotline.ComponentID = shotline.ComponentID; cadshotline.DatumPoint = shotline.DatumPoint; cadshotline.ShotlineName = shotline.ShotlineName; shotlineList.Add(cadshotline); } cadshotlinesuite.Shotline = shotlineList.ToArray(); ballisticanalysis.Shotlines = cadshotlinesuite; } List<CAD.MetricType> metrics = MetricsToCADXMLOutput(Computations, cadassembly.ConfigurationID); if (metrics.Count > 0) { ballisticanalysis.Metrics = new CAD.MetricsType(); ballisticanalysis.Metrics._id = UtilityHelpers.MakeUdmID(); ballisticanalysis.Metrics.Metric = metrics.ToArray(); } if (ballisticanalysis.Metrics != null || ballisticanalysis.ReferencePlane != null || ballisticanalysis.Shotlines != null) { cadanalysis.Ballistic = new CAD.BallisticType[] { ballisticanalysis }; } }
protected override void AddAnalysisToXMLOutput(CAD.AssemblyType cadassembly) { base.AddAnalysisToXMLOutput(cadassembly); CAD.AnalysesType cadanalysis = GetCADAnalysis(cadassembly); CAD.BlastType blastanalysis = new CAD.BlastType(); blastanalysis._id = UtilityHelpers.MakeUdmID(); blastanalysis.AnalysisID = blastConfig.analysis.ID; if (referencePlaneType != Survivability.ReferencePlaneTypeEnum.None) { CAD.ReferencePlaneType refplane = new CAD.ReferencePlaneType(); refplane._id = UtilityHelpers.MakeUdmID(); refplane.Type = referencePlaneType.ToString(); blastanalysis.ReferencePlane = new CAD.ReferencePlaneType[1]; // cardinality should be changed to have 0..1 in CAD_Uml.xme blastanalysis.ReferencePlane[0] = refplane; } List<CAD.MetricType> metrics = MetricsToCADXMLOutput(cadassembly.ConfigurationID); if (metrics.Count > 0) { blastanalysis.Metrics = new CAD.MetricsType(); blastanalysis.Metrics._id = UtilityHelpers.MakeUdmID(); blastanalysis.Metrics.Metric = metrics.ToArray(); } if (blastanalysis.ReferencePlane != null || blastanalysis.Metrics != null) { cadanalysis.Blast = new CAD.BlastType[] { blastanalysis }; } }