- UID
- 1
- 积分
- 15926
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2002-1-3
- 最后登录
- 1970-1-1
|
发表于 2002-9-26 23:12:30
|
显示全部楼层
Re: [ARX程序]:AcDbFace类面如何旋转?
最初由 sitrxs 发布
[B]为了求面与实体(AcDbEntity)交线,实体中有圆柱面,我先构造了面(AcDbFace),然后将面旋转一角度,再与实体求交,可到底如何将面旋转,拜托! [/B]
构筑旋转矩阵,然后transForm到实体上。
AcGeMatrix3d mRVec;
AcGePoint3d Origin; //旋转的基点
AcGeVector3d mRAxis; //旋转轴向量
.....
设置好上面两个参数后
mRVec.setToRotation(angle,mRAxis,Origin);
AcDbFace *pFace; //这个是你要旋转的3DFACE实体
pFace->transformBy(mRVec); //这个后,实体就变化了。
- [FONT=courier new]
- AcGeMatrix3d&
- setToRotation(
- double angle,
- const AcGeVector3d& axis,
- const AcGePoint3d& center = AcGePoint3d::kOrigin);
- angle Input angle of rotation
- axis Input axis vector of rotation
- center Input origin point of rotation
- Sets this to the matrix of the rotation by angle angle around the axis with vector axis passing through the point center. The direction of the rotation satisfies the right-hand rule.[/FONT]
复制代码 |
|