コード例 #1
0
ファイル: XmlPart.cs プロジェクト: boussaffawalid/CutOptima
		public Part Convert()
		{
			Part part = new Part();
			part.Length = SizeA;
			part.Width = SizeB;
			part.Quantity = Amount;
			return part;
		}
コード例 #2
0
ファイル: Program.cs プロジェクト: boussaffawalid/CutOptima
		static void Test3()
		{
			Part part = new Part();
			part.Length = 400M;
			part.Width = 400M;
			part.Quantity = 4;
			part.CanRotate = true;
			optimizer.Parts.Add(part);

			Sheet sheet = new Sheet();
			sheet.Width = 1024M;
			sheet.Height = 1024M;
			sheet.Thickness = 16M;
			optimizer.Sheets.Add(sheet);

			optimizer.Parameters.CutterThickness = 10M;
			while (optimizer.NextResult())
			{
				//schemes.Add(optimizer.CurrentResult);
			}
		}
コード例 #3
0
ファイル: Program.cs プロジェクト: boussaffawalid/CutOptima
		static void Test2()
		{
			Part part = new Part();
			part.Length = 200M;
			part.Width = 200M;
			part.Quantity = 3;
			part.CanRotate = false;
			optimizer.Parts.Add(part);

			Sheet sheet = new Sheet();
			sheet.Width = 2730M;
			sheet.Height = 1830M;
			sheet.Thickness = 16M;
			optimizer.Sheets.Add(sheet);

			optimizer.Parameters.CutterThickness = 4.4M;
			optimizer.Parameters.CutOffBottom = 13M;
			while (optimizer.NextResult())
			{
				//schemes.Add(optimizer.CurrentResult);
			}
		}
コード例 #4
0
ファイル: Program.cs プロジェクト: boussaffawalid/CutOptima
		static void Test5()
		{
			Part part = new Part();
			part.Length = 2383M;
			part.Width = 600M;
			part.Quantity = 2;
			part.CanRotate = true;
			optimizer.Parts.Add(part);

			part = new Part();
			part.Length = 2296M;
			part.Width = 500M;
			part.Quantity = 1;
			part.CanRotate = true;
			optimizer.Parts.Add(part);

			Sheet sheet = new Sheet();
			sheet.Width = 2730M;
			sheet.Height = 1830M;
			sheet.Thickness = 16M;
			optimizer.Sheets.Add(sheet);

			optimizer.Parameters.CutterThickness = 4.4M;
			List<CuttingScheme> schemes = new List<CuttingScheme>();
			while (optimizer.NextResult())
			{
				schemes.Add(optimizer.CurrentResult);
			}
			Denisenko.Cutting.LC4.LC4Document doc = convertor.Convert(schemes);
			doc.InternalName = "SOKOLOV";
			doc.Description = "manually generated";
			doc.Cuttings[0].Name = "00001";
			doc.Serialize(@"SOKOLOV2.xml");
		}