马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
本帖最后由 1121443108qaz 于 2018-8-26 17:54 编辑
出错在一个winmain.cpp上,我看描述是说mfc用的啊,问题是我建的这项目不支持mfc,我也没用到mfc啊。有人遇到这问题吗,求指点 - void CRegionUtil::r2p(AcDbRegion* pRegion)
- {
- AcDbObjectId entId = pRegion->objectId();
- AcDbFullSubentPath path(entId, AcDbSubentId());
- AcBrBrep brep;
- brep.setSubentPath(path);
- AcDbCurve* pCurve = NULL;
- AcGeCurve3d* pCurve3d=NULL;
- AcBr::ErrorStatus es;
- AcBrBrepEdgeTraverser edgeTr;
- es=edgeTr.setBrep(brep);
- AcBrEdge edge;
- if (es==AcBr ::eOk)
- {
- for (edgeTr.restart(); !edgeTr.done(); edgeTr.next())
- {
- es = edgeTr.getEdge(edge);
- if (es == AcBr::eOk)
- {
- es = pEdge->getCurve(pCurve3d);
- if (es == AcBr::eOk)
- {
- acutPrintf(L"\n进入getcurve");
- pCurve->setFromAcGeCurve(*pCurve3d);
- CDwgDatabaseUtil::postToMOdelSpace(pCurve);
- delete pCurve3d;
- }
- else
- {
- acutPrintf(L"\n失败在获得曲线上,es is %d", es);
- }
- }
- else
- {
- acutPrintf(L"\n失败在获得edge,es is %d", es);
- }
- }
- }
- else
- {
- acutPrintf(L"\n失败在setbrep上,es is %d", es);
- }
-
- }
 - static void xxxMyGrouptest()
- {
- AcDbObjectId entId = CSSUtil::selectOne(L"\n select ");
- if (entId==AcDbObjectId::kNull)
- {
- return;
- }
- AcDbRegion* pRegion = NULL;
- if (acdbOpenObject(pRegion,entId,AcDb::kForRead)==Acad ::eOk)
- {
- CRegionUtil::r2p(pRegion);
- pRegion->close();
- }
- }
|