Example #1
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));
        }
Example #2
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));
 }
Example #3
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));
 }
Example #4
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));
        }
 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)
         AddComputations(assembliesoutroot.Assembly[0]);
     assembliesoutroot.SerializeToFile(Path.Combine(OutputDirectory, TestBenchBase.CADAssemblyFile));
 }
Example #6
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));
        }