static void Main(string[] args) { if (args.Length == 0) { Console.WriteLine("baz2lc4.exe <infile.dxf> [...]"); Environment.Exit(0); } List <CuttingScheme> schemes = new List <CuttingScheme>(); BazConvertor cvt = new BazConvertor(); foreach (string infile in args) { using (FileStream stm = new FileStream(infile, FileMode.Open, FileAccess.Read)) { StreamReader tr = new StreamReader(stm, Encoding.Default); cvt.Convert(schemes, tr); } } LC4Convertor lc4cvt = new LC4Convertor(); Job job = lc4cvt.Convert(schemes); job.Name = Path.GetFileNameWithoutExtension(args[0]); string outlc4 = Path.ChangeExtension(args[0], ".lc4"); job.SaveLC4(outlc4, true); //string outxml = Path.ChangeExtension(infile, ".xml"); //job.Serialize(outxml); }
static void Test2() { Denisenko.Cutting.Sheet sheet = new Denisenko.Cutting.Sheet(); sheet.Height = 1225; sheet.Width = 1830; sheet.Thickness = 16; CuttingScheme scheme = new CuttingScheme(); scheme.Parameters = new ParametersCollection(); scheme.Parameters.CutOffBottom = 15; scheme.Parameters.CutOffLeft = 15; scheme.Parameters.CutOffRight = 15; scheme.Parameters.CutOffTop = 15; scheme.Parameters.CutterThickness = 5; scheme.Sheet = sheet; Section right; Section top; Section lane; lane = scheme.Cut(scheme.RootSection, 950, CutType.Vertical, out right); scheme.Cut(lane, 290, CutType.Horizontal, out top); scheme.Cut(top, 290, CutType.Horizontal, out top); lane = scheme.Cut(top, 285, CutType.Horizontal, out top); scheme.Cut(lane, 720, CutType.Vertical, out right); lane = scheme.Cut(top, 790, CutType.Vertical, out right); LC4Convertor cvtr = new LC4Convertor(); Job job = cvtr.Convert(new List <CuttingScheme>(new CuttingScheme[] { scheme })); job.Name = "job2"; job.SaveLC4("job2.lc4", true); }
public void ConvertSectionTest() { LC4Convertor target = new LC4Convertor(); TestProject.Denisenko_Cutting_Converting_LC4ConvertorAccessor accessor = new TestProject.Denisenko_Cutting_Converting_LC4ConvertorAccessor(target); ParametersCollection parameters = new ParametersCollection(); parameters.CutterThickness = 10M; CuttingScheme scheme = new CuttingScheme(); scheme.Width = 1000M; scheme.Height = 1000M; scheme.Parameters = parameters; Section someSection = null; scheme.Cut(scheme.RootSection, 20M, CutType.Vertical, out someSection); Section prevSection = null; Section input = scheme.RootSection.NestedSections[0]; Section cut = scheme.RootSection.NestedSections[1]; LC4Section expected = new LC4Section(); expected.Size = LC4Numeric.FromNonScaled(30); expected.SectionType = LC4SectionType.Anschnitt; LC4Section actual; actual = accessor.ConvertSection(input, prevSection, cut); Assert.AreEqual <LC4Section>(expected, actual, "Denisenko.Cutting.Converting.LC4Convertor.ConvertSection did not return the expec" + "ted value."); Assert.Inconclusive("Verify the correctness of this test method."); }
public void ConstructorTest() { LC4Convertor target = new LC4Convertor(); // TODO: Implement code to verify target Assert.Inconclusive("TODO: Implement code to verify target"); }
public void AddSectionsTest() { LC4Convertor target = new LC4Convertor(); TestProject.Denisenko_Cutting_Converting_LC4ConvertorAccessor accessor = new TestProject.Denisenko_Cutting_Converting_LC4ConvertorAccessor(target); List <LC4Section> into = null; // TODO: Initialize to an appropriate value List <Section> sections = null; // TODO: Initialize to an appropriate value accessor.AddSections(into, sections); Assert.Inconclusive("A method that does not return a value cannot be verified."); }