- 积分
- 623
- 明经币
- 个
- 注册时间
- 2002-10-11
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
生手求助;
如何将提取出的复线的点集变成acedSSGet “wp””cp”项所需要的点集,不知要组成链表还是数组.,请指教.并给出一小段示例代码. 谢谢.
以下代码为什么不行?
acedEntSel("\n请选共用件外形[封闭多义线]:",ent,pt); struct resbuf *pointlist = NULL, *eb1; ads_name ss; acedSSAdd(NULL, NULL, ss); pData=acdbEntGet(ent); for(;pData!=NULL;pData=pData->rbnext) { if(pData->restype == 10) { eb1=new resbuf; eb1->rbnext = NULL; eb1->restype = RTPOINT; eb1->resval.rpoint[X] = pData->resval.rpoint[X]; eb1->resval.rpoint[Y] = pData->resval.rpoint[Y]; eb1->resval.rpoint[Z] = 0; //acutPrintf("\n%d,%f,%f",i,pData->resval.rpoint[X],pData->resval.rpoint[Y]); pointlist->rbnext = eb1; } } //pointlist->rbnext = NULL; //ads_point pt1, pt2, pt3, pt4; //pt1[X] = pt1[Y] = pt1[Z] = 0.0; //pt2[X] = pt2[Y] = 500.0; pt2[Z] = 0.0; //pt3[X] = 1000.0; pt3[Y] = 500.0; pt3[Z] = 0.0; //pt4[X] = 500.0; pt4[Y] = pt4[Z] = 0.0; //pointlist = acutBuildList(RTPOINT, pt1, RTPOINT, pt2, RTPOINT, pt3, RTPOINT, pt4, 0);
acedSSGet("WP", pointlist, NULL, NULL, ss); acutRelRb(eb1); acutRelRb(pointlist); |
|