- 积分
- 12459
- 明经币
- 个
- 注册时间
- 2003-5-28
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
发表于 2004-9-28 08:51:00
|
显示全部楼层
回复
在这里:
else { acdbPointSet(pick, lastpt); nRet = acedGetPoint(pick, "\nPick next point - [ENTER] for exit: ", pick); acedGrDraw(lastpt, pick, 1, 0);
newRb = acutNewRb(RTPOINT); newRb->resval.rpoint[0] = pick[0]; newRb->resval.rpoint[1] = pick[1]; newRb->resval.rpoint[2] = pick[2]; rbTrav->rbnext = newRb; rbTrav = rbTrav->rbnext; //if (newRb) // acutRelRb(newRb); } if (nRet != RTNORM) { keepPicking = Adesk::kFalse; break; }
这里的代码,是这样考虑的,如果if (nRet == RTNORM) 时,才
newRb = acutNewRb(RTPOINT); newRb->resval.rpoint[0] = pick[0]; newRb->resval.rpoint[1] = pick[1]; newRb->resval.rpoint[2] = pick[2]; rbTrav->rbnext = newRb; rbTrav = rbTrav->rbnext;
把建立链表结点的代码写在acedGetPoint(pick, "\nPick next point - [ENTER] for exit: ", pick) == RTNORM的判断为T之中, 否则就也错了 |
|