- UID
- 5813
- 积分
- 0
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2002-5-29
- 最后登录
- 1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
//本程序意图让操作者选定一个实体,接着判断实体类型,若是非AcDb3dSolid,设置为黄色,并点亮后恢复
若是AcDb3dSolid,设置为红色,整体点亮后恢复。
然后打开GS为2的第一个面,并点亮此面,最后想法向拉伸此面60个单位。
构建编译时出现错误为:
cdcd.cpp
f:\cdcd\cdcd.cpp(76) : error C2664: 'extrudeFaces' : cannot convert parameter 1 from 'class AcDbSubentId *' to 'const class AcArray<class AcDbSubentId *,class AcArrayMemCopyReallocator<class AcDbSubentId *> > &'
Reason: cannot convert from 'class AcDbSubentId *' to 'const class AcArray<class AcDbSubentId *,class AcArrayMemCopyReallocator<class AcDbSubentId *> >'
No constructor could take the source type, or constructor overload resolution was ambiguous
Error executing cl.exe.
CDCD.ARX - 1 error(s), 0 warning(s)
我对此不是很了解
cyb恳请大家帮忙解决,最好有具体的修正后的代码.
非常感谢!
void
cybobj()
{
ads_name en;
ads_point pt;
if (acedEntSel("\n选取一实体: ", en,pt) != RTNORM)
{
acutPrintf("\n没有选取");
return;
}
AcDbObjectId eId;
acdbGetObjectId(eId, en);
AcDbEntity *pEnt;
acdbOpenAcDbEntity(pEnt, eId, AcDb::kForWrite);
if (pEnt->isKindOf(AcDb3dSolid::desc())) {
pEnt->close();
AcDb3dSolid *box;
acdbOpenObject(box, eId, AcDb::kForWrite);
box->setColorIndex(1);
box->highlight();
pressEnterToContinue();
box->unhighlight();
AcGePoint3d pickpnt;
AcGeMatrix3d xform;
int numIds;
AcDbFullSubentPath *subentIds;
box->getSubentPathsAtGsMarker(AcDb::kFaceSubentType,
2, pickpnt, xform, numIds, subentIds);
box->highlight(subentIds[0]);//显亮此面
pressEnterToContinue();//回车键继续
box->unhighlight(subentIds[0]);//不显亮
box->extrudeFaces(&subentIds[0].subentId(),60,0);
//想沿法向拉伸此面60,--------此行出现错误。(第一个参数类型不对)
box->close();
acutPrintf("\n所选是三维实体");
}
else {
pEnt->setColorIndex(2);
pEnt->highlight();
pressEnterToContinue();
pEnt->unhighlight();
pEnt->close();
acutPrintf("\n所选不是三维实体");
} |
|