export function getPointInfo(dataList) {
    const list = [];
    dataList.forEach(d => {
        if (d.CadData != null && d.CadData != '') {
            const data = JSON.parse(d.CadData);
            const pointInfo = {};
            pointInfo['ID'] = d.ID;
            pointInfo['OrderNo'] = d.OrderNo;
            const dList = data[0] == null ? [] : data[0];
            const pList = dList[0] == null ? [] : dList[0];
            const hList = dList[1] == null ? [] : dList[1];
            const mList = dList[2] == null ? [] : dList[2];
            const oList = data[3] == null ? [] : data[3];
            const orgPList = dList[3] == null ? [] : dList[3];
            const smList = dList[4] == null ? [] : dList[4];
            const shList = dList[5] == null ? [] : dList[5];
            const kaiLiaoSizeList = data[4] == null ? [] : data[4];
            pointInfo['PointDetail'] = ArrayToObject(CadBlockPoint, pList);
            pointInfo['ModelDetail'] = ArrayToObject(CadBlockModel, mList);
            pointInfo['HoleDetail'] = ArrayToObject(CadBlockHoles, hList);
            pointInfo['OffSet'] = new V3().ParseObject(oList);
            // console.log('orgPList', orgPList)
            pointInfo['NewVersion'] = orgPList.length > 0 && orgPList[0][5] == 1;
            pointInfo['OrgPointDetail'] = ArrayToObject(CadBlockPoint, orgPList);
            if (kaiLiaoSizeList != null && kaiLiaoSizeList.length > 0) {
                pointInfo['KaiLiaoSize'] = new KaiLiaoSize().ParseObject([kaiLiaoSizeList[0], kaiLiaoSizeList[1]])
            } else {
                pointInfo['KaiLiaoSize'] = null;
            }
            pointInfo['SideModelDetail'] = ArrayToObject(CadBlockModel, smList);
            pointInfo['SideHoleDetail'] = ArrayToObject(CadBlockHoles, shList)
            list.push(pointInfo);
        }
    });
    return list;
}