using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FLY.Thick.FilmCasting.Server.Model
{
    /// <summary>
    /// 横向厚度记录
    /// </summary>
    public class Lc_ScanData
    {
        public Int64 ID { get; set; }
        public Int64 ProfileID { get; set; }
        public DateTime Time { get; set; }

        public DateTime EndTime { get; set; }

        /// <summary>
        /// 目标值
        /// </summary>
        public double Target { get; set; }

        /// <summary>
        /// 规格线% ，最后规格值为目标值*TolerancePercent 
        /// </summary>
        public double TolerancePercent { get; set; }

        public double K { get; set; }

        public double B { get; set; }

        public double FilmPosition { get; set; }

        public double FilmVelocity { get; set; }

        /// <summary>
        /// 拉伸前线速度
        /// </summary>
        public double FilmVelocityBeginStretching { get; set; }

        /// <summary>
        /// 膜宽度 mm
        /// </summary>
        public int FilmWidth { get; set; }

        /// <summary>
        /// 厚度均值
        /// </summary>
        public double Avg { get; set; }


        /// <summary>
        /// 数据范围 开始
        /// </summary>
        public int DataBegin { get; set; }

        /// <summary>
        /// 数据范围 结束
        /// </summary>
        public int DataEnd { get; set; }


        public double[] Thicks { get; set; }

        public int[] SampleADs { get; set; }

        public Lc_BoltMapInfo BoltMapInfo { get; set; }
    }

    public class Lc_Sample
    {
        public Int64 ID { get; set; }

        public DateTime Time { get; set; }

        public int[] SampleADs { get; set; }
    }



    public class Lc_BoltMapInfo 
    {
        /// <summary>
        /// 螺丝宽度 mm, 是double, 那就可以设置英寸
        /// </summary>
        public double BoltWidth { get; set; }

        /// <summary>
        /// 总螺丝数 
        /// </summary>
        public int BoltCnt { get; set; }

        /// <summary>
        /// 左单边不工作螺丝位
        /// </summary>
        public int LeftEmptyBolts { get; set; } = 1;

        /// <summary>
        /// 右单边不工作螺丝位
        /// </summary>
        public int RightEmptyBolts { get; set; } = 1;

        /// <summary>
        /// 收缩率 
        /// </summary>
        public double UniformShrinkPercent { get; set; } = 0.03;

        /// <summary>
        /// 膜中心位置偏移 mm；
        /// 正常情况膜的中心位置，就是螺丝范围中心位置；
        /// 但切边后，再被测厚仪测量，膜的中心位置就与原来不一致（两边切得不一样）
        /// </summary>
        public int MidOffset { get; set; }
    }
}
