TA的每日心情 | 开心 半小时前 |
---|
签到天数: 20 天 [LV.4]偶尔看看III
管理员
- 积分
- 1393
|
AcGeVector3d v12(p2-p1);
AcGeVector3d v23(p3-p2);
double signedAngle = v12.angleTo(v23, AcGeVector3d::kZAxis); // 0~2PI
if (signedAngle > PI)
signedAngle -= 2*PI; // -PI..+PI
AcGePoint3d ps, pe; // in
bool ccw; // in
AcGeVector3d v, vse(pe - ps);
AcGeVector3d v(-vse.y, vse.x, vse.z);
//v points to the left side of [ps-->pe] which is the outside if clockwise
if (ccw)
v = -v;
AcGePoint3d pt(ps + 0.5*vse);
AcDbRay *ray = new AcDbRay()
ray->setBasePoint(pt);
v.normalize();
ray->setUnitDir(v); |
|