分享S型矩阵逻辑算法:

S型走位,适用于吸嘴,矩阵走位等,都是相通的

记录下来,备忘吧

// 轨迹:从左到右,从右到左
        for (int M = 0; M < nRows_Tray; M++)//行数
        {
            nYStartPos_new = M*dYDelta_Tray + dYStartPos;
            for (int N = 0; N < nCols_Tray; N++)
            {
                int cols_Tray_new;
                if (M % 2 == 0) //偶行
                {
                    cols_Tray_new = N;
                }
                else
                {
                    cols_Tray_new = nCols_Tray - N - 1;//奇数行
                }
                nXStartPos_new = cols_Tray_new*dXDelta_Tray + dXStartPos;
                ST_TRACE_NODE node;
                node.bHadDone = false;
                node.col = cols_Tray_new;
                node.row = M;
                //    gLOG->Infos(L"print node guiji:{}, row:{},col: {}", tempStr, node.row, node.col);
                node.axiLocation.nAxisPos_Platform_X = (dXDelta_Tray*cols_Tray_new) + dXStartPos;
                node.axiLocation.nAxisPos_Platform_Y = (dYDelta_Tray*M) + dYStartPos;
                node.axiLocation.nAxisPos_Tube_Z = dStartPos_Tube_Z;
                node.axiLocation.nAxisPos_camera_Z = dStartPos_camera_Z;
                for (int j = 0; j < AngelList.count(); j++)
                {
                    node.angleIndex = j;
                    //node.axiLocation.e_Axis_TabletZ = AngelList.at(j);
                    node.index = index;
                    index++;
                    m_objTrace.trace.push_back(node);
                    qDebug() << QStringLiteral("S组装节点") << node.index << node.axiLocation.nAxisPos_Platform_X << node.axiLocation.nAxisPos_Platform_Y;
                }
            }
        }
        gLOG->Infos(L"组装节点共计数量: {}", index);
        qDebug() << "MGroup all nodes,index over is  " << index;
    }

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

海木漄

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值