Exemple #1
0
        private void ThicknessGaugeInit(AppConfigController configController, XMLMaterialsController materialsController)
        {
            var      nameMaterialPEC = configController.GetStrValue("materialPEC");
            Material materialPEC     = materialsController.GetMaterial(nameMaterialPEC);

            double       radiusPEC    = configController.GetDoubleValue("radiusPEC");
            double       amplitude    = configController.GetDoubleValue("amplitude");
            double       frequency    = configController.GetDoubleValue("frequency");
            AcousticWave acousticWave = new AcousticWave(amplitude, frequency);
            RoundPEC     roundPEC     = new RoundPEC(radiusPEC, materialPEC, acousticWave);

            var      nameMaterialTO = configController.GetStrValue("materialTO");
            Material materialTO     = materialsController.GetMaterial(nameMaterialTO);

            double     thicknessTO = configController.GetDoubleValue("thicknessTO");
            TestObject testObject  = new TestObject(materialTO, thicknessTO);

            this.thicknessGauge = new UltrasonicThicknessGauge(roundPEC, testObject);

            if (this.thicknessGauge.IsFresnelZone)
            {
                templatePath = @"Templates\ThicknessGaugeFresnel";
            }
            else
            {
                templatePath = @"Templates\ThicknessGaugeFraunhofer";
            }

            this.thicknessGauge.StartTesting();
        }