- UID
- 6123
- 积分
- 0
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2002-6-6
- 最后登录
- 1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
我下面这段代码,是得到椭圆的端点的,可以调试结果显示终点不正确!!!
帮个忙!
BOOL GetEllipseStartEndPoint(AcDbObjectId ellipseId, AcGePoint3d &ptStart, AcGePoint3d &ptEnd)
{
BOOL bRet = FALSE;
double dStartAngle, dEndAngle;
AcGePoint3d ptCenter;
AcGeVector3d VmajorAxis, VminorAxis;
AcDbEllipse *pEllipse = NULL;
if(Acad::eOk == acdbOpenObject(pEllipse, ellipseId, AcDb::kForRead))
{
ptCenter = pEllipse->center();
VmajorAxis = pEllipse->majorAxis();
VminorAxis = pEllipse->minorAxis();
dStartAngle = pEllipse->startAngle();
dEndAngle = pEllipse->endAngle();
pEllipse->close();
AcGeEllipArc3d acgeellipse(ptCenter, VmajorAxis, VminorAxis,
VmajorAxis.length(), VminorAxis.length(), dStartAngle, dEndAngle);
ptStart = acgeellipse.startPoint();
ptEnd = acgeellipse.endPoint();
bRet = TRUE;
}
return bRet;
} |
|