admin 发表于 2024-3-14 19:29:22

[每日一码] 指定颜色亮显几何实体

void drawInfo(const AcGeCurve3d* crv,int color)
{
    AcGeInterval iv;
    double lb,ub;
    crv->getInterval(iv);
    iv.getBounds(lb,ub);

    double param = lb;

    double step = (ub-lb) / 100;
    AcGePoint3d p1,p2;
    p1 = crv->evalPoint(lb);
    while(param < ub)
    {
      param += step;
      p2 = crv->evalPoint(param);
      ads采用grdraw(asDblArray(p1),asDblArray(p2),color,0);
      p1 = p2;
    }
    p2 = crv->evalPoint(ub);
    ads采用grdraw(asDblArray(p1),asDblArray(p2),color,0);

}   
页: [1]
查看完整版本: [每日一码] 指定颜色亮显几何实体