Beispiel #1
0
        public override void GenerateCADXMLOutput()
        {
            CAD.AssembliesType assembliesoutroot = cadDataContainer.ToCADXMLOutput(this);
            if (assembliesoutroot.Assembly.Length > 0)
            {
                AddAnalysisToXMLOutput(assembliesoutroot.Assembly[0]);

                // file location
                Survivability.FileLocation fileloc = new Survivability.FileLocation();
                if (blastConfig.analysis.tier > 1)
                {
                    fileloc.directory = "AP203_E2_SEPARATE_PART_FILES";
                }
                else
                {
                    fileloc.directory = "AP203_E2_SINGLE_FILE";
                }
                fileloc.name = assembliesoutroot.Assembly[0].CADComponent.Name + "_asm.stp";
                fileloc.type = Survivability.FileLocation.FileTypeEnum.STEPFile;
                blastConfig.fileLocations.Add(fileloc);
                AddStaticAnalysisMetrics(assembliesoutroot.Assembly[0]);
            }

            AddDataExchangeFormatToXMLOutput(assembliesoutroot);
            assembliesoutroot.SerializeToFile(Path.Combine(OutputDirectory, TestBenchBase.CADAssemblyFile));
        }
Beispiel #2
0
        public override void GenerateCADXMLOutput()
        {
            CAD.AssembliesType assembliesoutroot = cadDataContainer.ToCADXMLOutput(this);
            if (ProcessingInstructions.Count != 0)
            {
                CAD.ProcessingInstructionsType  instr        = new CAD.ProcessingInstructionsType();
                CAD.ProcessingInstructionType[] instructions = new CAD.ProcessingInstructionType[ProcessingInstructions.Count];
                int j = 0;
                foreach (var i in ProcessingInstructions)
                {
                    instructions[j]           = new CAD.ProcessingInstructionType();
                    instructions[j].Primary   = i.Key;
                    instructions[j].Secondary = i.Value;
                }
                instr.ProcessingInstruction = instructions;
                assembliesoutroot.ProcessingInstructions = instr;
            }
            // R.O. 1/26/2015, InterferenceCheck deprecated. Now interference check is specified by adding a InterferenceCount to
            // a CADComputationComponent
            //if ((Computations.Any() || InterferenceCheck) && assembliesoutroot.Assembly.Length > 0)
            if (this.StaticAnalysisMetrics.Any() && assembliesoutroot.Assembly.Length > 0)
            {
                AddStaticAnalysisMetrics(assembliesoutroot.Assembly[0]);       //AddAnalysisToXMLOutput(assembliesoutroot.Assembly[0]);
            }

            AddDataExchangeFormatToXMLOutput(assembliesoutroot);
            assembliesoutroot.SerializeToFile(Path.Combine(OutputDirectory, TestBenchBase.CADAssemblyFile));
        }
Beispiel #3
0
 public virtual void GenerateCADXMLOutput()
 {
     CAD.AssembliesType assembliesoutroot = cadDataContainer.ToCADXMLOutput(this, MetaLink);
     if (MetaLink)
     {
         CAD.ProcessingInstructionsType  instr        = new CAD.ProcessingInstructionsType();
         CAD.ProcessingInstructionType[] instructions = new CAD.ProcessingInstructionType[2];
         instructions[0]             = new CAD.ProcessingInstructionType();
         instructions[1]             = new CAD.ProcessingInstructionType();
         instructions[0].Primary     = "UNIQUELY_NAME_ALL_CAD_MODEL_INSTANCES";
         instructions[1].Primary     = "OUTPUT_JOINT_INFORMATION";
         instructions[0].Secondary   = "";
         instructions[1].Secondary   = "VALIDATE_JOINT_INFORMATION";
         instr.ProcessingInstruction = instructions;
         assembliesoutroot.ProcessingInstructions = instr;
     }
     AddDataExchangeFormatToXMLOutput(assembliesoutroot);
     assembliesoutroot.SerializeToFile(Path.Combine(OutputDirectory, TestBenchBase.CADAssemblyFile));
 }
Beispiel #4
0
        public override void GenerateCADXMLOutput()
        {
            CAD.AssembliesType assembliesRoot = cadDataContainer.ToCADXMLOutput(this);
            if (assembliesRoot.Assembly.Length > 0)
            {
                if (assembliesRoot.Assembly[0].CADComponent != null)
                {
                    // META-2262: Modify orientation here instead of in CADData.cs
                    ModifyRootComponentOrientation(assembliesRoot.Assembly[0].CADComponent,
                                                   assembliesRoot.Assembly[0].CADComponent.ComponentID);
                }

                AddAnalysisToXMLOutput(assembliesRoot.Assembly[0]);
            }

            AddDataExchangeFormatToXMLOutput(assembliesRoot);

            assembliesRoot.SerializeToFile(Path.Combine(OutputDirectory, TestBenchBase.CADAssemblyFile));
        }
Beispiel #5
0
 public override void GenerateCADXMLOutput()
 {
     CAD.AssembliesType              assembliesoutroot = cadDataContainer.ToCADXMLOutput(this, MetaLink);
     CAD.ProcessingInstructionsType  instr             = new CAD.ProcessingInstructionsType();
     CAD.ProcessingInstructionType[] instructions      = new CAD.ProcessingInstructionType[2];
     instructions[0] = new CAD.ProcessingInstructionType();
     instructions[1] = new CAD.ProcessingInstructionType();
     //instructions[2] = new CAD.ProcessingInstructionType();
     instructions[0].Primary = "COMPLETE_THE_HIERARCHY_FOR_LEAF_ASSEMBLIES";
     //instructions[1].Primary = "UNIQUELY_NAME_ALL_CAD_MODEL_INSTANCES";
     instructions[1].Primary     = "OUTPUT_JOINT_INFORMATION";
     instructions[0].Secondary   = instructions[1].Secondary = "";
     instructions[1].Secondary   = "VALIDATE_JOINT_INFORMATION";
     instr.ProcessingInstruction = instructions;
     assembliesoutroot.ProcessingInstructions = instr;
     AddDataExchangeFormatToXMLOutput(assembliesoutroot);
     if (assembliesoutroot.Assembly.Length > 0)
     {
         AddStaticAnalysisMetrics(assembliesoutroot.Assembly[0]);
     }
     assembliesoutroot.SerializeToFile(Path.Combine(OutputDirectory, TestBenchBase.CADAssemblyFile));
 }