Пример #1
0
        public void updateSlic3r1()
        {
            var wStream    = File.OpenRead(@"ToAdventurer3TestData\test1.json");
            var settings   = new DataContractJsonSerializerSettings();
            var serializer = new DataContractJsonSerializer(typeof(ToAdventurer3Parameter), settings);
            var parameter  = (ToAdventurer3Parameter)serializer.ReadObject(wStream);

            using (var input = File.OpenRead(@"ToAdventurer3TestData\slic3r1.g")) {
                using (var output = File.Create(@"ToAdventurer3TestData\outslic3r1.g")) {
                    var process = new ToAdventurer3();
                    process.Parameter = parameter;
                    Assert.AreEqual(process.Modify(input, output), true);
                }
            }
            SupportClass.AreEqual(@"ToAdventurer3TestData\outslic3r1.g", @"ToAdventurer3TestData\resslic3r1.g");
        }
Пример #2
0
        public void update9S3D()
        {
            var parameter = new ToAdventurer3Parameter();

            parameter.PlayRemovalLength  = 0.0;
            parameter.BrimSpeedTypeValue = ToAdventurer3Parameter.BrimSpeedType.NoChange;
            parameter.BrimExtrudeRatio   = 200;
            parameter.EnclosureFanOn     = false;
            using (var input = File.OpenRead(@"ToAdventurer3TestData\test2.g")) {
                using (var output = File.Create(@"ToAdventurer3TestData\output9.g")) {
                    var process = new ToAdventurer3();
                    process.Parameter = parameter;
                    Assert.AreEqual(process.Modify(input, output), true);
                }
            }
            SupportClass.AreEqual(@"ToAdventurer3TestData\output9.g", @"ToAdventurer3TestData\result9.g");
        }