UG二次开发,圆柱状体预览线

std::vector <tag_t> CreateSingleCoolLine(linePoint coolLine, double coolDim,double vecX[3], double vecY[3])
{
    UF_initialize();

    std::vector <tag_t> singleCoolLine;

    singleCoolLine.push_back(CreatCircle(coolLine.startPoint, coolDim, vecX, vecY));
    singleCoolLine.push_back(CreatCircle(coolLine.endPoint, coolDim, vecX, vecY));
    double temp1[3] = { 0.0,0.0,0.0 }, temp2[3] = { 0.0,0.0,0.0 }, temp3[3] = { 0.0,0.0,0.0 };
    double temp4[3] = { 0.0,0.0,0.0 }, temp5[3] = { 0.0,0.0,0.0 }, temp6[3] = { 0.0,0.0,0.0 };
    double temp7[3] = { 0.0,0.0,0.0 }, temp8[3] = { 0.0,0.0,0.0 }, temp9[3] = { 0.0,0.0,0.0 };

    UF_VEC3_affine_comb(coolLine.startPoint, coolDim * 0.5, vecX, temp1);
    UF_VEC3_affine_comb(coolLine.startPoint, -coolDim * 0.5, vecX, temp2);
    UF_VEC3_affine_comb(coolLine.startPoint, coolDim * 0.5, vecY, temp3);
    UF_VEC3_affine_comb(coolLine.startPoint, -coolDim * 0.5, vecY, temp4);

    UF_VEC3_affine_comb(coolLine.endPoint, coolDim * 0.5, vecX, temp5);
    UF_VEC3_affine_comb(coolLine.endPoint, -coolDim * 0.5, vecX, temp6);
    UF_VEC3_affine_comb(coolLine.endPoint, coolDim * 0.5, vecY, temp7);
    UF_VEC3_affine_comb(coolLine.endPoint, -coolDim * 0.5, vecY, temp8);

    singleCoolLine.push_back(CreatLine(temp1, temp5));
    singleCoolLine.push_back(CreatLine(temp2, temp6));
    singleCoolLine.push_back(CreatLine(temp3, temp7));
    singleCoolLine.push_back(CreatLine(temp4, temp8));

    if (!SetVecObjCorLayerName(singleCoolLine, 178, 254, "行位运水的预览线")) { uc1601("設置容器内對象顔色圖層名稱失敗", 1); }

    UF_terminate();
    return singleCoolLine;   
   
}

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值